1. Library
  2. Computer Networks
  3. Routing and Networks
  4. Routing Protocols

Updated 8 hours ago

RIP (Routing Information Protocol) is the oldest dynamic routing protocol still found in networks. Developed in the 1980s when networks were small and router CPU cycles were precious, RIP answered a simple question: how do routers share what they know about network topology?

The answer RIP chose—ask your neighbors how far everything is, believe the shortest answer, then tell your neighbors what you learned—is so intuitive it seems obvious. It's also deeply flawed in ways that took years to fully understand. Every limitation of RIP became a lesson that shaped modern protocols.

How RIP Works

RIP is a distance-vector protocol. Each router maintains a table of destinations and distances (measured in hops—the number of routers a packet must traverse). The operation is simple:

  1. Every 30 seconds, each router broadcasts its entire routing table to neighbors
  2. When a router receives updates, it checks if any advertised path is shorter than what it currently knows
  3. Shorter paths replace longer ones; the router increments the hop count (adding itself) before advertising onward
  4. Routes that aren't refreshed within 180 seconds are marked invalid; after 240 seconds, they're deleted

RIP asks every neighbor: "How far is everything?" Then it believes whatever answer sounds closest. This works until someone lies, disappears, or takes too long to respond.

The 15-Hop Limit

RIP declares any destination more than 15 hops away as unreachable. Hop count 16 means infinity—"I can't get there from here."

This seems arbitrary until you understand why it exists. Distance-vector protocols are vulnerable to the count-to-infinity problem. When a network becomes unreachable, routers don't immediately know. Router A might think it can reach the network through Router B. Router B, having just lost its route, might think it can reach the network through Router A. They advertise to each other, each incrementing the hop count. Without a maximum, they'd count forever.

Fifteen hops isn't a design choice—it's a panic button. It's what happens when you can't reliably distinguish "far away" from "gone forever."

Why 30 Seconds?

RIP broadcasts complete routing tables every 30 seconds whether anything changed or not. This seems wasteful—and it is—but RIP has no mechanism to detect what changed. It only knows what it knows now. Periodic full updates are the simplest way to ensure eventual consistency.

The cost is convergence time. When topology changes, the news travels hop by hop, update by update. A failure at the network's edge might take minutes to propagate everywhere. During that time, routers have inconsistent views. Packets get lost. Loops form.

Modern protocols track changes and send only what's different, only to routers that need to know. RIP predates that sophistication.

Loop Prevention: Patches on Patches

RIP's fundamental trust model—believe the neighbor with the shortest distance—creates loop vulnerabilities. The protocol accumulates mechanisms to contain the damage:

Split Horizon: Don't advertise a route back to the neighbor you learned it from. If you learned about Network X from Router B, don't tell Router B about Network X.

Route Poisoning: When a route fails, immediately advertise it as unreachable (hop count 16) rather than waiting for it to time out.

Hold-Down Timers: After a route fails, ignore new information about it for 180 seconds. This prevents oscillation when conflicting updates propagate.

These mechanisms help but don't solve the underlying problem. They're damage control for a protocol that fundamentally can't distinguish between "the network moved" and "my neighbor is confused."

RIP Versions

RIPv1 was classful—it couldn't handle variable-length subnet masks or CIDR. It broadcast updates, wasting bandwidth. It had no authentication. RIPv1 is obsolete.

RIPv2 (RFC 2453) added subnet masks to updates, enabling classless routing. It switched from broadcast to multicast. It added MD5 authentication. These improvements made RIP usable in the CIDR era but didn't address the fundamental limitations.

RIPng extends RIPv2 to IPv6. Same basic protocol, different address family.

The Hop Count Problem

RIP measures distance in hops. A path through three routers is "shorter" than a path through five routers, regardless of anything else.

This means RIP treats a three-hop path over dial-up links identically to a three-hop path over 100 Gbps fiber. It has no concept of bandwidth, latency, or reliability. The metric that seemed intuitive—fewer hops means closer—turns out to be almost useless for optimizing real traffic flow.

OSPF uses cost based on bandwidth. EIGRP considers bandwidth, delay, reliability, and load. RIP counts routers and hopes for the best.

Why RIP Still Exists

RIP is rarely the right choice, but it persists:

Legacy systems: Some ancient equipment only speaks RIP.

Tiny networks: Networks with three routers in a line don't need OSPF's sophistication.

Education: RIP's simplicity makes it useful for teaching routing concepts before introducing the complexity of link-state protocols.

Resource constraints: RIP's minimal CPU and memory requirements matter on devices from the 1990s. Those devices should be replaced, but sometimes they aren't.

What RIP Taught Us

RIP's limitations became the design requirements for its successors:

  • The 15-hop limit demanded protocols that could handle arbitrary network diameters (OSPF has no hop limit)
  • Slow convergence demanded triggered updates and incremental changes (OSPF and EIGRP converge in seconds)
  • Wasted bandwidth demanded sending only changes, only to affected routers
  • The useless hop-count metric demanded composite metrics considering real link characteristics
  • Loop vulnerabilities demanded fundamentally different approaches (OSPF's link-state database provides a consistent view; EIGRP's DUAL algorithm guarantees loop-free paths)

RIP is the fossil record of routing. Every bone tells us what problem existed, what solution seemed obvious, and why that solution eventually failed.

Frequently Asked Questions About RIP

Was this page helpful?

😔
🤨
😃