QinQ mapping maps VLAN tags in user packets to specified tags before the user packets are transmitted across the public network.
Before sending local VLAN frames, a sub-interface replaces the tags in the local frames with external VLAN tags.
Before receiving frames from external VLANs, a sub-interface replaces the tags in the external VLANs with local VLAN tags.
QinQ mapping allows a device to map a user VLAN tag to a carrier VLAN tag, shielding different user VLAN IDs in packets.
VLAN IDs deployed at new sites and old sites conflict, but new sites need to communicate with old sites.
VLAN IDs planned by each site on the public network conflict. These sites do not need to communicate.
VLAN IDs on both ends of the public network are asymmetric.
Currently, only 1 to 1 QinQ mapping is supported. When a QinQ mapping-enabled sub-interface receives a single-tagged packet, the sub-interface replaces the VLAN ID in the frame with a specified VLAN ID.
As shown in Figure 1, 1 to 1 QinQ mapping is configured on Sub-interfaces 1 on Switch 2 and Switch 3. If PC1 wants to communicate with PC2:
PC1 sends a frame to Switch 1.
Upon receipt, Switch 1 adds VLAN ID 10 to the frame, and forwards the frame to Switch 2. After Sub-interface1 on Switch 2 receives the frame with VLAN ID 10, Sub-interface 1 on Switch 2 replaces VLAN ID 10 with carrier VLAN ID 50. Interface 2 on Switch 2 then sends the frame with carrier VLAN ID 50 to the Internet service provider (ISP) network.
The ISP network transparently transmits the frame.
After Sub-interface 1 on Switch 3 receives the tagged frame from Switch 2, Sub-interface 1 on Switch 3 replaces the carrier VLAN ID 50 with VLAN ID 30.
PC2 communicates with PC1 in a similar manner.
Table 1 describes the comparison between QinQ mapping and VLAN mapping.
Mapping Type |
Similarity |
Difference |
---|---|---|
1 to 1 |
An interface maps the tag of a received single-tagged frame to the specified tag. |
|