Back to the 2022 paper

Module 3: Network Layer & Routing

202214m

Describe RIP routing protocol with an example. Explain count to infinity problem and its countermeasures.

Worked SolutionAI Assisted

RIP Routing Protocol, Example, Count-to-Infinity Problem and Countermeasures

RIP (Routing Information Protocol) is a distance-vector (Bellman-Ford) interior gateway protocol in which every router periodically shares its entire routing table with its neighbours and computes routes as the minimum of the costs reported by its neighbours plus the cost of the link to each neighbour.

1. Key characteristics

  • Metric: hop count; maximum usable metric = 15 hops, 16 = infinity (unreachable).
  • Update: full table every 30 s over UDP port 520 (RIPv1 broadcast 255.255.255.255; RIPv2 multicast 224.0.0.9).
  • RIPv1 is classful (no subnet mask, no VLSM); RIPv2 supports classless masks, authentication and next-hop field.
  • Simple to configure; used in small networks; limited by the 15-hop limit and slow convergence.

2. Example

          A(1)---(1)B---(1)C
           |            /
           |----(1)D----/

Link costs = 1 each.

Round 1 (D advertises): D tells C "to A via me, cost 2" (D→A cost 1 + link 1). C computes A cost = 2+1 = 3.
Round 2 (B advertises): B tells C "to A cost 1", so C recomputes A cost = 1+1 = 2 and installs route A → next hop B, metric 2 (better than via D = 3).
Round 3: C shares with B and D; every router converges to its least-hop route:

Router Destination Next hop Metric
B A direct 1
C A B 2
D A direct 1
C D direct 1

Routers apply split horizon (never advertise a route back out the interface it was learned from) and delete stale entries after 180 s without an update (garbage-collection timer).

3. Count-to-infinity problem

If the A–B link fails, B loses its direct route to A. But C still advertises "A via D, metric 2" (stale, reverse of the old path), so B learns "A via C, cost 3" and advertises it to C. C then computes via B = 4, advertises 4 to B, B computes 5, and so on. Because each neighbour believes the other's stale distance is good news, the metric increments by 1 on every exchange until it reaches 16 (infinity) — a classic count-to-infinity loop where packets circulate while the metric climbs. Convergence is very slow (could be minutes), during which time packets are routed in circles.

Root cause: distance-vector has no notion of "poisoned" routes — old stale information from a neighbour looks like new information.

4. Countermeasures

  1. Split horizon: never advertise a route back the interface it came from — eliminates the basic A↔B↔C loop above.
  2. Poison reverse: actively advertise the failed route with metric 16 (infinity) to the neighbour from which it was learned, poisoning it faster than silence.
  3. Hold-down timer: on learning a route is unreachable, ignore updates about that route for a fixed period (typically 180 s), stopping stale bad news from being accepted.
  4. Triggered (flash) updates: advertise a change immediately on topology change instead of waiting for the 30 s periodic update, speeding convergence.
  5. Maximum metric 16: bounds the counting process — the count always terminates at infinity.

Conclusion: RIP's periodic distance-vector updates make it simple, but the count-to-infinity problem makes convergence slow; split horizon, poison reverse, hold-down timers and triggered updates together mitigate it (modern link-state protocols such as OSPF avoid the problem entirely).

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.