VLAN Mapping (VLAN Translation) on Cisco

vlan-translation-cvlan-and-svlan

On Cisco devices, VLAN mapping term is used for mentioning the swap of incoming VLAN id to a new VLAN id. In the below configuration examples, we will see Cisco configuration for this swapping. Lets check this configuration for a Cisco switch. The related congfiguration steps are:

Switch# configure terminal
Switch(config)# interface interface-id
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport vlan mapping vlan-id translated-id
Switch(config-if)# end

And to verify, the below command scan be used:

Switch# show vlan mapping
Switch# copy running-config startup-config

As an example, we can configure the customer 10,20,30 and 40 VLANs(C-VLAN s) to the Service provider vlans(S-VLAN s),110,120,130 and 140.

Switch(config)# interface gigabiethernet 0/1
Switch(config-if)# switchport vlan mapping 10 110
Switch(config-if)# switchport vlan mapping 20 120
Switch(config-if)# switchport vlan mapping 30 130
Switch(config-if)# switchport vlan mapping 40 140
Switch(config-if)# exit

vlan mapping (translation) cVLAN and sVLAN
 
VLAN Mapping CVLAN SVLAN

Other VLAN Mapping Lessons :

VLAN Mapping (VLAN Translation) – Part 1
VLAN Mapping (VLAN Translation) on Cisco IOS – Part 2
VLAN Mapping (VLAN Translation) on Juniper JUNOS – Part 3

Other VLAN Lessons :

VLAN – Part 1
VLAN – Part 2 (VLAN Assignments and VLAN Port Types)
VLAN – Part 3 (VLAN Frame Tagging Protocols, ISL and Dot1.q)
VLAN – Part 4 (How to Configure Cisco VLANs)
VLAN – Part 5 (Packet Tracer VLAN Configuration Example)

2 Responses to “VLAN Mapping (VLAN Translation) on Cisco”


  • Mark / Reply

    Hi Gokhan,
    Thanks for the explanation, just a quick question, do we need to configure vlan mapping from S-Vlan to C-Vlan as well ? or just from C-Vlan to S-Vlan ?? Below is an example:

    Switch(config)# interface gigabiethernet 0/1
    Switch(config-if)# switchport vlan mapping 10 110
    Switch(config-if)# switchport vlan mapping 20 120
    Switch(config-if)# switchport vlan mapping 30 130
    Switch(config-if)# switchport vlan mapping 40 140
    Switch(config-if)# exit

    Should we add below configuration ?

    Switch(config)# interface gigabiethernet x
    Switch(config-if)# switchport vlan mapping 110 10
    Switch(config-if)# switchport vlan mapping 120 20
    Switch(config-if)# switchport vlan mapping 130 30
    Switch(config-if)# switchport vlan mapping 140 40
    Switch(config-if)# exit

  • Hugues / Reply

    It is highly rocemmended to NEVER put a trunk port in spanning-tree portfast to prevent broadcast storms and Cisco switches will not put a trunk port in portfast mode anyway so this line is useless in this case.

Leave a Reply


Contact

  • info@ipcisco.com
IPCisco is the Winner! “Best Certification Study Journey of 2019!”

Cisco-ITBlogAwards-2019-Winner-IPCisco-k