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

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 12

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
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).
Configuration Examples

Configuration Examples

This section provides several configuration examples of VLAN mapping including networking requirements, configuration roadmap, and configuration procedure.

Example for Configuring VLAN-based 1 to 1 VLAN Mapping

Networking Requirements

As shown in Figure 5-78, on a data center network, as services increase, the network administrator plans a new branch that belongs to VLAN 5. The headquarters belongs to VLAN 6, and the headquarters and branch belong to the same network segment. The new branch needs to communicate with the headquarters.

Figure 5-78 Networking for configuring 1 to 1 VLAN mapping

Configuration Roadmap

The configuration roadmap is as follows:

  1. Add the downlink interface on Switch1 connected to the new branch to VLAN 5.
  2. Configure 1 to 1 VLAN mapping on Switch2 to implement communication between the new branch and headquarters.

Procedure

  1. Add the downlink interface on Switch1 to VLAN 5 and configure the uplink interfaces to allow the VLAN5.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch1
    [*HUAWEI] commit
    [~Switch1] vlan 5
    [*Switch1-vlan5] quit
    [*Switch1] interface 10ge 1/17/1
    [*Switch1-10GE1/17/1] port default vlan 5
    [*Switch1-10GE1/17/1] quit
    [*Switch1] interface 10ge 1/17/2
    [*Switch1-10GE1/17/2] port default vlan 5
    [*Switch1-10GE1/17/2] quit
    [*Switch1] interface 10ge 1/17/3
    [*Switch1-10GE1/17/3] port link-type trunk
    [*Switch1-10GE1/17/3] port trunk allow-pass vlan 5
    [*Switch1-10GE1/17/3] quit
    [*Switch1] commit

  2. Configure VLAN mapping on Switch2.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch2
    [*HUAWEI] commit
    [~Switch2] vlan 6
    [*Switch2-vlan6] quit
    [*Switch2] interface 10ge 1/17/1
    [*Switch2-10GE1/17/1] port link-type trunk
    [*Switch2-10GE1/17/1] port trunk allow-pass vlan 6
    [*Switch2-10GE1/17/1] port vlan-mapping vlan 5 map-vlan 6
    [*Switch2-10GE1/17/1] quit
    [*Switch2] interface 10ge 1/17/2
    [*Switch2-10GE1/17/2] port link-type trunk
    [*Switch2-10GE1/17/2] port trunk allow-pass vlan 6
    [*Switch2-10GE1/17/2] quit
    [*Switch2] commit
    

  3. Configure Layer 2 forwarding on Swicth3.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch3
    [*HUAWEI] commit
    [~Switch3] vlan 6
    [*Switch3-vlan6] quit
    [*Switch3] interface 10ge 1/17/1
    [*Switch3-10GE1/17/1] port link-type trunk
    [*Switch3-10GE1/17/1] port trunk allow-pass vlan 6
    [*Switch3-10GE1/17/1] quit
    [*Switch3] commit
    

  4. Verify the configuration.

    Configure servers in the new branch and headquarters on the same network segment. For example, configure IP addresses 172.16.0.1/16 and 172.16.0.7/16 for servers in the new branch and headquarters respectively so that the new branch can communication with the headquarters. This example pings Server3 in the headquarters from Server1 in the new branch.
    <Server1> ping 172.16.0.7
    Pinging 172.16.0.7 with 32 bytes of data:
    Reply from 172.16.0.7: bytes=32 time<1ms TTL=128
    Reply from 172.16.0.7: bytes=32 time<1ms TTL=128
    Reply from 172.16.0.7: bytes=32 time<1ms TTL=128
    Reply from 172.16.0.7: bytes=32 time<1ms TTL=128
    
    Ping statistics for 172.16.0.7:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 0ms, Average = 0ms

Configuration Files
  • Configuration file of Switch1

    #
    sysname Switch1
    #
    vlan batch 5
    #
    interface 10GE1/17/1
     port default vlan 5
    #
    interface 10GE1/17/2
     port default vlan 5
    #
    interface 10GE1/17/3
     port link-type trunk
     port trunk allow-pass vlan 5
    #
    return
  • Configuration file of Switch2

    #
    sysname Switch2
    #
    vlan batch 6
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 6
     port vlan-mapping vlan 5 map-vlan 6
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 6
    #
    return
  • Configuration file of Switch3

    #
    sysname Switch3
    #
    vlan batch 6
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 6
    #
    return

Example for Configuring VLAN-based 2 to 1 VLAN Mapping

