Saturday, May 21, 2016

SPv4 on IOS and IOS XR - RIPv2

YES! It's RIPv2. I haven't see the SPv4 Lab but you never know. We'll configure a few things on RIPv2 on IOS and IOS XRv. I have taken the INE SPv4 topology and used it as a base topology for learning the technologies on the blueprint, much the same way I did for R&S.

So is it really valuable to know RIPv2 for a production Enterprise/Service Provider Engineer? I believe it is simply with the possibility of non Cisco platforms in a production environment. I have come across this a few times in the real world and very happy that I did, since I put the time in on RIP a few years ago, the only thing left to do was learn the syntax for IOS XR.

So, what are we going to cover in this post, a few things:
1. Base Setup of RIPv2.
2. Authentication with RIPv2.
3. Summarization with RIPv2.

I don't think we need to go much deeper than that since we'll only using 2 routers. The topology we will be using is below:


We will be configuring RIPv2 on R1 and XR1 on the VLAN 111 connection. IOS XR does not support IPv6 for RIPng so we won't be covering that here.

RIPv2 uses UDP Port 520 and multicast to 224.0.0.9 to form adjacency, there is no formal peering like with BGP, EIGRP or OSPF but an every 30 second flood of the RIP database out all active links.

When the network statement is configure, your telling RIP which interfaces to send RIP updates out on. 

First things first, let's make sure we have reachability between R1 and XR1:
R1#ping 10.1.11.11
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.11.11, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/6/21 ms

On IOS First we will enable RIP, disable auto-summarization, ensure version 2 is used and enable the connected link as well as the loopbacks of R1 and XR1. We'll look at a debug of the flooding, and a few verifications.

1. First we have to configure RIPv2 on IOS and IOS XR.

IOS
R1
router rip
 version 2
 network 1.0.0.0
 network 10.0.0.0
 no auto-summary

Debug ip rip output:
May 21 21:32:11.320: RIP: received v2 update from 10.1.11.11 on GigabitEthernet1.111
*May 21 21:32:11.320:      11.11.11.11/32 via 0.0.0.0 in 1 hops

IOS XR
XR1

RP/0/0/CPU0:XR1#sh run router rip
Sat May 21 21:34:54.756 UTC
router rip
 interface Loopback0
 !
 interface GigabitEthernet0/0/0/0.111
 !
!

Very basic configuration. 

As you can see, UDP Port 520 and Multicast traffic to 224.0.0.9, this is from XR1.


2. Now we need to authenticate our peering so that we can prevent the nosy people in the network from messing it all up. We'll use MD5 authentication. 

IOS
R1
R1#sh run | sec key|rip

key chain RIP
 key 1
   key-string SP
!
interface GigabitEthernet1.111
 ip rip authentication mode md5
 ip rip authentication key-chain RIP


IOS XR
XR1

RP/0/0/CPU0:XR1#sh run router rip

router rip
 interface Loopback0
 !
 interface GigabitEthernet0/0/0/0.111
  authentication keychain RIP mode md5
!
RP/0/0/CPU0:XR1#sh run key chain

key chain RIP
 key 1
  accept-lifetime 12:00:00 may 15 2016 infinite
  key-string password 053836
  send-lifetime 12:00:00 may 15 2016 infinite
  cryptographic-algorithm MD5
 !
!


RP/0/0/CPU0:XR1#sh rip interface g0/0/0/0.111 | include Authentication
Authentication mode:        MD5
Authentication keychain:    RIP


3. Configuring summarization with RIPv2 is fairly common, it cuts down on the size of the RIP updates, which if the RIP update becomes to large, there is the potential for routing updates to become spaced out due to MTU of the interface, how big of an update that RIP can send or receive. 

On R1, create 3 loopbacks, 1721, 1722 and 1723. This will be what you advertise to XR1. Now Advertise those routes into RIP.

IOS
!
interface Loopback1721
 ip address 172.16.1.1 255.255.255.0
!
interface Loopback1722
 ip address 172.16.2.1 255.255.255.0
!
interface Loopback1723
 ip address 172.16.3.1 255.255.255.0
!
router rip
 version 2
 network 1.0.0.0
 network 10.0.0.0
 network 172.16.0.0
