RIP and RIPv2, The Routing Information Protocol


Introduction to RIP

The Internet Engineering Task Force defined RIP in 1988 with RFC 1058. It was the first widely used routing protocol, but today it has been superseded by much better alternatives.

How does RIP work?

RIP is a distance vector routing protocol. Because of the limitations outlined below, it isn't often seen in modern networks. However, RIP does demonstrate some of the principles necessary to understand the protocols which are more widely used today.

The routing metric used by RIP to evaluate routes is hop count. A hop count of 1 indicates a directly connected network, a hop count of 2 indicates that the packet will hit two routers before reaching the target network and so on. The maximum number of hops is 15, a metric of 16 indicates that a destination is considered unreachable. RIP uses split horizon and route poisoning. A metric of 16 is used to poison the route.

RIP is a 'classful' routing protocol which means that networks aren't advertised with a subnet prefix. This is a major limiting factor as the router then assumes that the network includes the whole classful address space. For example, any network in is treated as even if it is a smaller subnet such as

Every 30 seconds a router with RIPv1 enabled broadcasts a RIP request message out of every interface to Routers which receive the broadcast and have RIP enabled will respond with a response containing all or part of their routing table. RIP uses UDP for transport and communicates on port 520.

RIP Version 1 Limitations

What is 'convergence' between routers?

All routers on a network are said to have 'converged' when they have exchanged enough routing information to 'agree' on the same network topology.


RFC 2453 defines RIP-2 (also referred to as RIPv2). It overcomes several of the problems presented by RIP version 1.

For each route advertised with RIPv2, it specifies the associated subnet. For example, a route to the subnet would explicitly include the subnet mask /28 or Therefore version 2 can support classless networks and VLSM (Variable Length Subnet Masks).

Version 2 uses the multicast IP address of (registered with IANA) to send routing updates. Using multicast means that packets containing routing updates are no longer broadcast to all devices on the network, just the routers which are listening for them. Updates are still sent using UDP on port 520.

Furthermore, RIPv2 adds support for authentication, which helps prevent rogue devices from injecting false routes. In the initial RFC, this was using a plain text password which doesn't provide much additional security. Subsequent extensions added support for more secure authentication, initially just MD5 which today isn't considered secure. However, RFC 4822 extends this to support more secure cryptographic algorithms.

Finally, RIPv2 adds a 'Route Tag' field which allows routers to include a tag with each route so that routes learned from different sources may be separated.

RIP vs RIPv2

Differences between RIP and RIPv2

Routing updates don't include information about the subnet Routing updates specify the associated subnet.
Only supports 'classful' networks. Supports 'classless' networks.
Doesn't support Variable Length Subnet Masks (VLSM). Supports routes with Variable Length Subnet Masks (VLSM).
Updates are sent as 'broadcasts' to all hosts on the network. Updates are sent to multicast address
No authentication methods. Support for authentication of messages.
No support for tagging routes. Includes a Route Tag field.

Similarities between RIP and RIPv2


Learn more about this topic by checking out these references.

Other Lessons

Learn more by checking out these related lessons

Introduction to IPv4 Routing



The Complete Guide to IPv4 Subnetting



VLSM Subnetting in Networks




This lesson is part of the following courses.

Computer Networking Foundations