Welcome again at the IOS XR section. As the title suggests, here we will learn how to establish point-to-point neighbor relationships between IOS XR routers using some advanced routing protocols, including OSPF, ISIS, and BGP. This article assumes that you have some basic access level knowledge of Cisco IOS XR (if not, then you can take the reference from my previous posts on IOS XR). As we already discussed, “IOS XR is one of the best IOS platforms from the house of Cisco Systems and used widely on high-end carrier routers such as the CRS-1, 12000, and ASR9000 series. IOS XR works as a distributed operating system to provide modularity and memory protection between processes; Cisco’s self-healing feature provides a functionality to restart a failed process without disturbing others.”

CCNA Training – Resources (Intense)

This article will provide you with a very practical approach with configuration examples for developing point-to-point neighbor relationships using OSPF, ISIS, and BGP routing protocols between two XR devices (as shown in Figure 1); later we will learn more technically advanced features of these protocols in the area of Route-filtering, IPv6, MPLS, etc., with more hand-on interactive labs of IOS XR platform.

Note: Following set of commands is preconfigured on both routers:

Router xr1:

Tue Jan 27 09:58:34.214 UTC
Building configuration...
!! IOS XR Configuration 5.1.1
!! Last configuration change at Mon Jan 26 08:22:42 2015 by nitin
!
hostname xr1 
cdp
interface Loopback1
 ipv4 address 1.1.1.1 255.255.255.255
!
interface MgmtEth0/0/CPU0/0
 cdp
 ipv4 address 12.1.1.1 255.255.255.252
!
End

Router xr2:

Tue Jan 27 10:04:22.152 UTC
Building configuration...
!! IOS XR Configuration 5.1.1
!! Last configuration change at Mon Jan 26 08:52:14 2015 by nitin
!
hostname xr2 
cdp
interface Loopback1
 ipv4 address 2.2.2.2 255.255.255.255
!
interface MgmtEth0/0/CPU0/0
 cdp
 ipv4 address 12.1.1.2 255.255.255.252
!
End

Objective: we will configure OSPF, ISIS and BGP on IOS XR based routers to achieve the following objective:

xr1# ping 2.2.2.2 source 1.1.1.1 & xr2# ping 1.1.1.1 source 2.2.2.2

Let’s start with OSPF routing configuration on Cisco IOS XR platform.

Open Shortest Path First: First we will learn how to achieve the given objective with OSPF routing configuration on both routers. As we already know, OSPF is a link state IGP that runs on the IP layer and uses IP port number 89. OSPF uses 224.0.0.5 for multicasting LSAs and hello packets, and uses 225.0.0.6 multicast address for handling queries to DR/BDR. OSPF is an area-based routing protocol, where “area 0” is considered as the backbone area. You can refer to our previously published IOS-based articles to learn the more technical aspects of OPSF routing protocol.

As we already discussed in previous articles, IOS XR does not support the traditional “network” command to establish IGP neighbor-ship or to advertise networks, so you will have to enable required interfaces to form OSPF neighbor-ship and network advertisement. You can enable OSPF on interfaces under an area, which only means that first you will have to define an area id under routing process, then under the OSPF area prompt “(config-ospf-ar)#” you will have to define respective interfaces. The following set of commands is used to define an OSPF process on an IOS XR based router:

Syntax to configure OSPF Routing

(config)#router ospf      /* process id is locally significant
(config-ospf)# router-id 
(config-ospf)# area 
(config-ospf-ar)#interface    /* to enable OSPF on an interface 
(config-ospf-ar-if)#exit

I hope you have found it very easy; the following configuration is required to fulfill objective’s need:

Router xr1:

RP/0/0/CPU0:xr1(config)# router ospf 1
RP/0/0/CPU0:xr1(config-ospf)# router-id 1.1.1.1
RP/0/0/CPU0:xr1(config-ospf)# area 0
RP/0/0/CPU0:xr1(config-ospf-ar)# interface loopback 1
RP/0/0/CPU0:xr1(config-ospf-ar-if)# exit
RP/0/0/CPU0:xr1(config-ospf-ar)# interface MgmtEth0/0/CPU0/0
RP/0/0/CPU0:xr1(config –ospf-ar-if)# root       /* back to config mode
RP/0/0/CPU0:xr1(config)# commit                 /* to save above configuration to running-config 

Router xr2:

RP/0/0/CPU0:xr2(config)# router ospf 1
RP/0/0/CPU0:xr2(config-ospf)# router-id 2.2.2.2
RP/0/0/CPU0:xr2(config-ospf)# area 0
RP/0/0/CPU0:xr2(config-ospf-ar)# interface loopback 1
RP/0/0/CPU0:xr2(config-ospf-ar-if)# exit
RP/0/0/CPU0:xr2(config-ospf-ar)# interface MgmtEth0/0/CPU0/0
RP/0/0/CPU0:xr2(config –ospf-ar-if)# root       /* back to config mode
RP/0/0/CPU0:xr2(config)# commit                 /* to save above configuration to running-config 