Networking Requirements

As shown in Figure 5-79, on a data center network, the office server and production server in the old branch belong to VLAN 2 and VLAN 3 respectively, and the servers are connected to the core network through the access and aggregation switches. The network administrator plans a new branch. The office server and production server belong to VLAN 2 and VLAN 3 respectively. Devices transmitting the same service on old and new branches are located on the same network segment. To ensure that the same servers can communicate and different servers are isolated, and save VLAN resources, configure QinQ on aggregation switches. To retain VLAN deployment of core switch, configure VLAN mapping on the core switch.

Figure 5-79 Networking for configuring 2 to 1 VLAN mapping

Configuration Roadmap

The configuration roadmap is as follows:

  1. Add interfaces on Switch1 and Switch2 connected to servers to VLANs.

  2. Deploy QinQ on Switch3 and Switch4 to save VLAN resources.

  3. Configure 2 to 1 VLAN mapping on Switch5 so that the same service can be transmitted and different services are isolated in old and new branches.

Procedure

  1. Add downlink interfaces on Switch1 and Switch2 to VLANs and configure the uplink interfaces to allow the VLANs.

    # Configure Switch1.

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

    # Configure Switch2.

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

  2. Configure QinQ on Switch3 and Switch4.

    # Configure the type of 10GE1/17/1 on Switch3 as QinQ and the outer VLAN tag as VLAN 201.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch3
    [*HUAWEI] commit
    [~Switch3] vlan batch 201
    [*Switch3] interface 10ge 1/17/1
    [*Switch3-10GE1/17/1] port link-type dot1q-tunnel
    [*Switch3-10GE1/17/1] port default vlan 201
    [*Switch3-10GE1/17/1] quit
    [*Switch3] interface 10ge 1/17/2
    [*Switch3-10GE1/17/2] port link-type trunk
    [*Switch3-10GE1/17/2] port trunk allow-pass vlan 201
    [*Switch3-10GE1/17/2] quit
    [*Switch3] commit

    # Configure the type of 10GE1/17/1 on Switch4 as QinQ and the outer VLAN tag as VLAN 201.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch4
    [*HUAWEI] commit
    [~Switch4] vlan batch 201
    [*Switch4] interface 10ge 1/17/1
    [*Switch4-10GE1/17/1] port link-type dot1q-tunnel
    [*Switch4-10GE1/17/1] port default vlan 201
    [*Switch4-10GE1/17/1] quit
    [*Switch4] interface 10ge 1/17/2
    [*Switch4-10GE1/17/2] port link-type trunk
    [*Switch4-10GE1/17/2] port trunk allow-pass vlan 201
    [*Switch4-10GE1/17/2] quit
    [*Switch4] commit

  3. Configure VLAN mapping on Switch5.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch5
    [*HUAWEI] commit
    [~Switch5] vlan batch 501 502
    [*Switch5] interface 10ge 1/17/1
    [*Switch5-10GE1/17/1] port link-type trunk
    [*Switch5-10GE1/17/1] port trunk allow-pass vlan 501 502
    [*Switch5-10GE1/17/1] port vlan-mapping vlan 201 inner-vlan 2 map-vlan 501
    [*Switch5-10GE1/17/1] port vlan-mapping vlan 201 inner-vlan 3 map-vlan 502
    [*Switch5-10GE1/17/1] quit
    [*Switch5] interface 10ge 1/17/2
    [*Switch5-10GE1/17/2] port link-type trunk
    [*Switch5-10GE1/17/2] port trunk allow-pass vlan 501 502
    [*Switch5-10GE1/17/2] port vlan-mapping vlan 201 inner-vlan 2 map-vlan 501
    [*Switch5-10GE1/17/2] port vlan-mapping vlan 201 inner-vlan 3 map-vlan 502
    [*Switch5-10GE1/17/2] quit
    [*Switch5] interface 10ge 1/17/3
    [*Switch5-10GE1/17/3] port link-type trunk
    [*Switch5-10GE1/17/3] port trunk allow-pass vlan 501 502
    [*Switch5-10GE1/17/3] quit
    [*Switch5] commit

  4. Verify the configuration.

    • Configure office server Server1 in the new branch and office server Server2 in the old branch on the same network segment. For example, configure IP addresses 172.16.0.1/24 and 172.16.0.2/24 for Server1 and Server2 respectively.
    • Configure production server Server3 in the new branch and production server Server4 in the old branch on the same network segment. For example, configure IP addresses 172.16.1.1/24 and 172.16.1.2/24 for Server3 and Server4 respectively.

    Server1 and Server2, and Server 3 and Server 4 can communicate, and Server1 and Server2 are isolated from Server3 and Server4.

    This example pings Server2 in the old branch from Server1 in the new branch.
    <Server1> ping 172.16.0.2
    Pinging 172.16.0.2 with 32 bytes of data:
    Reply from 172.16.0.2: bytes=32 time<1ms TTL=128
    Reply from 172.16.0.2: bytes=32 time<1ms TTL=128
    Reply from 172.16.0.2: bytes=32 time<1ms TTL=128
    Reply from 172.16.0.2: bytes=32 time<1ms TTL=128
    
    Ping statistics for 172.16.0.2:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 0ms, Average = 0ms
    This example pings Server4 in the old branch from Server1 in the new branch.
    <Server1> ping 172.16.1.2
    Pinging 172.16.1.2 with 32 bytes of data:
    Request timed out.
    Request timed out.
    Request timed out.
    Request timed out.
    
    Ping statistics for 172.16.1.2:
        Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Configuration Files
  • Configuration file of Switch1

    #
    sysname Switch1
    #
    vlan batch 2 to 3
    #
    interface 10GE1/17/1
     port default vlan 2
    #
    interface 10GE1/17/2
     port default vlan 3
    #
    interface 10GE1/17/3
     port link-type trunk
     port trunk allow-pass vlan 2 to 3
    #
    return
  • Configuration file of Switch2

    #
    sysname Switch2
    #
    vlan batch 2 to 3
    #
    interface 10GE1/17/1
     port default vlan 2
    #
    interface 10GE1/17/2
     port default vlan 3
    #
    interface 10GE1/17/3
     port link-type trunk
     port trunk allow-pass vlan 2 to 3
    #
    return
  • Configuration file of Switch3

    #
    sysname Switch3
    #
    vlan batch 201
    #
    interface 10GE1/17/1
     port link-type dot1q-tunnel
     port default vlan 201
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 201
    #
    return
  • Configuration file of Switch4

    #
    sysname Switch4
    #
    vlan batch 201
    #
    interface 10GE1/17/1
     port link-type dot1q-tunnel
     port default vlan 201
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 201
    #
    return
  • Configuration file of Switch5

    #
    sysname Switch5
    #
    vlan batch 501 to 502
    #
    interface 10GE1/17/1
     port link-type trunk 
     port trunk allow-pass vlan 501 to 502
     port vlan-mapping vlan 201 inner-vlan 2 map-vlan 501
     port vlan-mapping vlan 201 inner-vlan 3 map-vlan 502
    #
    interface 10GE1/17/2
     port link-type trunk 
     port trunk allow-pass vlan 501 to 502
     port vlan-mapping vlan 201 inner-vlan 2 map-vlan 501
     port vlan-mapping vlan 201 inner-vlan 3 map-vlan 502
    #
    interface 10GE1/17/3
     port link-type trunk 
     port trunk allow-pass vlan 501 to 502
    #
    return

