TheRouting Information Protocol (RIP) is one of the oldestdistance-vector routing protocols which employs thehop count as arouting metric. RIP preventsrouting loops by implementing a limit on the number ofhops allowed in a path from source to destination. The largest number of hops allowed for RIP is 15, which limits the size of networks that RIP can support.
In RIPv1 routers broadcast updates with their routing table every 30 seconds. In the early deployments,routing tables were small enough that the traffic was not significant. As networks grew in size, however, it became evident there could be a massive traffic burst every 30 seconds, even if the routers had been initialized at random times.
In most networking environments, RIP is not the preferred choice ofrouting protocol, as itstime to converge andscalability are poor compared toEIGRP,OSPF, orIS-IS. However, it is easy to configure, because RIP does not require any parameters, unlike other protocols.
Based on theBellman–Ford algorithm and theFord–Fulkerson algorithm,distance-vector routing protocols started to be implemented from 1969 onwards indata networks such as theARPANET andCYCLADES. The predecessor of RIP was the Gateway Information Protocol (GWINFO) which was developed byXerox in the mid-1970s to route its experimental network. As part of theXerox Network Systems (XNS) protocol suite GWINFO transformed into the XNS Routing Information Protocol. This XNS RIP in turn became the basis for early routing protocols, such asNovell's IPX RIP,AppleTalk's Routing Table Maintenance Protocol (RTMP), and the IP RIP. The 1982Berkeley Software Distribution of theUNIX operating system implemented RIP in therouteddaemon. The 4.2BSD release proved popular and became the basis for subsequent UNIX versions, which implemented RIP in therouted orgated daemon. Ultimately, RIP had been extensively deployed[2] before the standard, written by Charles Hedrick, was passed as RIPv1 in 1988.[3]
The routing metric used by RIP counts the number of routers that need to be passed to reach a destination IP network. The hop count 0 denotes a network that is directly connected to the router. 16 hops denote a network that is unreachable, according to the RIP hop limit.[4]
The original specification of RIP was published in 1988.[3] When starting up, and every 30 seconds thereafter, a router with RIPv1 implementationbroadcasts to255.255.255.255 a request message through every RIPv1 enabled interface. Neighbouring routers receiving the request message respond with a RIPv1 segment, containing theirrouting table. The requesting router updates its own routing table, with the reachable IP network address, hop count and next hop, that is the router interface IP address from which the RIPv1 response was sent. As the requesting router receives updates from different neighbouring routers it will only update the reachable networks in its routing table, if it receives information about a reachable network it has not yet in its routing table or information that a network it has in its routing table is reachable with a lower hop count. Therefore, a RIPv1 router will in most cases only have one entry for a reachable network, the one with the lowest hop count. If a router receives information from two different neighbouring router that the same network is reachable with the same hop count but via two different routes, the network will be entered into the routing table two times with different next hop routers. The RIPv1 enabled router will then perform what is known as equal-cost load balancing for IP packets.[4]
RIPv1 enabled routers not only request the routing tables of other routers every 30 seconds, they also listen to incoming requests from neighbouring routers and send their own routing table in turn. RIPv1 routing tables are therefore updated every 25 to 35 seconds.[4] The RIPv1 protocol adds a small random time variable to the update time, to avoid routing tables synchronizing across a LAN.[5] It was thought, as a result of random initialization, the routing updates would spread out in time, but this was not true in practice. Sally Floyd andVan Jacobson showed in 1994 that, without slight randomization of the update timer, the timers synchronized over time.[6]
RIPv1 can be configured into silent mode, so that a router requests and processes neighbouring routing tables, and keeps its routing table and hop count for reachable networks up to date, but does not needlessly send its own routing table into the network. Silent mode is commonly implemented to hosts.[7]
RIPv1 usesclassful routing. The periodic routing updates do not carrysubnet information, lacking support forvariable length subnet masks (VLSM). This limitation makes it impossible to have different-sizedsubnets inside of the samenetwork class. In other words, all subnets in a network class must have the same size. There is also no support for router authentication, making RIP vulnerable to various attacks.
Due to the deficiencies of the original RIP specification, RIP version 2 (RIPv2) was developed in 1993,[4] published in 1994,[8] and declaredInternet Standard 56 in 1998.[9] It included the ability to carry subnet information, thus supportingClassless Inter-Domain Routing (CIDR). To maintainbackward compatibility, the hop count limit of 15 remained. RIPv2 has facilities to fully interoperate with the earlier specification if allMust Be Zero protocol fields in the RIPv1 messages are properly specified. In addition, acompatibility switch feature[9] allows fine-grained interoperability adjustments.
In an effort to avoid unnecessary load on hosts that do not participate in routing, RIPv2multicasts the entire routing table to all adjacent routers at the address224.0.0.9, as opposed to RIPv1 which usesbroadcast.Unicast addressing is still allowed for special applications.
(MD5) authentication for RIP was introduced in 1997.[10][11]
Route tags were also added in RIP version 2. This functionality allows a distinction between routes learned from the RIP protocol and routes learned from other protocols.
RIPng (RIP next generation) is an extension of RIPv2 for support ofIPv6, the next generationInternet Protocol.[12] The main differences between RIPv2 and RIPng are:
Support of IPv6 networking.
While RIPv2 supports RIPv1 updates authentication, RIPng does not. IPv6 routers were, at the time, supposed to useIPsec for authentication.[citation needed]
RIPv2 encodes the next-hop into each route entry, RIPng requires specific encoding of the next hop for a set of route entries.
RIPng sends updates on UDP port 521 using the multicast groupff02::9.
The routing information protocol uses the following timers as part of its operation:[13]
Update Timer
Controls the interval between two gratuitous Response Messages. By default the value is 30 seconds. The response message is broadcast to all its RIP enabled interface.[13]
Invalid Timer
The invalid timer specifies how long a routing entry can be in the routing table without being updated. This is also called as expiration Timer. By default, the value is 180 seconds. After the timer expires the hop count of the routing entry will be set to 16, marking the destination as unreachable.[13]
Flush Timer
The flush timer controls the time between the route is invalidated or marked as unreachable and removal of entry from the routing table. By default the value is 240 seconds. This is 60 seconds longer than Invalid timer. So for 60 seconds the router will be advertising about this unreachable route to all its neighbours. This timer must be set to a higher value than theinvalid timer.[13]
Holddown Timer
The hold-down timer is started per route entry, when the hop count is changing from lower value to higher value. This allows the route to get stabilized. During this time no update can be done to that routing entry. This is not part of the RFC 1058. This isCisco's implementation. The default value of this timer is 180 seconds.[13]
A RIP implementation first introduced in4.2BSD, routed, survives in several of its descendants, includingFreeBSD[16] andNetBSD.[17]
OpenBSD introduced a new implementation, ripd, in version 4.1[18] and retired routed in version 4.4.
Netgear routers commonly offer a choice of two implementations of RIPv2;[19] these are labelled RIP_2M and RIP_2B. RIP_2M is the standard RIPv2 implementation using multicasting - which requires all routers on the network to support RIPv2 and multicasting, whereas RIP_2B sends RIPv2 packets using subnet broadcasting - making it more compatible with routers that do not support multicasting, including RIPv1 routers.
Huawei HG633 ADSL/VDSL routers support passive and active routing with RIP v1 & v2 on the LAN and WAN side.
Cisco has ceased support and distribution of IGRP in their router software. It was replaced by theEnhanced Interior Gateway Routing Protocol (EIGRP) which is a completely new design. While EIGRP still uses a distance-vector model, it relates to IGRP only in using the same composite routing metric. Both IGRP and EIGRP calculated a single composite metric for each route, from a formula of five variables:bandwidth,delay,reliability,load, andMTU; though on Cisco routers, by default, only bandwidth and delay are used in this calculation.
^abcdeJeff Doyle; Jennifer Carroll (2005).CCIE Professional Development: Routing TCP/IP Volume I, Second Edition. ciscopress.com. p. 170.ISBN9781587052026.
^Jeff Doyle; Jennifer Carroll (2005).CCIE Professional Development: Routing TCP/IP Volume I, Second Edition. ciscopress.com. p. 171.ISBN9781587052026.