Check-point: RP/0/0/CPU0:xr1#show route //** you will definitely get an OSPF learned route in your routing table, as shown in Figure 2:

Figure 2 displays the output result of the “show route” command (“show ospf database” command can also be used to check OSPF routes); you can see an entry of OSPF learned networks 2.2.2.2/32 in its routing table. Now it’s time to ping 2.2.2.2 with source address 1.1.1.1 from router xr1 (as per given objective). For sure, you will get the same result as I got (refer to Figure 3)

Intermediate System to Intermediate System (ISIS): Let’s learn how to setup basic ISIS routing on both routers to achieve the given objective.

ISIS is also a link state routing protocol and was developed by ISO (International Standards Organization). ISIS has no hop limit and uses the Dijkstra algorithm to determine the shortest path; it is a level-based routing protocol with default administrative distance 115 and having levels 1 and 2 and a hybrid level 1-2, which is enabled by default. IS-IS forms neighbor relationships with adjacent routers configured with same levels; if a router is configured with level 1 then it can only establish a neighbor relationship with another ISIS router configured with either level 1 or level 1-2. By default, automatic summarization is disabled in ISIS, which means there is no need to use “no auto-summary” to receive classless routes thus supports VLSMs.

The IS-IS uses a net-id called “CLNP address,” a variable-length hexadecimal that ranges from 64 to 160 bits in length. The CLNP address includes the following three “fields:,

A format is described below to understand NET address:

AA.AAAA.AAAA.AAAA.AAAA.AAAA.AAAA.SSSS.SSSS.SSSS.NN

Where

A = Area ID (it’s of variable length and can be different to form level 2 peering but must be the same for establishing level 1 neighbor relationship)

S = System ID (usually 48 bits and must be unique between ISIS neighbors)

N = N-Selector (8 bits and always zero)

Syntax to configure ISIS routing protocol:

(config)# router isis    /* locally significant just like OSPF process id
(config-isis)# log adjacency changes    /* to enable log messages for adjacency changes 
(config-isis)# net   /* to configure ISIS NET address
(config-isis)# is-type < level-1 | level-1-2 | level-2-only >  / * to set specific level for ISIS process
(config-isis)#int    /* to enable interface into ISIS
(config-isis-if)# circuit-type < level-1 | level-1-2 | level-2-only >  / * to set specific level for ISIS interface 
(config-isis-if)# address-family <ipv4|ipv6> 
(config-isis-if)# commit

We will have to configure ISIS on both routers, xr1 and xr2, by enabling the required interfaces under the ISIS process, using the following set of commands to achieve the given objective.

Router xr1:\

RP/0/0/CPU0:xr1(config)#router isis Site-A
RP/0/0/CPU0:xr1(config-isis)#log adjacency changes
RP/0/0/CPU0:xr1(config-isis)#net 44.0001.0000.0000.0001.00
RP/0/0/CPU0:xr1(config-isis)#int loopback 1
RP/0/0/CPU0:xr1(config-isis-if)#address-family ipv4 unicast
RP/0/0/CPU0:xr1(config-isis-if-af)#exit
RP/0/0/CPU0:xr1(config-isis-if)#int MgmtEth0/0/CPU0/0
RP/0/0/CPU0:xr1(config-isis-if)#address-family ipv4 unicast
RP/0/0/CPU0:xr1(config-isis-if-af)#root
RP/0/0/CPU0:xr1(config)#commit    

Router xr2:

RP/0/0/CPU0:xr2(config)#router isis Site-A
RP/0/0/CPU0:xr2(config-isis)#log adjacency changes
RP/0/0/CPU0:xr2(config-isis)#net 44.0001.0000.0000.0002.00
RP/0/0/CPU0:xr2(config-isis)#int loopback 1
RP/0/0/CPU0:xr2(config-isis-if)#address-family ipv4 unicast
RP/0/0/CPU0:xr2(config-isis-if-af)#exit
RP/0/0/CPU0:xr2(config-isis-if)#int MgmtEth0/0/CPU0/0
RP/0/0/CPU0:xr2(config-isis-if)#address-family ipv4 unicast
RP/0/0/CPU0:xr2(config-isis-if-af)#root
RP/0/0/CPU0:xr2(config)#commit

After configuring the above commands, you will definitely get an ISIS route in the routing table (as shown in Figure 4). Figure 4 shows an ISIS level 1 route because, by default, “level 1-2” is enabled on the ISIS router and, if both ISIS neighbor routers are configured with default level (level 1-2), then it will form a level-1 ISIS neighbor relationship; that’s why the output result of “show route” is showing an ISIS level-1 route. Now you can check the reachability between router’s loopbacks using the ping command and you will get the same output result as per Figure 3.