Example for Configuring VLAN-based 2 to 2 VLAN Mapping

Networking Requirements

As shown in Figure 5-80, two branches of a data center are deployed in different positions and located on the same network segment. To plan private VLAN IDs in the data center, QinQ is used. That is, packets from Switch2 to the ISP network carry double tags. Because the two VLAN IDs are different from VLAN IDs on the ISP network, packets from branches cannot pass through the ISP network. As a result, branches cannot communicate. It is required that branches 1 and 2 communicate.

Figure 5-80 Networking for configuring 2 to 2 VLAN mapping

Configuration Roadmap

The configuration roadmap is as follows:

  1. Add the downlink interface on Switch1 connected to branch 1 to VLAN 10 and downlink interface on Switch6 connected to branch 2 to VLAN 30.

  2. Configure QinQ on Switch2 and Switch5 so that packets sent to the ISP network carry double tags.

  3. Deploy 2 to 2 VLAN mapping on Switch3 and Switch4 to map inner and outer VLAN IDs of packets to VLAN IDs allowed by the ISP network so that branches can communicate.

Procedure

  1. Add downlink interfaces on Switch1 and Switch6 to VLANs and configure the uplink interfaces to allow the VLANs.

    # Configure Switch1.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch1
    [*HUAWEI] commit
    [~Switch1] vlan 10
    [*Switch1-vlan10] quit
    [*Switch1] interface 10ge 1/17/1
    [*Switch1-10GE1/17/1] port default vlan 10
    [*Switch1-10GE1/17/1] quit
    [*Switch1] interface 10ge 1/17/2
    [*Switch1-10GE1/17/2] port link-type trunk
    [*Switch1-10GE1/17/2] port trunk allow-pass vlan 10
    [*Switch1-10GE1/17/2] quit
    [*Switch1] commit

    # Configure Switch6.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch6
    [*HUAWEI] commit
    [~Switch6] vlan 30
    [*Switch6-vlan30] quit
    [*Switch6] interface 10ge 1/17/1
    [*Switch6-10GE1/17/1] port default vlan 30
    [*Switch6-10GE1/17/1] quit
    [*Switch6] interface 10ge 1/17/2
    [*Switch6-10GE1/17/2] port link-type trunk
    [*Switch6-10GE1/17/2] port trunk allow-pass vlan 30
    [*Switch6-10GE1/17/2] quit
    [*Switch6] commit

  2. Configure QinQ on Switch2 and Switch5 so that packets sent to the ISP network carry double tags.

    # Configure the type of 10GE1/17/1 on Switch2 as QinQ and the outer VLAN tag as VLAN 20.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch2
    [*HUAWEI] commit
    [~Switch2] vlan 20
    [*Switch2-vlan20] quit
    [*Switch2] interface 10ge 1/17/1
    [*Switch2-10GE1/17/1] port link-type dot1q-tunnel
    [*Switch2-10GE1/17/1] port default vlan 20
    [*Switch2-10GE1/17/1] quit
    [*Switch2] interface 10ge 1/17/2
    [*Switch2-10GE1/17/2] port link-type trunk
    [*Switch2-10GE1/17/2] port trunk allow-pass vlan 20
    [*Switch2-10GE1/17/2] quit
    [*Switch2] commit
    

    # Configure the type of 10GE1/17/1 on Switch5 as QinQ and the outer VLAN tag as VLAN 40.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch5
    [*HUAWEI] commit
    [~Switch5] vlan 40
    [*Switch5-vlan40] quit
    [*Switch5] interface 10ge 1/17/1
    [*Switch5-10GE1/17/1] port link-type dot1q-tunnel
    [*Switch5-10GE1/17/1] port default vlan 40
    [*Switch5-10GE1/17/1] quit
    [*Switch5] interface 10ge 1/17/2
    [*Switch5-10GE1/17/2] port link-type trunk
    [*Switch5-10GE1/17/2] port trunk allow-pass vlan 40
    [*Switch5-10GE1/17/2] quit
    [*Switch5] commit
    

  3. Configure VLAN mapping on Switch3 and Switch4.

    # Configure Switch3.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch3
    [*HUAWEI] commit
    [~Switch3] vlan batch 50
    [*Switch3] interface 10ge 1/17/1
    [*Switch3-10GE1/17/1] port link-type trunk
    [*Switch3-10GE1/17/1] port trunk allow-pass vlan 50
    [*Switch3-10GE1/17/1] port vlan-mapping vlan 20 inner-vlan 10 map-vlan 50 map-inner-vlan 60
    [*Switch3-10GE1/17/1] quit
    [*Switch3] interface 10ge 1/17/2
    [*Switch3-10GE1/17/2] port link-type trunk
    [*Switch3-10GE1/17/2] port trunk allow-pass vlan 50
    [*Switch3-10GE1/17/2] quit
    [*Switch3] commit
    

    # Configure Switch4.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch4
    [*HUAWEI] commit
    [~Switch4] vlan batch 50
    [*Switch4] interface 10ge 1/17/1
    [*Switch4-10GE1/17/1] port link-type trunk
    [*Switch4-10GE1/17/1] port trunk allow-pass vlan 50
    [*Switch4-10GE1/17/1] port vlan-mapping vlan 40 inner-vlan 30 map-vlan 50 map-inner-vlan 60
    [*Switch4-10GE1/17/1] quit
    [*Switch4] interface 10ge 1/17/2
    [*Switch4-10GE1/17/2] port link-type trunk
    [*Switch4-10GE1/17/2] port trunk allow-pass vlan 50
    [*Switch4-10GE1/17/2] quit
    [*Switch4] commit
    

  4. Verify the configuration.

    Configure Server1 in branch 1 and Server2 in branch 2 on the same network segment. For example, configure IP addresses 172.16.0.5/16 and 172.16.0.6/16 for Server1 and Server2 respectively so that branch 1 can communication with branch 2. This example pings Server2 in branch 2 from Server1 in branch 1.
    <Server1> ping 172.16.0.6
    Pinging 172.16.0.6 with 32 bytes of data:
    Reply from 172.16.0.6: bytes=32 time<1ms TTL=128
    Reply from 172.16.0.6: bytes=32 time<1ms TTL=128
    Reply from 172.16.0.6: bytes=32 time<1ms TTL=128
    Reply from 172.16.0.6: bytes=32 time<1ms TTL=128
    
    Ping statistics for 172.16.0.6:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 0ms, Average = 0ms