!
int g1.111
 ip summary-address rip 172.16.0.0 255.255.252.0



IOS XR
RP/0/0/CPU0:XR1#sh route rip
Sat May 21 22:03:18.679 UTC
R    172.16.1.0/24 [120/1] via 10.1.11.1, 00:00:04, GigabitEthernet0/0/0/0.111
R    172.16.2.0/24 [120/1] via 10.1.11.1, 00:00:04, GigabitEthernet0/0/0/0.111
R    172.16.3.0/24 [120/1] via 10.1.11.1, 00:00:04, GigabitEthernet0/0/0/0.111

Now, go configure the summary route on the connected link between XR1 and R1. Note, the summary doesn't have to be configured on a directly connected link, it will get flooded through the network.

RP/0/0/CPU0:XR1#sh route rip
Sat May 21 22:11:43.645 UTC
R    172.16.0.0/22 [120/1] via 10.1.11.1, 00:00:28, GigabitEthernet0/0/0/0.111
R    172.16.1.0/24 [120/1] via 10.1.11.1, 00:04:13, GigabitEthernet0/0/0/0.111
R    172.16.2.0/24 [120/1] via 10.1.11.1, 00:04:13, GigabitEthernet0/0/0/0.111
R    172.16.3.0/24 [120/1] via 10.1.11.1, 00:04:13, GigabitEthernet0/0/0/0.111

You'll notice the /22 route is injected as well as the other longer /24s. After a short period of time, ~around 4 minutes or so, the longer /24s get removed from the routing table.

RP/0/0/CPU0:XR1#sh route rip
Sat May 21 22:15:19.200 UTC

R    1.1.1.1/32 [120/1] via 10.1.11.1, 00:18:50, GigabitEthernet0/0/0/0.111
R    10.1.2.0/24 [120/1] via 10.1.11.1, 00:18:50, GigabitEthernet0/0/0/0.111
R    10.1.5.0/24 [120/1] via 10.1.11.1, 00:18:50, GigabitEthernet0/0/0/0.111
R    10.1.12.0/24 [120/1] via 10.1.11.1, 00:18:50, GigabitEthernet0/0/0/0.111
R    10.255.1.0/24 [120/1] via 10.1.11.1, 00:18:50, GigabitEthernet0/0/0/0.111
R    172.16.0.0/22 [120/1] via 10.1.11.1, 00:04:03, GigabitEthernet0/0/0/0.111


Configuring a summary in IOS XR is not supported on IOS XRv 5.3, your only option is to enable auto-summary instead.

RP/0/0/CPU0:XR1(config)#int lo101
RP/0/0/CPU0:XR1(config-if)#ip add 10.10.1.11/24
RP/0/0/CPU0:XR1(config-if)#int lo102
RP/0/0/CPU0:XR1(config-if)#ip add 10.10.2.11/24
RP/0/0/CPU0:XR1(config-if)#int lo103
RP/0/0/CPU0:XR1(config-if)#ip add 10.10.3.11/24
RP/0/0/CPU0:XR1(config-if)#commit

interface Loopback101
 ipv4 address 10.10.1.11 255.255.255.0
!
interface Loopback102
 ipv4 address 10.10.2.11 255.255.255.0
!
interface Loopback103
 ipv4 address 10.10.3.11 255.255.255.0
!
router rip
 interface Loopback0
 !
 interface Loopback101
 !
 interface Loopback102
 !
 interface Loopback103


R1
R1(config-subif)#do sh ip route
R        10.10.1.0/24 [120/1] via 10.1.11.11, 00:00:15, GigabitEthernet1.111
R        10.10.2.0/24 [120/1] via 10.1.11.11, 00:00:15, GigabitEthernet1.111
R        10.10.3.0/24 [120/1] via 10.1.11.11, 00:00:15, GigabitEthernet1.111


On XR1
RP/0/0/CPU0:XR1(config-rip)#auto-summary

I didn't actually commit the command but it will summarize everything back to their classful boundary. 

Thanks for reading, stay tuned for more technologies available on IOS and IOS XR in the future.
Rob Riker, CCIE #50693, VCP5/6-DCV