Le QinQ sélectif, également appelé empilement de VLAN ou QinQ, est implémenté en fonction d'interfaces et de VLAN.
Configurez le périphérique pour qu'il identifie le VLAN 2 dans la balise externe des paquets avec les VLAN 100 à 200 dans les balises internes, puis qu'il balise le VLAN 3 dans la balise externe des paquets avec les VLAN 300 à 400 et qu'il transmet de manière transparente les paquets du VLAN 1000.
- Configurez le QinQ sélectif sur un commutateur fixe.# Create VLAN 2, VLAN 3, and VLAN 1000.
<HUAWEI> system-view[HUAWEI] vlan batch 2 3 1000
# Configure downlink interface GE0/0/1.[HUAWEI] interface gigabitethernet0/0/1[HUAWEI-GigabitEthernet0/0/1] port link-type hybrid [HUAWEI-GigabitEthernet0/0/1] qinq vlan-translation enable //VLAN translation must be enabled on the fixed device. [HUAWEI-GigabitEthernet0/0/1] port hybrid untagged vlan 2 3 //The interface joins VLAN 2 and VLAN 3 in untagged mode. [HUAWEI-GigabitEthernet0/0/1] port hybrid tagged vlan 1000 //The interface transparently transmits packets tagged with VLAN 1000. [HUAWEI-GigabitEthernet0/0/1] port vlan-stacking vlan 100 to 200 stack-vlan 2 //The interface adds VLAN 2 in the outer tag of packets with VLANs 100 to 200 in inner tags. [HUAWEI-GigabitEthernet0/0/1] port vlan-stacking vlan 300 to 400 stack-vlan 3 //The interface adds VLAN 3 in the outer tag of packets with VLANs 300 to 400 in inner tags. [HUAWEI-GigabitEthernet0/0/1] port vlan-mapping vlan 1000 map-vlan 1000 //The S5700EI, S3700EI, and S3700SI must be configured to map the VLAN to itself from which single-tagged packets need to be transparently transmitted. [HUAWEI-GigabitEthernet0/0/1] quit
# Configure uplink interface GE0/0/5 to transparently transmit packets from VLAN 2, VLAN 3, and VLAN 1000.
[HUAWEI] interface gigabitethernet0/0/5 [HUAWEI-GigabitEthernet0/0/5] port link-type trunk[HUAWEI-GigabitEthernet0/0/5] port trunk allow-pass vlan 2 3 1000
- Configurez QinQ sélectif sur un commutateur modulaire.# Create VLAN 2, VLAN 3, and VLAN 1000.
<HUAWEI> system-view[HUAWEI] vlan batch 2 3 1000
# Configure downlink interface GE1/0/1.[HUAWEI] interface gigabitethernet1/0/1[HUAWEI-GigabitEthernet1/0/1] port link-type hybrid [HUAWEI-GigabitEthernet1/0/1] port hybrid untagged vlan 2 3 //The interface joins VLAN 2 and VLAN 3 in untagged mode. [HUAWEI-GigabitEthernet1/0/1] port hybrid tagged vlan 1000 //The interface transparently transmits packets tagged with VLAN 1000. [HUAWEI-GigabitEthernet1/0/1] port vlan-stacking vlan 100 to 200 stack-vlan 2 //The interface adds VLAN 2 in the outer tag of packets with VLANs 100 to 200 in inner tags. [HUAWEI-GigabitEthernet1/0/1] port vlan-stacking vlan 300 to 400 stack-vlan 3 //The interface adds VLAN 3 in the outer tag of packets with VLANs 300 to 400 in inner tags. [HUAWEI-GigabitEthernet1/0/1] port vlan-mapping vlan 1000 map-vlan 1000 //The ES0D0G24SA00 and ES0D0G24CA00 cards of the S7700, and EH1D2S24CSA0 and EH1D2G24SSA0 cards of the S9700 must be configured to map the VLAN to itself from which single-tagged packets need to be transparently transmitted. [HUAWEI-GigabitEthernet1/0/1] quit
# Configure uplink interface GE2/0/1 to transparently transmit packets from VLAN 2, VLAN 3, and VLAN 1000.
[HUAWEI] interface gigabitethernet2/0/1 [HUAWEI-GigabitEthernet2/0/1] port link-type trunk[HUAWEI-GigabitEthernet2/0/1] port trunk allow-pass vlan 2 3 1000
Pour plus d'information: S Series Switches Common Operation Guide