Configuration Files
  • Configuration file of Switch1

    #
    sysname Switch1
    #
    vlan batch 10
    #
    interface 10GE1/17/1
     port default vlan 10
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    return
  • Configuration file of Switch2

    #
    sysname Switch2
    #
    vlan batch 20
    #
    interface 10GE1/17/1
     port link-type dot1q-tunnel
     port default vlan 20
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    return
  • Configuration file of Switch3

    #
    sysname Switch3
    #
    vlan batch 50
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 50
     port vlan-mapping vlan 20 inner-vlan 10 map-vlan 50 map-inner-vlan 60
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    return
  • Configuration file of Switch4

    #
    sysname Switch4
    #
    vlan batch 50
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 50
     port vlan-mapping vlan 40 inner-vlan 30 map-vlan 50 map-inner-vlan 60
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    return
  • Configuration file of Switch5

    #
    sysname Switch5
    #
    vlan batch 40
    #
    interface 10GE1/17/1
     port link-type dot1q-tunnel
     port default vlan 40
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    return
  • Configuration file of Switch6

    #
    sysname Switch6
    #
    vlan batch 30
    #
    interface 10GE1/17/1
     port default vlan 30
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    return

Example for Configuring MQC-based VLAN Mapping

Networking Requirements

As shown in Figure 5-81, on a data center network, servers store video and data information. Users are classified into gold and silver users, and gold and silver users belong to VLAN 200 and VLAN 300 respectively and access servers through the enterprise backbone network. The enterprise backbone network allocates VLAN 2 to gold users and VLAN 3 to silver users. Switch2 and Switch3 are edge devices of the enterprise backbone network. VLAN IDs planned by the video and data servers and enterprise backbone network are different. To ensure that gold users can access the video server and silver users can access the data server, configure MQC-based VLAN mapping on Switch2 and Switch3.

