Overview of VLAN Mapping
Definition
VLAN mapping technology changes VLAN tags in packets to implement the mapping between different VLANs.
Purpose
In some scenarios, two Layer 2 user networks in the same VLAN are connected through the backbone network. To implement Layer 2 connectivity between users and deploy Layer 2 protocols such as MSTP uniformly, the two user networks need to seamlessly interwork with each other. In this case, the backbone network needs to transmit VLAN packets from the user networks. Generally, VLAN plan on the backbone network and user network is different, so the backbone network cannot directly transmit VLAN packets from a user network.
One method is to configure a Layer 2 tunneling technology such as QinQ or VPLS to encapsulate VLAN packets into packets on the backbone network so that VLAN packets are transparently transmitted. However, this method increases extra cost because packets are encapsulated. In addition, Layer 2 tunneling technology may not support transparent transmission of packets of some protocol packets. The other method is to configure VLAN mapping. When VLAN packets from a user network enter the backbone network, an edge device on the backbone network changes the C-VLAN ID to the S-VLAN ID. After the packets are transmitted to the other side, the edge device changes the S-VLAN ID to the C-VLAN ID. This method implements seamless interworking between two user networks.
VLAN IDs in two directly connected Layer 2 networks are different because of different plans. The user needs to manage the two networks as a single Layer 2 network. For example, Layer 2 connectivity and Layer 2 protocols need to be deployed uniformly. VLAN mapping can be configured on the switch connecting the two user networks to map VLAN IDs on the two user networks. This implements Layer 2 connectivity and uniform management.