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:
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.
The configuration roadmap is as follows:
Create VLANs on SwitchA and SwitchB.
Configure VLAN mapping on SwitchB and add GE0/0/1 and GE0/0/2 to VLANs.
Configure selective QinQ on SwitchA and add GE0/0/1 to VLANs.
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.
Configure other community switches. The configuration procedure is similar to that for SwitchB and is not mentioned here.
# 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
# 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
The Internet access service, IPTV service, and VoIP service are available.
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