Configure the N: 1 VLAN Mapping Function
For a port, multiple N:1 VLAN mapping entries can be configured. Each N:1 VLAN mapping entry can be the multiple-to-one relationship, that is, one or more private VLANs can be mapped to a public VLAN.
After the port is configured with N: 1 VLAN mapping, if the VLAN ID of the outermost VLAN tag of the packet matches the entry of N: 1 VLAN mapping, replace the VLAN ID of the outermost VLAN tag of the packet with the specified VLAN ID; if not, the N: 1 VLAN mapping will not process the packet.
Configuration Condition
Before configuring the N:1 VLAN mapping function, ensure that:
- The port link type is configured to the Trunk type or the Hybrid type.
- Configure the port to add the VLAN of the replaced outer VLAN tag to ensure that the packet after replacing the outer VLAN tag can pass.
Configure N: 1 VLAN Mapping Function
Table 4-5 Configure N:1 VLAN mapping function
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Enter the L2 Ethernet interface configuration mode.
|
interface interface-name
|
Either
After you enter the L2 Ethernet interface configuration mode, the subsequent configuration takes effect only on the current port. After you enter the aggregation group configuration mode, the subsequent configuration takes effect only within the aggregation group.
|
Enter the aggregation group configuration mode.
|
link-aggregation link-aggregation-id
|
Enable the N:1 VLAN mapping function
|
vlan dot1q-tunnel mapping n-to-1 enable
|
Mandatory
By default, do not enable the N: 1 VLAN mapping function
|
Configure the entry of N:1 VLAN
mapping
|
vlan dot1q-tunnel mapping n-to-1 former-vlan-list mapping-vlan-id
|
Mandatory
By default, do not configure the entry of N:1 VLAN mapping.
|
-
On one port, the N:1 VLAN mapping function cannot coexist with the following functions: QinQ Evc, basic Qin Q, port-based flexible QINQ, 1:1 VLAN mapping, configure the protocol type of the outer VLAN tags of the port as a non-default value.
- When the port link type is trunk, the PVID cannot be the public VLAN mapped by N: 1 VLAN.
- When the port link type is hybrid, the public VLAN mapped by N:1 VLAN cannot be added in untag mode.