Configuration Guide Vol. 1


27.4.2 Configuring Tag Translation

The figure below shows how tag translation is set. In the configuration in this example, port 1/0/2 is set.

In this example configuration, tag translation is applied to port 1/0/2. On port 1/0/2, I/O for VLAN 100 frames is performed using VLAN tag 1000, and I/O for VLAN 200 frames is performed using VLAN tag 100. This way, when tag translation is performed for VLAN 100, VLAN tag 100 can also be used for other VLANs. Also, VLAN tag 200 frames can be discarded as unset VLAN tags on port 1/0/2, instead of being handled as VLAN 200.

Figure 27-3 Example of Tag conversion setting

[Figure Data]

Points to note

Tag translation works by enabling the tag translation functionality, and setting the ID to be converted. Tag translation settings only take effect for trunk ports.

Tag translation is set by the switchport vlan mapping command. Tag translation is enabled by the switchport vlan mapping enable command. When tag translation is enabled, frame I/O is stopped for VLANs for which translation is not set for the port.

Command examples

  1. (config)# interface gigabitethernet 1/0/2

    (config-if)# switchport mode trunk

    (config-if)# switchport trunk allowed vlan 100,200

    Sets port 1/0/2 for the trunk port, and sets VLANs 100 and 200.

  2. (config-if)# switchport vlan mapping 1000 100

    (config-if)# switchport vlan mapping 100 200

    Sets tag translation on port 1/0/2 for VLANs 100 and 200. This sequence sets frames to be sent and received with VLAN tag 1000 on VLAN 100, and sent and received with VLAN tag 100 on VLAN 200.

  3. (config-if)# switchport vlan mapping enable

    Enables tag translation on port 1/0/2. Tag translation is not enabled until this command is set.

Notes

Tag translation must be set on all VLANs of the ports for which tag translation is used. For VLANs for which translation is not performed, set translation to be performed to the same value.

Set the same VLAN Tag of VLAN ID for VLAN and VLAN Tag that are converted by Tag conversion. Therefore, if the ports are different but the same VLAN is used, set the same VLAN ID.