Thursday, March 27, 2008

RIPv1

I was just starting my IEWB Vol. 1 RIP section... well... not the most advanced IP Routing Protocol, but it has it still in the CCIE R&S Lab BluePrint . In fact, the BluePrint shows RIPv2, and I just started RIPv1 section (just 4 small labs), but very good ones to understand the technology (which is the purpose of IEWB Vol. 1).

I´ve always learned that RIPv1 and IGRP are Classfull Protocols that doesn´t support VLSM, Discontiguous Networks... ok! This is WHAT RIPv1 and IGRP are capable and not-capable to do... and no more! But now I was able to check how it does that.

Let´s see an example:

RIPv1

In this example, R1 has 3 networks:

- 10.1.0.0/16

- 10.2.0.0/30

- 10.3.0.0/30

It´s also configured for RIPv1, with the following commands:

router rip
version 1
network 10.0.0.0

 

Just before R1 sends it´s RIPv1 Updates to R2, it perform these checks:

- R1 checks to see if 10.1.0.0/16 is part of the same major net of 10.3.0.0/30 (the source interface for the connection with R2). It is in the same major network (Class A);

- R1 now checks if 10.1.0.0/16 has the same subnet-mask of 10.3.0.0/30. The masks are different, so the network 10.1.0.0/16 will NOT be advertised  to R2;

- Finally R1 checks if the network 10.2.0.0/30 is in the same major network (Class A), it is, and also it checks if the subnet-mask if the same as the 10.3.0.0/30 which is also! Good! So Router R1 will advertise ONLY the network 10.2.0.0/30 to R2.

R2 process is the same, but as far as ALL the subnet-mask doesn´t match with the subnet-mask of the advertising interface, it´ll not advertise any networks to R1.

Let´s take a look at the Routing Table of R1 and R2:

R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       10.2.0.0/30 is directly connected, Loopback1
C       10.3.0.0/30 is directly connected, Serial1/0
C       10.1.0.0/16 is directly connected, Loopback0

 

R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks
R       10.2.0.0/30 [120/1] via 10.3.0.1, 00:00:15, Serial1/0
C       10.3.0.0/30 is directly connected, Serial1/0
C       10.4.0.0/24 is directly connected, Loopback0
C       10.5.0.0/16 is directly connected, Loopback1

 

As you can see, R2´s networks are not listed in R1´s routing table, and only the R1´s 10.2.0.0/30 network is listed in R2´s routing table because it has the same subnet-mask as the source interface through it was advertised!

More info on this can be found in the following Cisco´s Webpage:

http://www.cisco.com/en/US/tech/tk364/technologies_tech_note09186a0080093f1e.shtml

No comments: