< Home

Example for Configuring QinQ Stacking on a VLANIF Interface

Networking Requirements

As shown in Figure 1, SwitchA is connected to SwitchB through a third-party network. A management VLAN is deployed on SwitchB. The management VLAN ID is the same as the user VLAN ID of SwitchA, and is different from the VLAN ID provided by the carrier. To remotely log in to SwitchB from SwitchA, you can configure VLAN stacking.

Figure 1 Networking for configuring QinQ stacking on a VLANIF interface

To remotely log in to and manage SwitchB from SwitchA, configure QinQ stacking on the VLANIF interface corresponding to the management VLAN on SwitchB.

When configuring QinQ stacking on a VLANIF interface, ensure that the VLANIF interface corresponds to the management VLAN. VLANIF interfaces corresponding to other VLANs do not support QinQ stacking.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure QinQ on SwitchA.

  2. Perform the following configurations on SwitchB:

    1. Create VLAN 10 and configure VLAN 10 as the management VLAN.

    2. Create VLANIF 10.

    3. Configure QinQ stacking on VLANIF 10.

Procedure

  1. Configure SwitchC.

    # Configure SwitchC to allow packets from VLAN 10 to pass through GE0/0/1 and GE0/0/2.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchC
    [SwitchC] vlan batch 10
    [SwitchC] interface gigabitethernet 0/0/1
    [SwitchC-GigabitEthernet0/0/1] port link-type hybrid
    [SwitchC-GigabitEthernet0/0/1] port hybrid tagged vlan 10
    [SwitchC-GigabitEthernet0/0/1] quit
    [SwitchC] interface gigabitethernet 0/0/2
    [SwitchC-GigabitEthernet0/0/2] port link-type hybrid
    [SwitchC-GigabitEthernet0/0/2] port hybrid tagged vlan 10
    [SwitchC-GigabitEthernet0/0/2] quit

  2. Configure SwitchA.

    # Configure QinQ so that the packets sent from SwitchA to SwitchB carry double tags.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 20
    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/1] qinq vlan-translation enable
    [SwitchA-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 20
    [SwitchA-GigabitEthernet0/0/1] port hybrid untagged vlan 20
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface gigabitethernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/2] port hybrid tagged vlan 20
    [SwitchA-GigabitEthernet0/0/2] quit

  3. Configure SwitchB.

    # Configure SwitchB to allow packets from VLAN 20 to pass through GE0/0/2.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] vlan batch 10 20
    [SwitchB] interface gigabitethernet 0/0/2
    [SwitchB-GigabitEthernet0/0/2] port link-type hybrid
    [SwitchB-GigabitEthernet0/0/2] port hybrid tagged vlan 10 20
    [SwitchB-GigabitEthernet0/0/2] quit

    # Configure QinQ stacking.

    [SwitchB] vlan 10
    [SwitchB-vlan10] management-vlan
    [SwitchB-vlan10] quit
    [SwitchB] interface vlanif 10
    [SwitchB-Vlanif10] undo icmp host-unreachable send
    [SwitchB-Vlanif10] qinq stacking vlan 20
    [SwitchB-Vlanif10] ip address 10.10.10.1 24
    [SwitchB-Vlanif10] quit

  4. Verify the configuration.

    You can log in to SwitchB from SwitchA and remotely manage VLAN services on SwitchB.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 20
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     qinq vlan-translation enable
     port hybrid untagged vlan 20
     port vlan-stacking vlan 10 stack-vlan 20
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid tagged vlan 20
    #
    return
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    vlan batch 10
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid tagged vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid tagged vlan 10
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 10 20 
    #
    vlan 10
     management-vlan
    #
    interface Vlanif10
     ip address 10.10.10.1 255.255.255.0
     undo icmp host-unreachable send
     qinq stacking vlan 20
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid tagged vlan 10 20
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic