RIP Version 1 was the Internet's first widely used routing protocol. It was standardized in RFC 1058, although implementations of the protocol based on de facto standards existed much earlier. It is still useful in small simple networks, as well as at the edges or in small regions of larger networks. RIP Version 2 is documented in RFC 1723.
All Cisco routers support RIP Version 1. Version 2 support was integrated into IOS Version 11.1. A detailed discussion of RIP Version 1 and 2 is beyond the scope of this book. If you are unfamiliar with dynamic routing protocols in general or with RIP in particular, you can find theoretical descriptions of how the protocol works in IP Routing by Ravi Malhotra (O'Reilly) and Designing Large-Scale LANs by Kevin Dooley (O'Reilly), as well as from RFCs 1058 and 1723.
RIP is useful in some situations, but you have to remember its limitations. First, Version 1 of the protocol is a purely classful; it doesn't support variable length subnet masks. So you should not use this protocol if you do any complex subnetting. Second, both Versions 1 and 2 of RIP use the very small metric value of 16 to signify "infinity." The protocol considers any network that is more than 16 hops away to be unreachable. This becomes even more important if you adjust any metric values to make RIP favor a fast link over a slow one. In practice, it is quite easy to exceed the maximum metric, even in small networks.
However, RIP can be extremely useful over small parts of a network. For example, it is much easier to configure than BGP as a method for interconnecting two or more different OSPF or EIGRP Autonomous Systems. And because RIP has been around for so long, it is often useful when exchanging routing information with legacy equipment. Indeed, it is almost impossible to find a router of any age from any vendor that doesn't implement RIP.
In this book, we assume that you are familiar with RIP in general, and will focus on Cisco's implementation of it. We will also discuss some specific issues that we think are particularly important.
One of the central features of RIP is that it distributes the entire routing table every 30 seconds. The protocol requires that every device add a small random amount to this time period to prevent synchronized bursts of traffic throughout your network every 30 seconds. But the RFC doesn't specify the size of this offset, or whether it should be positive or negative. Cisco routers always reduce the period slightly by subtracting a random variable amount of time, up to 4.5 seconds.
If a particular route is not seen for 6 successive update cycles, or 180 seconds by default, then the routers will mark it as invalid. They will flush the invalid route from their routing tables if they don't see it for 8 cycles, or 240 seconds. So this implies that RIP will converge rather slowly after a failure. But this is actually just a worst case. The network will converge much more quickly by taking advantage of a protocol feature called triggered updates. This means that when a route's metric suddenly changes, for whatever reason, the router will not wait for the full update cycle before distributing information about the change to the other routers in the network.
This is different from the modification to RIP described in Recipe 6.12, which is also called a triggered update. This feature, which is a partial implementation of RFC 2091, allows the routers to send routing updates only when there are changes. Instead of sending the entire routing table at each update cycle, this makes it possible to configure the routers to just send incremental changes. A better term for this might be non-periodic updates, to avoid confusion with the other kind of triggered updates that we discussed in the previous paragraph. Using these non-periodic triggered updates drastically improves RIP performance, but it must be configured on all of the routers sharing the link, and it is often not supported by legacy equipment. Furthermore, Cisco routers only support this feature on point-to-point serial links.
Cisco routers implement a hold-down timer with RIP. This is a protocol feature that is not described in the standard protocol RFC's. When the router marks a route invalid, it starts the hold-down timer, which is 180 seconds by default, and ignores all updates for this route. This helps to make the network somewhat more stable.
RIP uses a distance vector algorithm rather than a link state protocol like OSPF. As a result, you can use Cisco's distribute lists to make a router advertise only certain routes to other routers. This allows you to prevent distribution of routing information that you don't want to be generally visible. And you can also reject incoming routing information that you don't want to use. This can be extremely useful when exchanging routing information between networks, or when connecting small network regions with legacy equipment.