I hope all of you are pretty familiar with routing information protocol (RIP). I am writing this article because many students have asked me when & why to choose RIPv2 over RIPv1. Before starting, let’s take a quick glance at RIP for those who want a crash view of RIP. RIP is a standardized distance vector protocol, designed for use on smaller networks. RIP was one of the first true distance vector routing protocols; it employs the hop count as a routing metric. RIP prevents routing loops by implementing a limit on the number of hops allowed in a path from the source to a destination. The maximum number of hops allowed for RIP is 15. This hop limit, however, also limits the size of networks that RIP can support. A hop count of 16 is considered an infinite distance and is used to deprecate inaccessible, inoperable, or otherwise undesirable routes in the selection process.

RIP implements the split horizon, route poisoning, and hold-down mechanisms to prevent incorrect routing information from being propagated. These are some of the stability features of RIP. It is also possible to use the routing information protocol with metric-based topology (RMTI) algorithm to cope with the count-to-infinity problem. With RMTI, it is possible to detect every possible loop with a very small computation effort.

RIP adheres to the following distance vector characteristics:

• RIP sends out periodic routing updates (every 30 seconds).

• RIP sends out the full routing table every periodic update.

• RIP uses a form of distance as its metric (in this case, hop count).

• RIP uses the Bellman-Ford distance vector algorithm to determine the best “path” to a particular destination.

Any network that is 16 hops away or more is considered unreachable to RIP, thus the maximum diameter of the network is 15 hops. A metric of 16 hops in RIP is considered a poison route or infinity metric.

There are three versions of the Routing Information Protocol: RIPv1, RIPv2, and RIPng. RIPv1 and RIPv2 are used for IPv4 routing, whereas RIPng (RIP next generation) is designed for IPv6 routing. Here we are going to solve a common dilemma between RIPv1 and RIPv2,

Significant Differences Between RIPv1 and RIPv2

Message format:

The RIP-1 message format contains a number of “must be zero” fields; these fields are used by RIP-2’s extended functionality. They are routing domain (2 bytes), route tag (2 bytes), subnet mask (4 bytes) and next hop (4 bytes). The version field contains a value of 1 for RIP-1 messages and 2 for RIP-2.

Routing per subnet: RIP-1 supported subnet entries only within the subnetted network. This enforces strict hierarchical routing. RIP-2 allows routing on the subnet outside of the network by passing subnet mask information in parallel with the address. This also allows support of variable length masks within the same network or aggregation of several class-C addresses within one address group.

Authentication: RIP-1 is not a secure routing protocol. Any host sending packets from UDP port 520 would be regarded a router and trusted by its neighbours. RIP-2 includes an authentication procedure, which specifies that the first entry in a packet be replaced by an “authentication segment.” The packet will contain a 32-bit command, an “address family identified” of 0xFFFF, an “authentication type” that identifies the algorithm in use, 16 bytes of authentication data, and then 24 destination-metric pairs.

Routing domains, next hop: RIP-2 supports multiple autonomous systems on the same wire by using a 16-bit “routing domain” number. A route identifies the destination network of a packet by examining this field. RIP-2 also includes a “next hop” field to indicate the best relay hop for the other logical network on the same wire.

Multicast: RIP-1 uses a broadcast address to send routing advertisements to all nodes on the same wire. RIP-2 utilizes a class-D address (224.0.0.9) for periodic multicasts. This effectively prevents other non-router hosts on the same wire from receiving routing messages.

 

Time to check the above described points by taking two routers and, after configuring each router with the required IP address and loopbacks, we configure RIP as follows:


Routing protocol configuration occurs in global configuration mode. On Router R1, to configure RIP, we would type:

R1(config)# router rip

R1(config-router)# network 12.0.0.0

R1(config-router)# network 1.0.0.0

The first command, router rip, enables the RIP process. The networks
statements tell RIP which networks you wish to advertise to other RIP routers. We simply list the networks that are directly connected to our router. Notice that we specify the networks at their classful boundaries, and we do not specify a subnet mask.

To configure Router R2:

R2(config)# router rip

R2(config-router)# network 12.0.0.0

R2(config-router)# network 2.0.0.0

R1# show ip route

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets

C 1.1.1.1 is directly connected, Loopback0

R 2.0.0.0/8 [120/1] via 12.1.1.2, 00:00:10, Serial2/0


12.0.0.0/30 is subnetted, 1 subnets

C 12.1.1.0 is directly connected, Serial2/0

The routing table on Router R2 will look like:

R2# show ip route

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets

C 2.2.2.2 is directly connected, Loopback0

R 1.0.0.0/8 [120/1] via 12.1.1.1, 00:00:10, Serial2/0

12.0.0.0/30 is subnetted, 1 subnets

C 12.1.1.0 is directly connected, Serial2/0

We apply the same configuration with RIPv2 as in Fig 3:


R1(config)# router rip

R1(config-router)# version 2

R1(config-router)# no auto-summary

R1(config-router)# network 12.1.1.0

R1(config-router)# network 1.1.1.1

The second command, version 2, enables the RIPv2 process. Notice that we specify the networks at their classless boundaries; by default, summarization is enabled so we get summarized routes. That is why we don’t need to run auto-summary to get classless routes.

To configure Router R2:

R2(config)# router rip

R2(config-router)# version 2

R1(config-router)# no auto-summary

R2(config-router)# network 12.1.1.0

R2(config-router)# network 2.2.2.2

R1# show ip route

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets

C 1.1.1.1 is directly connected, Loopback0

2.0.0.0/32 is subnetted, 1 subnets

R 2.2.2.2 [120/1] via 12.1.1.2, 00:00:07, Serial2/0

12.0.0.0/30 is subnetted, 1 subnets

C 12.1.1.0 is directly connected, Serial2/0

The routing table on Router R2 will look like:

R2# show ip route

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets

R 1.1.1.1 [120/1] via 12.1.1.1, 00:00:12, Serial2/0

2.0.0.0/32 is subnetted, 1 subnets

C 2.2.2.2 is directly connected, Loopback0

12.0.0.0/30 is subnetted, 1 subnets

C 12.1.1.0 is directly connected, Serial2/0

If you look at the output of R1 & R2 in both scenarios, it is clearly stated that with RIPv1 we get classful route as 2.0.0.0 on R2 whereas using RIPv2 we get classless route as 2.2.2.2 on R1.

R1(config)# key chain cisco

R1(config-keychain)# key 1

R1(config-keychain-key)# key-string ccna

R2(config)# key chain cisco

R2(config-keychain)# key 1

R2(config-keychain-key)# key-string ccna

The first command creates a key chain called cisco. We must associate a key with our keychain. Then we actually configure the shared key using the key-string command.

We then apply our key chain to the interface connecting to the other router:

R1(config)# interface s2/0

R1(config-if)# ip rip authentication key-chain cisco

R2(config)# interface s2/0

R2(config-if)# ip rip authentication key-chain cisco

The table below makes you more comfortable with understanding both versions.


I hope you finally have the answer to why RIPv2 is preferred over RIPv1, so for now there is no need to be puzzled over it. You can also apply the described scenario to real devices or to packet trace/GNS3 simulators. If you need any help, you can write me on the comment section of this page.

References:

  • RIP: An Intra-Domain Routing Protocol by Malkin, Gary Scott (2000). Addison-Wesley Longman
  • RIP-2 MD5 Authentication, F. Baker, R. Atkinson, The Internet Society (January 1997)
  • RIPv2 Cryptographic Authentication, R. Atkinson, M. Fanto, The Internet Society (January 2007)
  • Routing Information Protocol, C. Hendrik, The Internet Society (June 1988)
  • RIP Version 2 – Carrying Additional Information, G. Malkin, The Internet Society
  • Guide to Cisco Certified Network Associate certification by Todd Lamlee, Sybex press.
  • Guide to Cisco Certified Network Associate by Richard Deal.
  • Cisco Certified Network Professional-Route by Wendell Odom, Ciscopress.com
  • CCNP- Route Quick reference by Denis Donohue, Ciscopress.com
  • Cisco Certified Internetwork Expert by Wendell Odom and others, Ciscopress.com
  • Cisco Certified Internetwork Expert Quick reference by Brad Ellis, Ciscopress.com