Example for Configuring VLAN ID-based Selective QinQ

57 0 0 0

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 6-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 6-21  Networking of VLAN ID-based selective QinQ 
imgDownload?uuid=7a48ac33462b4c5fbb60760

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.

    imgDownload?uuid=6fc5bd260d604fc391e73e2 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

See more please click 

https://support.huawei.com/enterprise/en/doc/EDOC1000069520/9aadccc0/comprehensive-configuration-examples


  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login