If you want to configure a level-2 neighbor relationship between both routers then you have to set “Level-2” under the ISIS process or at the interface level (you can take the reference from commands mentioned at ISIS command syntax section). After changing the level, you will get the ISIS level-2 route, as shown in Figure 5 below.

Border Gateway Protocol (BGP): Now let’s learn “how to configure BGP routing protocol” on both XR routers to achieve the given objective.

BGP supports multiple address families, including IPv4, IPv6 and VPNv4/VPNv6 in IOS XR. We have to define respective address families under BGP neighbors’ configuration “(config-bgp-nbr)”. Automatic summarization is disabled by default, so there is no need to execute “no auto-summary” under the BGP process. The most important thing is the network advertisement: All required networks are to be advertised within respective address-families “(config-bgp-af)#” only. The following set of configurations is used to initialize BGP routing process and to advertise networks in IPv4 address family:

Syntax to configure BGP routing:

(config)# router bgp 
(config-bgp)#neighbor <Neighbor’s IP>
(config-bgp-nbr)#remote-as <Neighbor’s AS >
(config-bgp-nbr)#address-family          
(config-bgp-nbr-af)#exit
(config-bgp-nbr)#exit
(config-bgp)#address-family     
(config-bgp-af)#network <X.X.X.X/X | X:….::X/X >  /* to advertise IPv4 or IPv6 address into BGP
(config –bgp-af)# root
(config)#commit

Router xr1:

RP/0/0/CPU0:xr1(config)#router bgp 10
RP/0/0/CPU0:xr1(config-bgp)#neighbor 12.1.1.2
RP/0/0/CPU0:xr1(config-bgp-nbr)#remote-as 10
RP/0/0/CPU0:xr1(config-bgp-nbr)#address-family ipv4 unicast
RP/0/0/CPU0:xr1(config-bgp-nbr-af)#exit
RP/0/0/CPU0:xr1(config-bgp-nbr)#exit
RP/0/0/CPU0:xr1(config-bgp)#address-family ipv4 unicast
RP/0/0/CPU0:xr1(config-bgp-af)#network 1.1.1.1/32
RP/0/0/CPU0:xr1(config –bgp-af)# root
RP/0/0/CPU0:xr1(config)#commit

Router xr2:

RP/0/0/CPU0:xr2(config)#router bgp 10
RP/0/0/CPU0:xr2(config-bgp)#neighbor 12.1.1.1
RP/0/0/CPU0:xr2(config-bgp-nbr)#remote-as 10
RP/0/0/CPU0:xr2(config-bgp-nbr)#address-family ipv4 unicast
RP/0/0/CPU0:xr2(config-bgp-nbr-af)#exit
RP/0/0/CPU0:xr2(config-bgp-nbr)#exit
RP/0/0/CPU0:xr2(config-bgp)#address-family ipv4 unicast
RP/0/0/CPU0:xr2(config-bgp-af)#network 2.2.2.2/32
RP/0/0/CPU0:xr2(config –bgp-af)# root
RP/0/0/CPU0:xr2(config)#commit

After configuring the above commands, you will definitely get a BGP route in your routing table, as it shown in Figure 6

Finally, it’s time to check the end to end reachability between both routers and, for sure, you will get the same result as displayed in Figure 3 (above in this article).

I hope all of you have gained some of exclusive information from this article. IOS XR is very handy if you follow some simple guidelines. I am eagerly waiting to read your feedbacks and you can also share your Intenseschool.com experience at comments section.

And don’t forget to spread the link of this article on your Facebook, Twitter and LinkedIn accounts so that the maximum number of people can get this exclusive piece of information. Keep reading @ Instanseschool.com and you can join our Facebook group, http://www.facebook.com/intenseschool, to get updates on new posts.

References

Apart from my work experience and knowledge, the following sources helped me a lot to design this exclusive content.

http://www.cisco.com/c/en/us/products/ios-nx-os-software/ios-xr-software/index.html

http://www.cisco.com/c/en/us/td/docs/routers/crs/software/crs_r42/routing/command/reference/b_routing_cr42crs/b_routing_cr42crs_chapter_01001.html

http://www.cisco.com/c/en/us/td/docs/routers/crs/software/crs_r42/routing/command/reference/b_routing_cr42crs/b_routing_cr42crs_chapter_0111.html

http://www.cisco.com/c/en/us/td/docs/ios/fundamentals/command/reference/cf_book.html

https://supportforums.cisco.com/document/139811/bgp-basic-configuration-ios-xr-ibgp-and-ebgp.html

http://www.cisco.com/c/en/us/td/docs/routers/xr12000/software/xr12k_r41/routing/configuration/guide/routing_cg41xr12k_chapter1.html