How to confgure selective QinQ on Juniper EX4500

By | 31.05.2019

Describing the case when you need to selectively add the outer tag on certain Vlans and also transit some vlans intact. This can be done with selective QinQ on Juniper EX4500.

I will create transport vlan and specify what vlans it should carry.
In my case, vlans 1-1000 and 2000-3000 are allowed, all other tags will be dropped.
I will add the vlan to uplink port – xe-0/0/12 and the client port – ge-0/0/3:

ethernet-switching-options {
dot1q-tunneling {
        ether-type 0x8100;
          }
}
vlans {
QinQ-selective {
     vlan-id 10;
     dot1q-tunneling {
         customer-vlans [ 1-1000 2000-3000 ];
     }
 }
}
interfaces {
xe-0/0/12  
 description uplink;
 mtu 9216;
 unit 0 {
     family ethernet-switching {
         port-mode trunk;
         vlan {
             members [ 2 10 ];
         }
     }
 }
ge-0/0/3 {
         description test-sw;
         mtu 9216;
         unit 0 {
             family ethernet-switching {
                 port-mode access;
                 vlan {
                     members 10;
                 }
             }
         }
     }
}

I dont need to add the outer tag to vlan 1001. To do so, following configuration will be applied:

vlans {
    transit-vlan {
        vlan-id 1001;
         interface {
             ge-0/0/3.0 {
                 mapping {
                     1001 {
                         swap;
                     }
                 }                       
             }
         }
     }
 }

Leave a Reply

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