Bridge two QinQ interfaces on a juniper router

bridgelayer2qinq

On a Juniper MX router I've got 2 interfaces that I need to bridge together.

Interface A has QinQ configured:

vlan-tags outer 0x8100.1 inner 0x8100.600

Interfaces B has QinQ configured

vlan-tags outer 0x8100.336 inner 0x8100.600

These are bridge together:

domain-type bridge;
interface A;
interface B;

If I keep both outer VLAN tags the same. Then I can send traffic through the bridge domain. How would I do it when I have 2 different outer VLAN tags?

Best Answer

One way you could do this:

Given the following two interfaces:

interfaces {
    ge-1/0/1 {
        flexible-vlan-tagging;
        encapsulation flexible-ethernet-services;
        unit 1 {
            encapsulation vlan-bridge;
            vlan-tags outer 1 inner 600;
        }
    }
    ge-1/0/2 {
        flexible-vlan-tagging;
        encapsulation flexible-ethernet-services;
        unit 1 {
            encapsulation vlan-bridge;
            vlan-tags outer 336 inner 600;
        }
    }

Then normalise at your bridge-domain by specifying vlan-id "none":

bridge-domains {
    QT {
        vlan-id none;
        interface ge-1/0/1.1;
        interface ge-1/0/2.1;
    }
}

You'll then see when you look at your interfaces that the MX will pop both tags on ingress, and then push two new ones to match the egress interface eg:

Logical interface ge-1/0/1.1 (Index 345) (SNMP ifIndex 538)
 Flags: Device-Down SNMP-Traps 0x0
 VLAN-Tag [ 0x8100.1 0x8100.600 ] In(pop-pop) Out(push-push 0x8100.1 0x8100.600) <--
 Encapsulation: VLAN-Bridge
 Input packets : 0
 Output packets: 0
 Protocol bridge, MTU: 1522
  Flags: Is-Primary

Logical interface ge-1/0/2.1 (Index 346) (SNMP ifIndex 542)
  Flags: Device-Down SNMP-Traps 0x0
  VLAN-Tag [ 0x8100.336 0x8100.600 ] In(pop-pop) Out(push-push 0x8100.336 0x8100.600) <--
  Encapsulation: VLAN-Bridge
  Input packets : 0 
  Output packets: 0
  Protocol bridge, MTU: 1522