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

Configuration Guide - Ethernet Switching

S7700 and S9700 V200R012C00

This document describes the configuration of Ethernet services, including configuring MAC address table, link aggregation, VLANs, VLAN aggregation, MUX VLAN, VLAN termination, Voice VLAN, VLAN mapping, QinQ, GVRP, VCMP, STP/RSTP/MSTP, VBST, SEP, RRPP, ERPS, LBDT, HVRP, and Layer 2 protocol transparent transmission.
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).
Example for Configuring Traffic Policy-based 2:2 VLAN Mapping

Example for Configuring Traffic Policy-based 2:2 VLAN Mapping

Networking Requirements

In Figure 11-9, enterprises A and B have planned their own C-VLAN IDs. These IDs are different to the S-VLAN IDs in the packets, which means that the primary interface discards the packets. To solve this problem, configure VLAN mapping at the user side to ensure the communication between enterprise A and enterprise B.

Figure 11-9  Networking diagram for configuring 2:2 VLAN mapping

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create outer VLANs on SwitchA, SwitchB, SwitchC, and SwitchD.

  2. Create classes, traffic behaviors, and traffic policies on SwitchA and SwitchB.

  3. Add interfaces on SwitchA, SwitchB, SwitchC, and SwitchD to their own VLANs.

  4. Configure traffic policy-based VLAN mapping of double tags on GE1/0/1 of SwitchA.

  5. Configure traffic policy-based VLAN mapping of double tags on GE1/0/2 of SwitchB.

