Configuring one-to-two VLAN mapping
Configure one-to-two VLAN mapping on the customer-side ports of edge devices from which customer traffic enters SP networks, for example, on PEs 1 and 4 in Figure 80. One-to-two VLAN mapping enables the edge devices to add an SVLAN tag to each incoming packet.
Before you configure one-to-two VLAN mapping, create the CVLAN and the SVLAN.
The MTU of an interface is 1500 bytes by default. After a VLAN tag is added to a packet, the packet length is added by 4 bytes. As a best practice, set the MTU to a minimum of 1504 bytes for ports on the forwarding path of the packet in the service provider network.
To configure one-to-two VLAN mapping:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view. |
| N/A |
3. Set the link type of the port. |
| By default, the link type of a port is access. |
4. Assign the port to the CVLANs. |
| N/A |
5. Configure the port to allow packets from the SVLAN to pass through untagged. |
| N/A |
6. Configure a one-to-two VLAN mapping. | vlan mapping nest { range vlan-range-list | single vlan-id-list } nested-vlan vlan-id | By default, no VLAN mapping is configured on an interface. Only one SVLAN tag can be added to packets from the same CVLAN. To add different SVLAN tags to different CVLAN packets, set the port link type to hybrid and repeat this command. |