Figure 5-81 Networking for configuring MQC-based VLAN mapping

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create VLAN 2 and VLAN 3 on Switch2 and Switch3.

  2. Configure traffic classifiers, traffic behaviors, and traffic policies on Switch2 and Switch3.

  3. Configure types of interfaces on Switch2 and Switch3, and add the interfaces to corresponding VLANs.

  4. Apply MQC to interfaces on Switch2 and Switch3 to implement VLAN mapping.

Procedure

  1. Create VLANs.

    # Create VLAN 200 and VLAN 300 on Switch1 and add interfaces connected to servers to VLANs.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch1
    [*HUAWEI] commit
    [~Switch1] vlan batch 200 300
    [*Switch1] interface 10ge 1/17/2
    [*Switch1-10GE1/17/2] port default vlan 200
    [*Switch1-10GE1/17/2] quit
    [*Switch1] interface 10ge 1/17/3
    [*Switch1-10GE1/17/3] port default vlan 300
    [*Switch1-10GE1/17/3] quit
    [*Switch1] commit

    # Create VLAN 200 and VLAN 300 on Switch4 and add interfaces connected to users to VLAN 200 and VLAN 300. The configuration of Switch1 is similar to the configuration of Switch4, and the configuration details are not mentioned here.

    # On Switch2, create VLAN 2 and VLAN 3.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch2
    [*HUAWEI] commit
    [~Switch2] vlan batch 2 3
    [*Switch2] commit

    # On Switch3, create VLAN 2 and VLAN 3.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch3
    [*HUAWEI] commit
    [~Switch3] vlan batch 2 3
    [*Switch3] commit

  2. Configure traffic classifiers, traffic behaviors, and traffic policies on Switch2 and Switch3.

    # Configure traffic classifiers, traffic behaviors, and traffic policies on Switch2.

    [~Switch Module2] traffic classifier name1
    [*Switch2-classifier-name1] if-match vlan 200
    [*Switch2-classifier-name1] quit
    [*Switch2] traffic behavior name1
    [*Switch2-behavior-name1] vlan-mapping vlan 2
    [*Switch2-behavior-name1] quit
    [*Switch2] traffic classifier name2
    [*Switch2-classifier-name2] if-match vlan 300
    [*Switch2-classifier-name2] quit
    [*Switch2] traffic behavior name2
    [*Switch2-behavior-name2] vlan-mapping vlan 3
    [*Switch2-behavior-name2] quit
    [*Switch2] traffic policy name1
    [*Switch2-trafficpolicy-name1] classifier name1 behavior name1
    [*Switch2-trafficpolicy-name1] classifier name2 behavior name2
    [*Switch2-trafficpolicy-name1] quit
    [*Switch2] commit

    # Configure traffic classifiers, traffic behaviors, and traffic policies on Switch3.

    [~Switch Module3] traffic classifier name1
    [*Switch3-classifier-name1] if-match vlan 2
    [*Switch3-classifier-name1] quit
    [*Switch3] traffic behavior name1
    [*Switch3-behavior-name1] vlan-mapping vlan 200
    [*Switch3-behavior-name1] quit
    [*Switch3] traffic classifier name2
    [*Switch3-classifier-name2] if-match vlan 3
    [*Switch3-classifier-name2] quit
    [*Switch3] traffic behavior name2
    [*Switch3-behavior-name2] vlan-mapping vlan 300
    [*Switch3-behavior-name2] quit
    [*Switch3] traffic policy name1
    [*Switch3-trafficpolicy-name1] classifier name1 behavior name1
    [*Switch3-trafficpolicy-name1] classifier name2 behavior name2
    [*Switch3-trafficpolicy-name1] quit
    [*Switch3] commit

  3. Apply traffic policies to interfaces to implement VLAN mapping.

    # Configure 10GE1/17/1 on Switch2.

    [~Switch2] interface 10ge 1/17/1
    [*Switch2-10GE1/17/1] traffic-policy name1 inbound
    [*Switch2-10GE1/17/1] quit
    [*Switch2] commit

    # Configure 10GE1/17/2 on Switch3.

    [~Switch3] interface 10ge 1/17/2
    [*Switch3-10GE1/17/2] traffic-policy name1 inbound
    [*Switch3-10GE1/17/2] quit
    [*Switch3] commit

  4. Configure other interfaces.

    # Add 10GE1/17/1 on Switch1 to VLAN 200 and VLAN 300. The configuration of 10GE1/17/1 on Switch4 is similar to the configuration of Switch1, and the configuration details are not mentioned here.

    [~Switch Module1] interface 10ge 1/17/1
    [*Switch1-10GE1/17/1] port link-type trunk
    [*Switch1-10GE1/17/1] port trunk allow-pass vlan 200 300
    [*Switch1-10GE1/17/1] quit
    [*Switch1] commit

  5. Verify the configuration.

    After the preceding configuration is complete, gold users can access the video server and silver users can access the data server.

