254
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 on the service provider network.
Examples
# Configure a one-to-one VLAN mapping on GigabitEthernet 1/0/1 to map VLAN 1 to VLAN 101.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] vlan mapping 1 translated-vlan 101
# Configure many-to-one VLAN mappings on the customer-side port (GigabitEthernet 1/0/2) to map
VLANs 1 through 50 and VLAN 80 to VLAN 101. Configure the network-side port (GigabitEthernet
1/0/3) to use the original VLAN tags of the many-to-one mappings to replace the VLAN tags of the
packets destined for the user network.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/2
[Sysname-GigabitEthernet1/0/2] vlan mapping uni range 1 to 50 translated-vlan 101
[Sysname-GigabitEthernet1/0/2] vlan mapping uni single 80 translated-vlan 101
[Sysname-GigabitEthernet1/0/2] quit
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] vlan mapping nni
# Configure one-to-two VLAN mappings on GigabitEthernet 1/0/4 to add SVLAN tag 101 to packets
carrying VLAN tags 1 through 10 and VLAN tag 80.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/4
[Sysname-GigabitEthernet1/0/4] vlan mapping nest range 1 to 10 nested-vlan 101
[Sysname-GigabitEthernet1/0/4] vlan mapping nest single 80 nested-vlan 101
# Configure a two-to-two VLAN mapping on GigabitEthernet 1/0/5 to map SVLAN 101 and CVLAN 1
to SVLAN 201 and CVLAN 10.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/5
[Sysname-GigabitEthernet1/0/5] vlan mapping tunnel 101 1 translated-vlan 201 10
Related commands
display vlan mapping