Starting with Junos 10.0, EX3200/EX4200 switches allow the incoming packets’ VLAN tags to be swapped/translated with a new VLAN tag.
How to allow the incoming packets’ VLAN tags to be swapped/translated with a new VLAN tag.
Use the mapping keyword under the interface within the VLAN stanza:
Note : Dot1p values are reserved
A packet received on a physical port is only accepted for processing if the VLAN tags of the received packet match the VLAN tags associated with one of the logical interfaces configured on the physical port. The VLAN tags of the received packet are translated only if they are different than the normalized VLAN tags. For the translation case, the vlan-id or vlan-tags statements specify the normalized VLAN. For this case, the terms "learn VLAN" and "normalized VLAN" can be used interchangeably. Specify the normalized VLAN using one of the following configuration statements:
vlan-id
vlan-tags
VLAN-ID TRANSLATION EXAMPLE WITHOUT "DOT1Q-TUNNELING" KEYWORD
root@access> show configuration vlans vlan-300 { vlan-id 300; interface { ge-0/0/0.0 { mapping { 30 { swap; } } } } }
VLAN-ID TRANSLATION EXAMPLE WITH SINGLE TAGGED FRAME
root@access> show configuration vlans vlan-200 { vlan-id 200; interface { ge-0/0/0.0 { mapping { 20 { swap; } } } } dot1q-tunneling; } vlan-300 { vlan-id 300; interface { ge-0/0/0.0 { mapping { 30 { swap; } } } } dot1q-tunneling; }
VLAN-ID TRANSLATION EXAMPLE WITH DOUBLE TAGGED FRAME