VLAN Mapping (VLAN Translation) – Part 3

VLAN Translation on Juniper Devices

On Juniper devices, VLAN translation term is used for mentioning the swap of incoming VLAN id to a new VLAN id. In the below configuration examples, we will do this job on Juniper devices.

In the first example, we will swap the incoming VLAN 60 tag with the new VLAN 120 tag and incoming VLAN tag 70 with the new VLAN tag 140. The other packets with the different VLAN tag than 60 and 70, will be dropped if there is no other VLAN translation configuration. Only the incoming packets with the VLAN tag 60 and VLAN tag 70 will be passed and they will be swapped with VLAN id 120 and 140.

The configuration of the above scenario is below:

[edit]
Router# set vlans VLAN_120_Outgoing vlan-id 120
[edit]
Router# set interface ge-0/0/0.0 mapping 60 swap
[edit]
Router# set vlans VLAN_140_Outgoing vlan-id 140
[edit]
Router# set interface ge-0/0/0.0 mapping 70 swap

Router# show configuration vlans
vlan-120 {
vlan-id 120;
interface {
ge-0/0/0.0 {
mapping {
60 {
swap;
}
}
}
}
dot1q-tunneling;
}
vlan-140 {
vlan-id 140;
interface {
ge-0/0/0.0 {
mapping {
70 {
swap;
}
}
}
}
dot1q-tunneling;
}

Here, we use “dot1q-tunneling” command because of the fact that there are more than one VLAN. If we make this translation for one VLAN, we do not need this command.

As a second example, we can use a double tagged packets. In this example the configuration is the same. But here, there are two tag, inner and outer. The outher tag will be swapped as tthe previous example. But the inner tag remains. It is used as inner of the frame with the new outher tag.

As mentioned in the above shape, we have a packet that has VLAN tag 60 as outer tag and VLAN 30 as inner tag. And we have another packet that has only one VLAN tag 70. In this example, the doubled tagged packet’s inner tag, VLAN 30 will remain. But the outher VLAN tag, VLAN 60 will be changed with VLAN 120. The other packet has only one VLAN tag, VLAN 70. So, this will translate to the VLAN 140.

The related configuration is below:

[edit]
Router# set vlans VLAN_120_Outgoing vlan-id 120
[edit]
Router# set interface ge-0/0/0.0 mapping 60 swap
[edit]
Router# set vlans VLAN_140_Outgoing vlan-id 140
[edit]
Router# set interface ge-0/0/0.0 mapping 70 swap

Router# show configuration vlans
vlan-120 {
vlan-id 120;
interface {
ge-0/0/0.0 {
mapping {
60 {
swap;
}
}
}
}
dot1q-tunneling;
}
vlan-140 {
vlan-id 140;
interface {
ge-0/0/0.0 {
mapping {
70 {
swap;
}
}
}
}
dot1q-tunneling;
}

In this article series, we have talked about the VLAN mapping (translation) configurations for Cisco and Juniper devices. I hope this article will be useful for you.

VLAN Mapping (VLAN Translation) – Part 2

VLAN Mapping on Cisco Devices

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

Q-in-Q Mapping on a Trunk Port

By default all the packets in a tunnel mapped to the configured S-VLAN . In the example below, VLAN 1 to 4 is configured as allowed VLAN in the trunk. By default this means that these VLAN tagged packets will be allowed by Service Provider.

The related configuration is below:

Switch# configure terminal
Switch(config)# interface gigabiethernet0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan 1-4
Switch(config-if)# end

But we can select the VLAN by selective Q-in-Q. In the below example we configure the mapping for C-VLAN 1-4 to the VLAN 100. Th other traffic than VLAN 1-4 will be dropped.

Switch(config)# interface gigabiethernet0/1
Switch(config-if)# switchport vlan mapping 1-4 dot1q-tunnel 100
Switch(config-if)# exit

To verify, use the below verification command:

Switch# show interfaces gigabiethernet0/1 vlan mapping

VLAN Mapping (VLAN Translation) – Part 1

In the different locations of the customer, the same VLAN tag means the same. But there is a service provider network between the customer locations. Customers and the service provider use different VLAN tags in their networks. So, here there must be VLAN mapping or in other words VLAN translation must be done in the edge of the network.

This two diffferent network’s VLANs are mentioned as C-VLAN and S-VLAN . C-VLAN is thecustomer VLAN and S-VLAN is the service provider VLAN.

In different vendors, VLAN mapping is defined with different words. VLAN mapping term is used with Cisco configuration, VLAN translation is used for Juniper configuration.

In this article, we will check the translation of one VLAN to another VLAN for diffferent vendor’s configurations. This can be mentioned as swapping an incoming VLAN tag with a new VLAN tag.