The qinq mapping vid map-vlan command configures 1 to 1 QinQ mapping on a sub-interface.
The undo qinq mapping vid map-vlan command cancels the configuration.
By default, 1 to 1 QinQ mapping is not configured on a sub-interface.
qinq mapping vid vlan-id1 [ to vlan-id2 ] map-vlan vid vlan-id3
undo qinq mapping vid vlan-id1 [ to vlan-id2 ] map-vlan vid vlan-id3
Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support this configuration.
Parameter |
Description |
Value |
---|---|---|
vid vlan-id1 to vlan-id2 |
Specifies the VLAN ID of the tag carried in the received packet.
|
vlan-id1 is an integer that ranges from 2 to 4094. vlan-id2 is an integer that ranges from 2 to 4094. |
map-vlan vid vlan-id3 |
Specifies the VLAN ID in the mapped outer tag. |
The value is an integer that ranges from 1 to 4094. |
GE sub-interface view, XGE sub-interface view, 25GE sub-interface view, 40GE sub-interface view, 100GE sub-interface view, VE sub-interface view, Eth-Trunk sub-interface view, MultiGE sub-interface view
Usage Scenario
QinQ mapping is often deployed on edge devices of a metro Ethernet and is used to map the frames sent from the user side. The devices map the VLAN IDs in user packets to specified VLAN IDs before forwarding the packets to the public network. QinQ mapping can be applied to the following scenarios:
The VLAN IDs deployed in new sites and old sites conflict, but new sites need to communicate with old sites.
The VLAN ID planning of each site on the public network is different. As a result, the VLAN IDs conflict. However, the sites do not need to communicate.
The VLAN IDs on both ends of the public network are different.
QinQ mapping on a sub-interface is mainly used to access the L2VPN.
QinQ mapping used on the main interface is used for interconnection on the Layer 2 MAN so that users of different VLANs can communicate with each other.
QinQ mapping saves a large number of physical ports.
Precautions
The qinq mapping vid map-vlan command maps the single tags in frames on a sub-interface. This command takes effect only for incoming packets.
The original VLAN IDs specified for QinQ mapping on a sub-interface cannot be globally created or displayed by display commands.
VLAN mapping or VLAN stacking cannot be configured for the same VLAN on the main interface and its sub-interfaces.
The mapped VLAN IDs specified in QinQ mapping configuration must be different from the control VLAN IDs for ring protocols such as SEP, RRPP, and ERPS. Otherwise, an error message will be displayed, indicating that the configuration fails.
# Configure QinQ mapping on XGigabitEthernet0/0/1.1 to map outer VLAN tag 100 to inner VLAN tag 200.
<HUAWEI> system-view [HUAWEI] vcmp role silent [HUAWEI] interface xgigabitethernet 0/0/1 [HUAWEI-XGigabitEthernet0/0/1] port link-type hybrid [HUAWEI-XGigabitEthernet0/0/1] quit [HUAWEI] interface xgigabitethernet 0/0/1.1 [HUAWEI-XGigabitEthernet0/0/1.1] qinq mapping vid 100 map-vlan vid 200