1

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?

1

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
  • This is amazing! Works perfectly. The solution I put up earlier looked like this (on interface B): encapsulation vlan-bridge; vlan-tags outer 0x8100.336 inner 0x8100.600; input-vlan-map { swap; vlan-id 1; } output-vlan-map swap; why does this work as well? – Beeelze Dec 5 '16 at 12:45
  • @Beeelze: what you're doing there is swapping the outer tag, while preserving the inner tag, which is being mapped to the bridge-domain. My solution is stripping the frame back to no tags and then letting the egress interface decide what gets added. One benefit to the method I've put forward is that it will work even if the interfaces have two different inner tags, however I'm pretty sure there is an equivalent swap-swap operation on input-vlan-map as well. – Benjamin Dale Dec 5 '16 at 12:59
  • Thanks for your explanation. I see in your 'show' command that it pop-pop's and push-pushes the same inner and outer vlan tags on ingress and egress interface. Shouldn't each interface push a different outer vlan tag because that is what configured on that interface? – Beeelze Dec 5 '16 at 13:13
  • Not really - remember that we are referring to tag operations in the context of the interface, not the bridge-domain. In the case of ge-1/0/1.1 we receive a frame with [ 1 600 ], so we pop-pop and it goes into the bridge-domain with no tags. Traffic coming out ge-1/0/1.1 (eg: the SAME interface) should be the exact opposite - eg: push [ 1 600 ] otherwise you wouldn't get bi-directional traffic. Traffic leaving the bridge-domain via ge-1/0/2.1 on the other hand will push-push [336 600] for egress and pop-pop the same for ingress. – Benjamin Dale Dec 6 '16 at 1:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.