Configuration Files
  • Configuration file of Switch1

    #
    sysname Switch1
    #
    vlan batch 200 300
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 200 300
    #
    interface 10GE1/17/2
     port default vlan 200
    #
    interface 10GE1/17/3
     port default vlan 300
    #
    return
  • Configuration file of Switch2

    #
    sysname Switch2
    #
    vlan batch 2 to 3
    #
    traffic classifier name1 type or
     if-match vlan 200
    #
    traffic classifier name2 type or
     if-match vlan 300
    #
    traffic behavior name1
     vlan-mapping vlan 2
    #
    traffic behavior name2
     vlan-mapping vlan 3
    #
    traffic policy name1
     classifier name1 behavior name1 precedence 5
     classifier name2 behavior name2 precedence 10
    #
    interface 10GE1/17/1
     traffic-policy name1 inbound
    #
    return
  • Configuration file of Switch3

    #
    sysname Switch3
    #
    vlan batch 2 to 3
    #
    traffic classifier name1 type or
     if-match vlan 2
    #
    traffic classifier name2 type or
     if-match vlan 3
    #
    traffic behavior name1
     vlan-mapping vlan 200
    #
    traffic behavior name2
     vlan-mapping vlan 300
    #
    traffic policy name1
     classifier name1 behavior name1 precedence 5
     classifier name2 behavior name2 precedence 10
    #
    interface 10GE1/17/2
     traffic-policy name1 inbound
    #
    return
  • Configuration file of Switch4

    #
    sysname Switch4
    #
     vlan batch 200 300
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 200 300
    #
    interface 10GE1/17/2
     port default vlan 200
    #
    interface 10GE1/17/3
     port default vlan 300
    #
    return
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 58847

Downloads: 3621

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