< Home

Example for Configuring Selective QinQ and VLAN Mapping

Networking Requirements

As shown in Figure 1, Internet access, IPTV, and VoIP services are provided for users through home gateways.

The corridor switches allocate VLANs to the services as follows:

  • VLANs for the Internet access service of PC users: VLAN 1000 to VLAN 1100
  • Shared VLAN for the IPTV service: VLAN 1101
  • Shared VLAN for the VoIP service: VLAN 1102
  • Shared VLAN for home gateways: VLAN 1103

Each community switch is connected to 50 downstream corridor switches, and maps VLAN IDs in packets of the Internet access service from the corridor switches to VLANs 101-150.

The aggregation switch (SwitchA) of the carrier is connected to 50 downstream community switches, and adds outer VLAN IDs 21-70 to packets sent from the community switches.

Figure 1 Networking for configuring selective QinQ and VLAN mapping

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create VLANs on SwitchA and SwitchB.

  2. Configure VLAN mapping on SwitchB and add GE0/0/1 and GE0/0/2 to VLANs.

  3. Configure selective QinQ on SwitchA and add GE0/0/1 to VLANs.

  4. Add other downlink interfaces on SwitchA and SwitchB to VLANs. The configuration procedure is similar to that for GE0/0/1 and is not mentioned here.

  5. Configure other community switches. The configuration procedure is similar to that for SwitchB and is not mentioned here.

Procedure

  1. Configure SwitchA.

    # Create VLANs.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 21 to 70 1101 to 1103

    # Add downlink interface gigabitethernet0/0/1 to the VLANs.

    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/1] port hybrid untagged vlan 21
    [SwitchA-GigabitEthernet0/0/1] port hybrid tagged vlan 1101 to 1103
    [SwitchA-GigabitEthernet0/0/1] quit

    # Configure selective QinQ on gigabitethernet0/0/1.

    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] qinq vlan-translation enable
    [SwitchA-GigabitEthernet0/0/1] port vlan-stacking vlan 101 to 150 stack-vlan 21
    [SwitchA-GigabitEthernet0/0/1] quit

  2. Configure SwitchB.

    # Create VLANs.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] vlan batch 101 to 150 1000 to 1103

    # Add GE0/0/1 and GE0/0/2 to the VLANs.

    [SwitchB] interface gigabitethernet 0/0/1
    [SwitchB-GigabitEthernet0/0/1] port link-type hybrid
    [SwitchB-GigabitEthernet0/0/1] port hybrid tagged vlan 101 1000 to 1103
    [SwitchB-GigabitEthernet0/0/1] quit
    [SwitchB] interface gigabitethernet 0/0/2
    [SwitchB-GigabitEthernet0/0/2] port link-type hybrid
    [SwitchB-GigabitEthernet0/0/2] port hybrid tagged vlan 101 to 150 1101 to 1103
    [SwitchB-GigabitEthernet0/0/2] quit

    # Configure VLAN mapping on gigabitethernet0/0/1.

    [SwitchB] interface gigabitethernet 0/0/1
    [SwitchB-GigabitEthernet0/0/1] qinq vlan-translation enable
    [SwitchB-GigabitEthernet0/0/1] port vlan-mapping vlan 1000 to 1100 map-vlan 101
    [SwitchB-GigabitEthernet0/0/1] quit

  3. Verify the configuration.

    The Internet access service, IPTV service, and VoIP service are available.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 21 to 70 1101 to 1103
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     qinq vlan-translation enable
     port hybrid tagged vlan 1101 to 1103
     port hybrid untagged vlan 21
     port vlan-stacking vlan 101 to 150 stack-vlan 21 
    #
    return
    
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 101 to 150 1000 to 1103
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     qinq vlan-translation enable
     port hybrid tagged vlan 101 1000 to 1103
     port vlan-mapping vlan 1000 to 1100 map-vlan 101
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid tagged vlan 101 to 150 1101 to 1103
    #
    return
    
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >