Skip to main content

Routing Information Protocol (RIP)

Short answer

RIP is a distance vector protocol that uses hop count (max 15). Routers broadcast their full routing tables every 30 s; receivers increment hops and update routes if shorter. For example, a network A-B-C learns routes gradually. Split horizon and triggered updates mitigate looping.

Explain the working process of the Routing Information Protocol (RIP) with example.

RIP (Routing Information Protocol) is an intra-domain (interior gateway) routing protocol based on the distance vector algorithm (Bellman-Ford). It uses hop count as the metric, with a maximum of 15 hops (16 means infinity or unreachable). RFC 1058 defines RIPv1, and RIPv2 adds subnet mask support and multicast. It runs over UDP port 520.

Working

  1. At start, each router knows only its directly connected networks, with distance 0 or 1.
  2. Every 30 seconds each router sends its whole routing table (as a response message) to its neighbours.
  3. A receiving router adds 1 to each received distance and compares:
    • new destination: add it, with the sender as next hop;
    • better (smaller) distance: replace the entry;
    • same next hop: update to the new distance.
  4. Timers: update (30 s), invalid/timeout (180 s) without update marks route as unreachable, garbage collection (120 s) removes it.
  5. Problems such as count-to-infinity are reduced by split horizon, route poisoning and triggered updates.

Example

Network: A - B - C, networks N1 (on A), N2 (A-B link), N3 (B-C link), N4 (on C).

Router A (dest, hop, next)After 1st exchangeAfter 2nd exchange
N1, 1, directN1, 1, directN1, 1, direct
N2, 1, directN2, 1, directN2, 1, direct
N3, -N3, 2, via BN3, 2, via B
N4, --N4, 3, via B

Router B first learns N4 from C (distance 2), then tells A, which adds 1 and gets 3. After a few update intervals all routers have converged.

Limitations: slow convergence, small diameter (15 hops), and hop count ignores link speed.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Networks and Security chapter 4 questions →