Procedure

  1. Configure VLANs.

    # Create VLAN 100 and VLAN 300 on SwitchA.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 100 300

    # Create VLAN 200 and VLAN 300 on SwitchB.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] vlan batch 200 300

    # Create VLAN 300 on SwitchC.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchC
    [SwitchC] vlan batch 300

    # Create VLAN 300 on SwitchD.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchD
    [SwitchD] vlan batch 300

  2. Add interfaces to VLANs.

    # Add GE1/0/1 of SwitchA to VLAN 100 and VLAN 300.

    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] port link-type trunk
    [SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 300
    [SwitchA-GigabitEthernet1/0/1] quit

    # Add GE1/0/2 of SwitchB to VLAN 200 and VLAN 300.

    [SwitchB] interface gigabitethernet 1/0/2
    [SwitchB-GigabitEthernet1/0/2] port link-type trunk
    [SwitchB-GigabitEthernet1/0/2] port trunk allow-pass vlan 200 300
    [SwitchB-GigabitEthernet1/0/2] quit

    # Add GE1/0/1 of SwitchC to VLAN 300.

    [SwitchC] interface gigabitethernet 1/0/1
    [SwitchC-GigabitEthernet1/0/1] port link-type trunk
    [SwitchC-GigabitEthernet1/0/1] port trunk allow-pass vlan 300
    [SwitchC-GigabitEthernet1/0/1] quit

    # Add GE1/0/2 on SwitchD to VLAN 300.

    [SwitchD] interface gigabitethernet 1/0/2
    [SwitchD-GigabitEthernet1/0/2] port link-type trunk
    [SwitchD-GigabitEthernet1/0/2] port trunk allow-pass vlan 300
    [SwitchD-GigabitEthernet1/0/2] quit

  3. Configure traffic classifiers, traffic behaviors, and traffic policies.

    # Configure the traffic classifier, traffic behavior, and traffic policy in the inbound direction of SwitchA.

    [SwitchA] traffic classifier name1 operator and
    [SwitchA-classifier-name1] if-match vlan-id 300
    [SwitchA-classifier-name1] if-match cvlan-id 30
    [SwitchA-classifier-name1] quit
    [SwitchA] traffic behavior name1
    [SwitchA-behavior-name1] remark vlan-id 100
    [SwitchA-behavior-name1] remark cvlan-id 10
    [SwitchA-behavior-name1] quit
    [SwitchA] traffic policy name1
    [SwitchA-trafficpolicy-name1] classifier name1 behavior name1
    [SwitchA-trafficpolicy-name1] quit
    

    # Configure the traffic classifier, traffic behavior, and traffic policy in the outbound direction of SwitchA.

    [SwitchA] traffic classifier name2 operator and
    [SwitchA-classifier-name2] if-match vlan-id 100
    [SwitchA-classifier-name2] if-match cvlan-id 10
    [SwitchA-classifier-name2] quit
    [SwitchA] traffic behavior name2
    [SwitchA-behavior-name2] remark vlan-id 300
    [SwitchA-behavior-name2] remark cvlan-id 30
    [SwitchA-behavior-name2] quit
    [SwitchA] traffic policy name2
    [SwitchA-trafficpolicy-name2] classifier name2 behavior name2
    [SwitchA-trafficpolicy-name2] quit
    

    # Configure the traffic classifier, traffic behavior, and traffic policy in the inbound direction of SwitchB.

    [SwitchB] traffic classifier name1 operator and
    [SwitchB-classifier-name1] if-match vlan-id 300
    [SwitchB-classifier-name1] if-match cvlan-id 30
    [SwitchB-classifier-name1] quit
    [SwitchB] traffic behavior name1
    [SwitchB-behavior-name1] remark vlan-id 200
    [SwitchB-behavior-name1] remark cvlan-id 20
    [SwitchB-behavior-name1] quit
    [SwitchB] traffic policy name1
    [SwitchB-trafficpolicy-name1] classifier name1 behavior name1
    [SwitchB-trafficpolicy-name1] quit
    

    # Configure the traffic classifier, traffic behavior, and traffic policy in the outbound direction of SwitchB.

    [SwitchB] traffic classifier name2 operator and
    [SwitchB-classifier-name2] if-match vlan-id 200
    [SwitchB-classifier-name2] if-match cvlan-id 20
    [SwitchB-classifier-name2] quit
    [SwitchB] traffic behavior name2
    [SwitchB-behavior-name2] remark vlan-id 300
    [SwitchB-behavior-name2] remark cvlan-id 30
    [SwitchB-behavior-name2] quit
    [SwitchB] traffic policy name2
    [SwitchB-trafficpolicy-name2] classifier name2 behavior name2
    [SwitchB-trafficpolicy-name2] quit
    

  4. Configure traffic policy-based VLAN mapping of double tags.

    # Configure traffic policy-based VLAN mapping of double tags on GE1/0/1 of SwitchA.

    [SwitchA] interface GigabitEthernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] traffic-policy name1 inbound
    [SwitchA-GigabitEthernet1/0/1] traffic-policy name2 outbound
    

    # Configure traffic policy-based VLAN mapping of double tags on GE1/0/2 of SwitchB.

    [SwitchB] interface GigabitEthernet 1/0/2
    [SwitchB-GigabitEthernet1/0/2] traffic-policy name1 inbound
    [SwitchB-GigabitEthernet1/0/2] traffic-policy name2 outbound
    

  5. Verify the configurations.

    Verify that users of enterprise A and enterprise B can communicate with each other.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 100 300
    #
    traffic classifier name1 operator and precedence 5
     if-match vlan-id 300
     if-match cvlan-id 30
    traffic classifier name2 operator and precedence 10
     if-match vlan-id 100
     if-match cvlan-id 10
    #
    traffic behavior name1
     permit
     remark vlan-id 100
     remark cvlan-id 10
    traffic behavior name2
     permit
     remark vlan-id 300
     remark cvlan-id 30
    #
    traffic policy name1 match-order config
     classifier name1 behavior name1
    traffic policy name2 match-order config
     classifier name2 behavior name2
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 100 300
     traffic-policy name1 inbound
     traffic-policy name2 outbound
    #
    return 
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 200 300
    #
    traffic classifier name1 operator and precedence 5
     if-match vlan-id 300
     if-match cvlan-id 30
    traffic classifier name2 operator and precedence 10
     if-match vlan-id 200
     if-match cvlan-id 20
    #
    traffic behavior name1
     permit
     remark vlan-id 200
     remark cvlan-id 20
    traffic behavior name2
     permit
     remark vlan-id 300
     remark cvlan-id 30
    #
    traffic policy name1 match-order config
     classifier name1 behavior name1
    traffic policy name2 match-order config
     classifier name2 behavior name2
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 200 300
     traffic-policy name1 inbound
     traffic-policy name2 outbound
    #
    return 
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    vlan batch 300
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    return 
  • SwitchD configuration file

    #
    sysname SwitchD
    #
    vlan batch 300
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    return 
Translation
Download
Updated: 2019-01-18

Document ID: EDOC1100038843

Views: 109929

Downloads: 72

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