Configuring VLAN-based VLAN Mapping
Context
VLAN mapping allows an interface to map the single VLAN tag or double VLAN tags to the public VLAN tag.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
- Configure the link type of the interface as trunk or hybrid.
VLAN mapping can only be configured on a trunk or hybrid interface. The interface must be added to the VLAN after mapping in tagged mode.
Run either of the following commands as needed:
Set the link type of the interface to trunk.
Run port link-type trunk
The link type of the interface is set to trunk.
Run port trunk allow-pass vlan { vlan-id1 [ to vlan-id2 ] } &<1-40>
The VLAN allowed by the interface configured with VLAN mapping is specified. Here, the VLAN is the one after VLAN mapping.
Set the link type of the interface to hybrid.
Run port link-type hybrid
The link type of the interface is set to hybrid.
Run port hybrid tagged vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>
The VLAN allowed by the interface configured with VLAN mapping is specified. Here, the VLAN is the one after VLAN mapping.
- Configure VLAN mapping.
Run the following command as required.
If the trill enable command has been executed, delete the trill enable command configuration before running the port vlan-mapping command.
In a dual-active VXLAN access scenario where QinQ termination sub-interfaces are configured, you cannot configure 2:1 VLAN mapping.
Configure 1 to 1 VLAN mapping.
Run port vlan-mapping vlan vlan-id1 map-vlan vlan-id3
The interface is configured to map a single tag of packets to a specified tag.
Configure 2 to 1 VLAN mapping. (CE12800E that has the FD-X series cards installed does not support 2 to 1 VLAN mapping.)
Run port vlan-mapping vlan vlan-id1 inner-vlan vlan-id2 map-single-vlan vlan-id4
The interface is configured to map double tags of packets to a specified tag.
- Run commit
The configuration is committed.