No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Typical Configuration Examples

CloudEngine 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring Interface-based VLAN Assignment

Configuring Interface-based VLAN Assignment

Applicable Products and Versions

This example applies to the CE12800/CE6800/CE5800 V100R001C00 or later.

This example applies to the CE7800 V100R003C00 or later.

This example applies to the CE8800 V100R006C00 or later.

This example applies to the CE12800E V200R002C50 or later.

Networking Requirements

On a data center network shown in Figure 2-28, access switches SwitchA and SwitchB connect to core switch SwitchC. SwitchA and SwitchB connect to the production and office servers. Server1 and Server2 are production servers, and Server3 and Server4 are office servers.

To ensure communication security and prevent flooding of broadcast packets, the administrator requires that servers transmitting the same service communicate and servers transmitting different servers be isolated.

Figure 2-28 Networking of interface-based VLAN assignment

Requirement Analysis

Configure interface-based VLAN assignment on SwitchA and SwitchB and assign interfaces connecting servers with the same service transmitted to the same VLAN, so that servers in different VLANs cannot communicate at Layer 2 and servers in the same VLAN can communicate at Layer 2.

The configuration roadmap is as follows:

  1. Create VLANs and add interfaces connecting servers to VLANs to implement isolation of Layer 2 traffic of different services.
  2. Configure link types of interfaces between SwitchA and SwitchC, interfaces between SwitchB and SwitchC, VLANs allowed by interfaces so that servers transmitting the same service can communicate through SwitchC.

Procedure

  1. Create VLAN 200 and VLAN 300 on SwitchA and SwitchB and add interfaces to VLAN 200 and VLAN 300.

    # Configure SwitchA.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan batch 200 300
    [*SwitchA] interface 10ge 1/0/2
    [*SwitchA-10GE1/0/2] port default vlan 200
    [*SwitchA-10GE1/0/2] quit
    [*SwitchA] interface 10ge 1/0/3
    [*SwitchA-10GE1/0/3] port default vlan 300
    [*SwitchA-10GE1/0/3] quit
    [*SwitchA] interface 10ge 1/0/1
    [*SwitchA-10GE1/0/1] port link-type trunk
    [*SwitchA-10GE1/0/1] undo port trunk allow-pass vlan 1
    [*SwitchA-10GE1/0/1] port trunk allow-pass vlan 200 300
    [*SwitchA-10GE1/0/1] quit
    [*SwitchA] commit
    

    # Configure SwitchB.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchB
    [*HUAWEI] commit
    [~SwitchB] vlan batch 200 300
    [*SwitchB] interface 10ge 1/0/2
    [*SwitchB-10GE1/0/2] port default vlan 200
    [*SwitchB-10GE1/0/2] quit
    [*SwitchB] interface 10ge 1/0/3
    [*SwitchB-10GE1/0/3] port default vlan 300
    [*SwitchB-10GE1/0/3] quit
    [*SwitchB] interface 10ge 1/0/1
    [*SwitchB-10GE1/0/1] port link-type trunk
    [*SwitchB-10GE1/0/1] undo port trunk allow-pass vlan 1
    [*SwitchB-10GE1/0/1] port trunk allow-pass vlan 200 300
    [*SwitchB-10GE1/0/1] quit
    [*SwitchB] commit
    

  2. Configure link types of interfaces between SwitchA and SwitchC and between SwitchB and SwitchC and add interfaces to VLANs.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchC
    [*HUAWEI] commit
    [~SwitchC] vlan batch 200 300
    [*SwitchC] interface 10ge 1/0/1
    [*SwitchC-10GE1/0/1] port link-type trunk
    [*SwitchC-10GE1/0/1] undo port trunk allow-pass vlan 1
    [*SwitchC-10GE1/0/1] port trunk allow-pass vlan 200 300
    [*SwitchC-10GE1/0/1] quit
    [*SwitchC] interface 10ge 1/0/2
    [*SwitchC-10GE1/0/2] port link-type trunk
    [*SwitchC-10GE1/0/2] undo port trunk allow-pass vlan 1
    [*SwitchC-10GE1/0/2] port trunk allow-pass vlan 200 300
    [*SwitchC-10GE1/0/2] quit
    [*SwitchC] commit
    

Verifying the Configuration

Server1 and Server2 are on the same network segment, for example, 192.168.100.0/24; Server3 and Server4 are on the same network segment, for example, 192.168.200.0/24.

Server1 and Server2 can ping each other, but cannot ping Server3 or Server4. Server3 and Server4 can ping each other, but cannot ping Server1 or Server2.

Configuration Files

  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    vlan batch 200 300
    #
    interface 10GE1/0/1
     port link-type trunk
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 200 300
    #
    interface 10GE1/0/2
     port default vlan 200
    #
    interface 10GE1/0/3
     port default vlan 300
    #
    return
  • Configuration file of SwitchB

    #
    sysname SwitchB
    #
    vlan batch 200 300
    #
    interface 10GE1/0/1
     port link-type trunk
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 200 300
    #
    interface 10GE1/0/2
     port default vlan 200
    #
    interface 10GE1/0/3
     port default vlan 300
    #
    return
  • Configuration file of SwitchC

    #
    sysname SwitchC
    #
    vlan batch 200 300
    #
    interface 10GE1/0/1
     port link-type trunk
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 200 300
    #
    interface 10GE1/0/2
     port link-type trunk
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 200 300
    #
    return
Download
Updated: 2019-04-03

Document ID: EDOC1000039339

Views: 116626

Downloads: 7528

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next