VLAN Mapping (VLAN Translation) on Juniper

vlan-translation-single-tag

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 configure VLAN Mapping on Juniper devices.

 

You can also check Cisco VLAN Configuration on Packet Tracer example before this configuration example.

 

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.

 

vlan mapping (translation) single tag
VLAN Mapping (Translation) – Single Tag
 

The VLAN Mapping 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.

vlan mapping (translation) double tag
VLAN Mapping (Translation) – Double 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. Keep on, ipcisco.com.

 

 

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)

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest Blog Posts