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

S12700 V200R012C00 Configuration Guide - Ethernet Switching

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, 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 Flow-based Selective QinQ

Example for Configuring Flow-based Selective QinQ

Networking Requirements

As shown in Figure 10-13, Internet access users (using PCs) and VoIP users (using VoIP terminals) connect to a carrier network through SwitchA and SwitchB. These users communicate with each other through the carrier network.

Packets from PCs and VoIP terminals need to be transmitted over the carrier network in VLAN 2 and VLAN 3 respectively.

You can configure a traffic policy to implement selective QinQ on SwitchA and SwitchB.

Figure 10-13  Networking for configuring flow-based selective QinQ

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create VLANs on SwitchA and SwitchB.

  2. Configure traffic classifiers and traffic behaviors, and bind them to a traffic policy on SwitchA and SwitchB.

  3. Configure types of interfaces on SwitchA and SwitchB, and add the interfaces to VLANs.

  4. Apply the traffic policy to interfaces on SwitchA and SwitchB to implement selective QinQ.

Procedure

  1. Create VLANs.

    # On SwitchA, create VLAN 2 and VLAN 3, that is, VLAN IDs in the outer VLAN tags to be added.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 2 3

    # On SwitchB, create VLAN 2 and VLAN 3, that is, VLAN IDs in the outer VLAN tags to be added.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] vlan batch 2 3

  2. Configure a traffic policy on SwitchA and SwitchB.

    Configure traffic classifiers, traffic behaviors, and a traffic policy on SwitchA.

    [SwitchA] traffic classifier name1
    [SwitchA-classifier-name1] if-match vlan-id 100 to 200
    [SwitchA-classifier-name1] quit
    [SwitchA] traffic behavior name1
    [SwitchA-behavior-name1] add-tag vlan-id 2
    [SwitchA-behavior-name1] quit
    [SwitchA] traffic classifier name2
    [SwitchA-classifier-name2] if-match vlan-id 300 to 400
    [SwitchA-classifier-name2] quit
    [SwitchA] traffic behavior name2
    [SwitchA-behavior-name2] add-tag vlan-id 3
    [SwitchA-behavior-name2] quit
    [SwitchA] traffic policy name1
    [SwitchA-trafficpolicy-name1] classifier name1 behavior name1
    [SwitchA-trafficpolicy-name1] classifier name2 behavior name2
    [SwitchA-trafficpolicy-name1] quit
    

    # Configure traffic classifiers, traffic behaviors, and a traffic policy on SwitchB.

    [SwitchB] traffic classifier name1
    [SwitchB-classifier-name1] if-match vlan-id 100 to 200
    [SwitchB-classifier-name1] quit
    [SwitchB] traffic behavior name1
    [SwitchB-behavior-name1] add-tag vlan-id 2
    [SwitchB-behavior-name1] quit
    [SwitchB] traffic classifier name2
    [SwitchB-classifier-name2] if-match vlan-id 300 to 400
    [SwitchB-classifier-name2] quit
    [SwitchB] traffic behavior name2
    [SwitchB-behavior-name2] add-tag vlan-id 3
    [SwitchB-behavior-name2] quit
    [SwitchB] traffic policy name1
    [SwitchB-trafficpolicy-name1] classifier name1 behavior name1
    [SwitchB-trafficpolicy-name1] classifier name2 behavior name2
    [SwitchB-trafficpolicy-name1] quit
    

  3. Apply the traffic policy to interfaces on SwitchA and SwitchB to implement selective QinQ.

    # Configure GE 1/0/1 on SwitchA.

    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] port link-type hybrid
    [SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 2 3
    [SwitchA-GigabitEthernet1/0/1] traffic-policy name1 inbound
    [SwitchA-GigabitEthernet1/0/1] quit

    # Configure GE 1/0/1 on SwitchB.

    [SwitchB] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] port link-type hybrid
    [SwitchB-GigabitEthernet1/0/1] port hybrid untagged vlan 2 3
    [SwitchB-GigabitEthernet1/0/1] traffic-policy name1 inbound
    [SwitchB-GigabitEthernet1/0/1] quit

  4. Configure other interfaces.

    # Add GE 1/0/2 on SwitchA to VLAN 2 and VLAN 3.

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

    # Add GE 1/0/2 on SwitchB to VLAN 2 and VLAN 3.

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

  5. Verify the configuration.

    If the configurations on SwitchA and SwitchB are correct, the following situations occur:

    • PCs can communicate with each other through the carrier network.

    • VoIP terminals can communicate with each other through the carrier network.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 2 to 3
    #
    traffic classifier name1 operator or precedence 5
     if-match vlan-id 100 to 200
    traffic classifier name2 operator or precedence 10
     if-match vlan-id 300 to 400
    #
    traffic behavior name1
     permit
     add-tag vlan-id 2
    traffic behavior name2
     permit
     add-tag vlan-id 3
    #
    traffic policy name1 match-order config
     classifier name1 behavior name1
     classifier name2 behavior name2
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid untagged vlan 2 to 3
     traffic-policy name1 inbound
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 2 to 3
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 2 to 3
    #
    traffic classifier name1 operator or precedence 5
     if-match vlan-id 100 to 200
    traffic classifier name2 operator or precedence 10
     if-match vlan-id 300 to 400
    #
    traffic behavior name1
     permit
     add-tag vlan-id 2
    traffic behavior name2
     permit
     add-tag vlan-id 3
    #
    traffic policy name1 match-order config
     classifier name1 behavior name1
     classifier name2 behavior name2
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid untagged vlan 2 to 3
     traffic-policy name1 inbound
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 2 to 3
    #
    return
Translation
Download
Updated: 2019-01-18

Document ID: EDOC1100038103

Views: 125417

Downloads: 52

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