RIP version 1
The Routing Information Protocol (RIP) is a distance-vector routing protocol, which 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 used to deprecate inaccessible, inoperable, or otherwise
undesirable routes in the selection process.
RIP version 2
RIP II includes the ability to carry subnet information, thus supporting Classless Inter-Domain
Routing (CIDR). To maintain backward compatibility, the hop count limit of 15 remains.
RIPv2 has facilities to fully interoperate with the earlier specification if all Must Be Zero protocol
fields in the RIPv1 messages are properly specified. In addition, a compatibility switch feature allows
fine-grained interoperability adjustments.
In an effort to avoid unnecessary load on hosts that do not participate in routing, RIPv2 multicasts the
entire routing table to all adjacent routers at the address 224.0.0.9, as opposed to RIPv1 which uses
broadcast. Unicast addressing is still allowed for special applications.
Some of the most notable RIP II enhancements are:
Next hop
The primary ones are the ability to advertise a next hop to use other than the router supplying the
routing update. This is quite useful when advertising a static route to a dumb router that does not run
RIP as it avoids having packets destined through the dumb router from having to cross a network
twice. RIP I routers will ignore next hop information in RIP II packets. This may result in packets
crossing a network twice, which is exactly what happens with RIP I.
Network Mask
RIP I assumes that all sub-networks of a given network have the same network mask. It uses this
assumption to calculate the network masks for all routes received. This assumption prevents subnets
with different net-masks from being included in RIP packets. RIP II adds the ability to explicitly
specify the network mask with each network in a packet.
While RIP I routers will ignore the network mask in RIP II packets, their calculation of the network
mask will quite possibly be wrong. For this reason, RIP I compatible RIP II packets must not contain
networks that would be mis-interpreted. These network must only be provided in native RIP II
packets that are multicast.
Authentication
RIP II packets may also contain one of two types of authentication string that may be used to verify
the validity of the supplied routing data. Authentication may be used in RIP I compatible RIP II
packets, but be aware that RIP I routers will ignore it.
The first method is a simple password in which an authentication key of up to 16 characters is
included in the packet. If this does not match what is expected, the packet will be discarded. This
method provides very little security as it is possible to learn the authentication key by watching RIP
packets.