Setting up 802.q and switch ports in an ASR9000

IOS-XR has a structure that is very different than standard IOS. I would recomend checking the different documentation at Cisco.com this post is not going to explain things like having to commit a config before it is applied… etc, but rather I am going to assume you have read the getting started guide.

The project that lead to me being exposed to an ASR9000 is a network migration that is replacing a pair of 7200 routers and a 3750 switch (which is only being used for layer2 features) with a single ASR9000 with Redundant RSPs. The ASR has a 40 port gig module and a 4 port 10 gig module. To replace the switch I need to add ports to a “vlan” and trunk those vlans to downstream switches at other pops. After digging around I found that unlike a stanards IOS Router or multi-layer switch you do not associate ports with a “vlan” rather you set the the control-plane and data-plane features seperatly. In the following config port GigabitEthernet0/1/0/0 is set to use subinterface .1 as untagged and tag on subinterfaces 2 and 3. Port GigabitEthernet0/1/0/2 is configured to tag subinterfaces 1 and 3 and not tag subinterface .2. Last port GigabitEthernet0/1/0/3 is configured to use subinterface 3 untagged. On the Tagged ports notice that we are rewriting one tag, you have many other options available including pushing different tags on with outbound traffic and popping off other inbound tags, you also have options to manipulate double-tagging. You can find more information in the Interface Configuration Guide and L2VPN and Ethernet Services Configuration Guide


!
interface GigabitEthernet0/1/0/0
 negotiation auto
!
interface GigabitEthernet0/1/0/0.1 l2transport
 encapsulation untagged
!
interface GigabitEthernet0/1/0/0.2 l2transport
 encapsulation dot1q 2
 rewrite ingress tag pop 1 symmetric
!
interface GigabitEthernet0/1/0/0.3 l2transport
 encapsulation dot1q 3
 rewrite ingress tag pop 1 symmetric
!
interface GigabitEthernet0/1/0/1
 negotiation auto
!
interface GigabitEthernet0/1/0/1.1 l2transport
 encapsulation dot1q 1
 encapsulation untagged
!
interface GigabitEthernet0/1/0/1.2 l2transport
 encapsulation untagged
!
interface GigabitEthernet0/1/0/1.3 l2transport
 encapsulation dot1q 3
 rewrite ingress tag pop 1 symmetric
!
interface GigabitEthernet0/1/0/3
 negotiation auto
!
interface GigabitEthernet0/1/0/3.3 l2transport
 encapsulation untagged
!

To create a vlan-like bridging enviroment you need to add a “bride group” to the l2vpn configure section.  I will show an example of setting up a “bridge group” to simulate vlan 2.


!
l2vpn
 bridge group 2
  bridge-domain BD_2
   interface GigabitEthernet0/1/0/0.2
   !
   interface GigabitEthernet0/1/0/1.2
   !
  !
 !
!

Note that you add the ports to the brige group not at the port level, but in a different configuration section.  Again note how IOS-XR keeps the data-plane and control-plane information sepperate, which give you some very powerful options.  What if we need not only to simulate a vlan, but also a vlan interface.  To simulate a vlan interface where you can add an ip you create a BVI (bridge-group virtual interface) interface.  below is how you create a BVI interface and associate it with a bridge-group.


!
interface BVI1
 description Internal LAN
 ipv4 address 192.0.2.1 255.255.255.0
!

Last you need to add the BVI to a bridge group


!
l2vpn
 bridge group 1
  bridge-domain BD_1
   interface GigabitEthernet0/1/0/0.1
   !
   interface GigabitEthernet0/1/0/1.1
   !
   routed interface BVI1
  !
 !

Below is the complete config for this post.


!
interface GigabitEthernet0/1/0/0
 negotiation auto
!
interface GigabitEthernet0/1/0/0.1 l2transport
 encapsulation untagged
!
interface GigabitEthernet0/1/0/0.2 l2transport
 encapsulation dot1q 2
 rewrite ingress tag pop 1 symmetric
!
interface GigabitEthernet0/1/0/0.3 l2transport
 encapsulation dot1q 3
 rewrite ingress tag pop 1 symmetric
!
interface GigabitEthernet0/1/0/2
 negotiation auto
!
interface GigabitEthernet0/1/0/2.1 l2transport
 encapsulation dot1q 1
 encapsulation untagged
!
interface GigabitEthernet0/1/0/2.2 l2transport
 encapsulation untagged
!
interface GigabitEthernet0/1/0/2.3 l2transport
 encapsulation dot1q 3
 rewrite ingress tag pop 1 symmetric
!
interface GigabitEthernet0/1/0/3
 negotiation auto
!
interface GigabitEthernet0/1/0/3.3 l2transport
 encapsulation untagged
!
interface BVI1
 description Internal LAN
 ipv4 address 192.0.2.1 255.255.255.0
!
interface BVI3
 description PE-Switches
 ipv4 address 198.51.100.0 255.255.255.0
!
l2vpn
 bridge group 1
  bridge-domain BD_1
   interface GigabitEthernet0/1/0/0.1
   !
   interface GigabitEthernet0/1/0/1.1
   !
   routed interface BVI1
  !
 !
 bridge group 2
  bridge-domain BD_2
   interface GigabitEthernet0/1/0/0.2
   !
   interface GigabitEthernet0/1/0/1.2
  !
 !
 bridge group 3
  bridge-domain BD_3
   interface GigabitEthernet0/1/0/0.3
   !
   interface GigabitEthernet0/1/0/1.3
   !
   interface GigabitEthernet0/1/0/2.3
   !
   routed interface BVI3
  !
 !
!

2 thoughts on “Setting up 802.q and switch ports in an ASR9000

  1. Will

    Very intersting that a 9000 was used to replace a 7200.

    Thanks a lot for this post.

    I’ve not ready any blog on the 9000s to this day.

    Reply

Leave a Reply

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

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>