Description

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.

Solution

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 vlan2
set interfaces ge-0/0/3 unit 0 family ethernet-switching vlan members vlan2
set vlans vlan2 vlan-id 2

SW2:

set interfaces ge-0/0/1 unit 0 family ethernet-switching
set interfaces ge-0/0/2 mtu 9216
set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunk
set ethernet-switching-options dot1q-tunneling ether-type 0x8100
set vlans cust1 vlan-id 100
set vlans cust1 interface ge-0/0/1.0
set vlans cust1 interface ge-0/0/2.0
set vlans cust1 dot1q-tunneling customer-vlans 1-4000

SW3:

set interfaces ge-0/0/1 unit 0 family ethernet-switching
set interfaces ge-0/0/2 mtu 9216
set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunk
set ethernet-switching-options dot1q-tunneling ether-type 0x8100
set vlans cust1 vlan-id 100
set vlans cust1 interface ge-0/0/1.0
set vlans cust1 interface ge-0/0/2.0
set vlans cust1 dot1q-tunneling customer-vlans 1-4000

SW4:

set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members 2
set interfaces ge-0/0/1 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members 2
set vlans vlan2 vlan-id 2


NOTE: 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
 

Modification History

2024-09-02: minor non tech changes

Related Information