[j-nsp] Q-In-Q using M7i and CISCO Switch

sthaug at nethelp.no sthaug at nethelp.no
Wed Sep 1 17:03:58 EDT 2010


>   We need to pass 20 different vlans using only the 3 ones that carrier 
> provide to us.
> 
> First 10 vlans need to terminate in a L3 interface inside the router 
> with an IP address.

So, assuming you use carrier (outer) VLAN 100 for this, something like
the following:

interfaces {
 ge-0/0/0 {
  flexible-vlan-tagging;
  encapsulation flexible-ethernet-services;
  unit 1 {
   vlan-tags outer 100 inner 1;
   family inet {
    address ...
  }
  unit 2 {
   vlan-tags outer 100 inner 2;
   family inet {
    address ...
  }
  ...
 }
}

> Other 10 we need to pop from the IQ2E interface and let it free using a 
> L2 switch

Assuming you use carrier (outer) VLAN 200 for this, and the traffic is
sent out again on ge-0/1/0, using "interface-switch":

interfaces {
 ge-0/0/0 {
  flexible-vlan-tagging;
  encapsulation flexible-ethernet-services;
  unit 11 {
   encapsulation vlan-ccc;
   vlan-tags outer 200 inner 11;
   input-vlan-map pop;
   output-vlan-map push;
  }
  unit 12 {
   encapsulation vlan-ccc;
   vlan-tags outer 200 inner 12;
   input-vlan-map pop;
   output-vlan-map push;
  }
  ...
 }
}

interfaces {
 ge-0/1/0 {
  flexible-vlan-tagging;
  encapsulation flexible-ethernet-services;
  unit 11 {
   encapsulation vlan-ccc;
   vlan-id 11;
  }
  unit 12 {
   encapsulation vlan-ccc;
   vlan-id 12;
  }
  ...
 }
}

protocols {
 connections {
  interface-switch sw11 {
   interface ge-0/0/0.11;
   interface ge-0/1/0.11;
  }
  interface-switch sw12 {
   interface ge-0/0/0.12;
   interface ge-0/1/0.12;
  }
  ...
 }
}

As you can see a Juniper M7i isn't really well suited for L2
switching (the syntax is clumsy and the ports are expensice) - but
I believe it should work.

You'll need to set the interface MTU, and you'll also need MPLS
configuration on the router if you want to use interface-switch,
as far as I can remember. Might be simpler to connect a normal L2
switch to the trunk from the carrier, and use that switch to pop
off the outer VLAN.

Steinar Haug, Nethelp consulting, sthaug at nethelp.no


More information about the juniper-nsp mailing list