802.1Q (dot1Q) tunneling (Q-in-Q) is commonly used by service providers on metro Ethernet access networks. The protocol extensions are defined in IEEE 802.1ad. A ‘service’ dot1Q tag is used on the service provider network to segregate traffic into different VLANs defined by the Service Provider. The original ‘customer’ dot1q tag of the packet is transmitted transparently.
NOTE: Q-in-Q is supported on the EX-series Switch starting from JUNOS software release 9.3 and above.Setup/Topology : SW1 SW2 SW3 SW4 PC1 -------------[EX1]-------------[EX2]+++++++++++[EX3] -------------------[EX4]---------PC2 vlan 2 vlan100 vlan 100 vlan 2 Configuration SW1: set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members vlan2set interfaces ge-0/0/3 unit 0 family ethernet-switching vlan members vlan2set vlans vlan2 vlan-id 2SW2: set interfaces ge-0/0/1 unit 0 family ethernet-switchingset interfaces ge-0/0/2 mtu 9216set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunkset ethernet-switching-options dot1q-tunneling ether-type 0x8100set vlans cust1 vlan-id 100set vlans cust1 interface ge-0/0/1.0set vlans cust1 interface ge-0/0/2.0set vlans cust1 dot1q-tunneling customer-vlans 1-4000SW3: set interfaces ge-0/0/1 unit 0 family ethernet-switchingset interfaces ge-0/0/2 mtu 9216set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunkset ethernet-switching-options dot1q-tunneling ether-type 0x8100set vlans cust1 vlan-id 100set vlans cust1 interface ge-0/0/1.0set vlans cust1 interface ge-0/0/2.0set vlans cust1 dot1q-tunneling customer-vlans 1-4000SW4: set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members 2set interfaces ge-0/0/1 unit 0 family ethernet-switching port-mode trunkset interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members 2set vlans vlan2 vlan-id 2NOTE: On the link between SW2 and SW3 set the MTU to the MAX, this is to avoid packet drops exceeding mtu due to Q-in-Q tagging