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

S2700, S3700, S5700, S6700, S7700, and S9700 Series Switches Typical Configuration Examples

This document provides examples for configuring features in typical usage scenarios.
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 VLAN ID-based Selective QinQ

Example for Configuring VLAN ID-based Selective QinQ

QinQ Overview

802.1Q-in-802.1Q (QinQ) expands VLAN space by adding an additional 802.1Q tag to 802.1Q tagged packets. It allows services in a private VLAN to be transparently transmitted over a public network.

Selective QinQ, also called VLAN stacking or QinQ stacking, is an extension of QinQ. Selective QinQ is performed based on interfaces and VLAN IDs. In addition to functions of basic QinQ, selective QinQ takes different actions for packets received by the same interface based on VLANs.

VLAN ID-based selective QinQ adds different outer VLAN tags to packets with different inner VLAN IDs.

Configuration Notes

When configuring selective QinQ on the switch, pay attention to the following points:

  • Before configuring selective QinQ on a fixed switch, you must run the qinq vlan-translation enable command to enable VLAN translation.
  • You are advised to configure selective QinQ on a hybrid interface. Selective QinQ can take effect on the interface only in the inbound direction.
  • The outer VLAN must be created before Selective QinQ is performed.
  • When an interface configured with VLAN stacking needs to remove the outer tag from outgoing frames, the interface must join the VLAN specified by stack-vlan in untagged mode. If the outer VLAN does not need to be removed, the interface must join the VLAN specified by stack-vlan in tagged mode.
  • The device configured with selective QinQ can add only one outer VLAN tag to a frame with an inner VLAN tag on an interface.
  • If only single-tagged packets from a VLAN need to be transparently transmitted, do not specify the VLAN as the inner VLAN of selective QinQ.
  • VLAN mapping (for example, port vlan-mapping vlan 20 map-vlan 20) must be configured to map the VLAN to itself from which single-tagged packets need to be transparently transmitted after selective QinQ is configured on the following cards and devices:
    • ES0D0G24SA00, ES0D0G24CA00, EH1D2G24SSA0, and EH1D2S24CSA0 cards

    • S5700EI, S3700EI, and S3700SI
  • This example applies to all versions of all S series switches.

Networking Requirements

As shown in Figure 7-21, Internet access users (using PCs) and VoIP users (using VoIP phones) connect to the ISP network through SwitchA and SwitchB and communicate with each other through the ISP network.

In the enterprise, VLAN 100 is allocated to PCs and VLAN 300 is allocated to VoIP phones.

It is required that packets of PCs and VoIP phones are tagged VLAN 2 and VLAN 3 respectively when the packets are transmitted through the ISP network.

Figure 7-21  Networking of VLAN ID-based selective QinQ

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create VLANs on SwitchA and SwitchB.

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

  3. Configure selective QinQ on interfaces of SwitchA and SwitchB.

Procedure

  1. Create VLANs.

    # On SwitchA, create VLAN 2 and VLAN 3, that is, VLAN IDs of the outer VLAN tag 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 of the outer VLAN tag to be added.

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

  2. Configure selective QinQ on interfaces.

    NOTE:

    When a fixed switch is used, you must run the qinq vlan-translation enable command in the interface view to enable VLAN translation.

    # Configure GE1/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  //Add the hybrid interface to VLANs in untagged mode.
    [SwitchA-GigabitEthernet1/0/1] port vlan-stacking vlan 100 stack-vlan 2  //Configure the inner VLAN tag as VLAN 100 and add VLAN 2 in the outer VLAN tag.
    [SwitchA-GigabitEthernet1/0/1] port vlan-stacking vlan 300 stack-vlan 3  //Configure the inner VLAN tag as VLAN 300 and add VLAN 3 in the outer VLAN tag.
    [SwitchA-GigabitEthernet1/0/1] quit

    # Configure GE1/0/1 on SwitchB.

    [SwitchB] interface gigabitethernet 1/0/1
    [SwitchB-GigabitEthernet1/0/1] port link-type hybrid
    [SwitchB-GigabitEthernet1/0/1] port hybrid untagged vlan 2 3  //Add the hybrid interface to VLANs in untagged mode.
    [SwitchB-GigabitEthernet1/0/1] port vlan-stacking vlan 100 stack-vlan 2  //Configure the inner VLAN tag as VLAN 100 and add VLAN 2 in the outer VLAN tag.
    [SwitchB-GigabitEthernet1/0/1] port vlan-stacking vlan 300 stack-vlan 3  //Configure the inner VLAN tag as VLAN 300 and add VLAN 3 in the outer VLAN tag.
    [SwitchB-GigabitEthernet1/0/1] quit

  3. Configure other interfaces.

    # Add GE1/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 GE1/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

  4. Verify the configuration.

    If the configurations on SwitchA and SwitchB are correct, you can obtain the following information:

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

    • VoIP phones can communicate with each other through the ISP network.

Configuration Files

  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    vlan batch 2 to 3
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid untagged vlan 2 to 3
     port vlan-stacking vlan 100 stack-vlan 2
     port vlan-stacking vlan 300 stack-vlan 3
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 2 to 3
    #
    return
  • Configuration file of SwitchB

    #
    sysname SwitchB
    #
    vlan batch 2 to 3
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid untagged vlan 2 to 3
     port vlan-stacking vlan 100 stack-vlan 2
     port vlan-stacking vlan 300 stack-vlan 3
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 2 to 3
    #
    return

Related Content

Videos

Configuring QinQ

Download
Updated: 2019-04-20

Document ID: EDOC1000069520

Views: 659678

Downloads: 29821

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