RIP

Also known as: Routing Information Protocol

On this page 7

RIP, the Routing Information Protocol, is a distance-vector routing protocol in which each router periodically advertises its entire routing table to its neighbors and selects paths by the lowest hop count. In networking and routing, it is one of the oldest interior gateway protocols still found in production, valued for its simplicity and limited by a maximum of 15 hops, slow convergence and a metric that ignores bandwidth and delay.

RIP runs over UDP port 520 (RIPng for IPv6 uses UDP port 521) and exists in three main versions: classful RIPv1, classless RIPv2 and RIPng. Modern designs usually prefer OSPF, EIGRP or IS-IS inside an organization, but RIP remains common on small routers, legacy sites, lab networks and some embedded devices.

How RIP exchanges routes

RIP follows the Bellman-Ford distance-vector model: a router knows only what its directly connected neighbors tell it, adds one hop to each advertised distance and keeps the route with the smallest total. It never builds a full map of the topology, which is the key difference from link-state protocols.

Every 30 seconds a RIP router sends a response message containing up to 25 route entries per packet, each with a destination prefix and a metric. When a router first starts, it can send a request message to obtain a neighbor’s full table immediately instead of waiting for the next periodic update. A route with a metric of 16 is unreachable, which is how RIP withdraws destinations.

The protocol relies on four timers. The following table lists their default values and their purpose; most implementations allow tuning, but all routers on a segment must use matching timer values.

TimerDefault valuePurpose
Update timer30 sInterval between full routing table advertisements
Invalid timer180 sRoute marked unreachable if no update arrives
Holddown timer180 sIgnores less attractive updates for a suspect route
Flush timer240 sRoute removed from the routing table entirely
Default RIP timers

RIP versions and their differences

The three RIP versions share the same hop-count metric and timers but differ in addressing and transport. RIPv1 is classful: it does not carry subnet masks, so it cannot support variable-length subnet masking or discontiguous networks, and it broadcasts updates to every host on the segment.

FeatureRIPv1RIPv2RIPng
Address familyIPv4IPv4IPv6
Subnet masksNot carriedCarried (VLSM, CIDR)Prefix length carried
Update deliveryBroadcastMulticast 224.0.0.9Multicast FF02::9
Transport portUDP 520UDP 520UDP 521
AuthenticationNonePlain text or MD5Relies on IPsec
Next hop fieldNoYesYes, separate entry
Comparison of RIP versions

RIPv2 added classless routing, a route tag for marking externally learned routes, an explicit next-hop field and authentication so a router accepts updates only from trusted neighbors. RIPng adapts the same logic to IPv6 and removes built-in authentication in favor of the security mechanisms of IPv6 itself.

Loop prevention and convergence

Distance-vector protocols are vulnerable to routing loops and the count-to-infinity problem: when a network fails, two routers can keep advertising the dead route to each other, raising the metric by one each round. RIP limits the damage by defining 16 as infinity, so a loop eventually ends, but this is the reason the network diameter is capped at 15 hops.

  • Split horizon stops a router from advertising a route back out of the interface through which it learned it.
  • Poison reverse goes further and advertises such a route back with a metric of 16, explicitly marking it unusable.
  • Triggered updates send changes immediately instead of waiting for the next 30-second cycle.
  • Holddown prevents a router from accepting a worse path to a recently failed destination too early.

Even with these safeguards, convergence after a failure often takes from tens of seconds to several minutes, depending on topology and timer values. During that time traffic may be dropped or loop briefly, which is acceptable on a small branch network but not in a data center or service provider core.

How RIP compares with other routing protocols

RIP sits at the simple end of dynamic routing. The comparison below places it next to the interior protocols that usually replace it and next to static routes, which many small networks use instead.

ApproachAlgorithm typeMetricConvergenceTypical scale
RIPDistance vectorHop countSlowSmall, under 15 hops
OSPFLink stateCost based on bandwidthFastMedium to large enterprise
EIGRPAdvanced distance vectorComposite, bandwidth and delayFastMedium to large enterprise
IS-ISLink stateConfigurable costFastLarge provider networks
Static routeNoneAdministrative choiceManualVery small or stub networks
RIP compared with neighboring approaches

The most important practical weakness is the metric. RIP treats a slow 2 Mbit/s link and a 10 Gbit/s link as equal if each counts as one hop, so it can choose a path with fewer hops but far less capacity. OSPF and EIGRP account for bandwidth, which is why they produce better paths in mixed networks. BGP, by contrast, is an exterior protocol for routing between autonomous systems and is not a direct alternative.

Configuring and operating RIP

A typical RIPv2 configuration enables the protocol, declares the connected networks to advertise and turns off automatic summarization, which otherwise collapses subnets to classful boundaries and can break discontiguous designs. Administrators often mark user-facing interfaces as passive interfaces, so the router still advertises those subnets but does not send updates toward end hosts.

The decision table below summarizes where RIP still makes sense and where another approach is the better choice.

SituationRecommended choiceReason
Lab or training networkRIPv2Easy to observe distance-vector behavior
Small site with a few routersRIPv2 or static routesLow overhead and minimal configuration
Legacy device without OSPFRIPv2 with redistributionKeeps the device integrated
Redundant links of different speedsOSPF or EIGRPHop count ignores bandwidth
More than 15 hops or fast failoverOSPF or IS-ISRIP diameter and convergence limits
When to use RIP

Common mistakes include running RIPv1 and RIPv2 together without matching version settings, leaving authentication off on segments with untrusted devices, and redistributing routes into RIP without a sensible seed metric, which can make external routes appear unreachable or create loops.

A non-technical view

RIP is a way for routers to share directions with each other. Every half minute, each router tells its neighbors which networks it can reach and how many steps away they are. The neighbors add one step and pass the news on, so after a while every router knows the shortest way by number of steps.

The weakness is that RIP counts only steps, not road quality. It is like choosing a route by the number of intersections while ignoring whether the road is a motorway or a narrow lane. It also forgets about anything more than 15 steps away. That makes it easy to use but best suited to small networks.

A concrete example

A small manufacturing company runs three buildings, each with its own router, connected in a ring by fiber links. An older production controller in one building supports only RIP, so the network team runs RIPv2 on all three routers with MD5 authentication, disables automatic summarization and sets the office access interfaces as passive.

When a fiber link between two buildings is cut during construction work, the affected routers stop receiving updates over that link. Triggered updates and poison reverse spread the failure, and traffic reroutes through the third building after a short interruption. Because the network has only three hops and links of equal speed, the hop-count metric picks sensible paths, and the team avoids the cost of migrating the controller while the rest of the network stays dynamic.