Back to the 2024 paper

Module 3: Network Layer & Routing

20247m

Describe the intra-AS routing protocol: RIP in detail.

Worked SolutionAI Assisted

RIP (Routing Information Protocol)

RIP is an intra-AS (interior gateway) routing protocol based on the distance vector algorithm (Bellman-Ford). It works inside a single autonomous system and is defined in RFC 1058 (RIPv1) and RFC 2453 (RIPv2).

Key characteristics

  • Metric = hop count. Every link costs 1. The cost of a route is the number of routers (hops) to the destination.
  • Maximum hop count = 15. A metric of 16 means infinity (unreachable), so RIP suits only small networks.
  • Transport: RIP messages are carried in UDP, port 520.
  • Updates: each router sends its entire routing table to its directly connected neighbours every 30 seconds (periodic advertisement).
  • Versions: RIPv1 is classful and broadcasts updates; RIPv2 supports CIDR/subnet masks, multicast (224.0.0.9) and authentication; RIPng supports IPv6.

Routing table entry

Destination network | Next hop | Distance (hops)

Algorithm (Bellman-Ford update)

When router X receives a vector from neighbour N:

d(X, D) = min over neighbours [ 1 + d(N, D) ]

  1. Add 1 to the cost of every route advertised by the neighbour.
  2. If the destination is new, add it with next hop = N.
  3. If it is already known via N, replace the cost with the new value (even if larger, since N is the next hop and its information is authoritative).
  4. If it is known via a different next hop, replace it only if the new cost is smaller.

RIP message types

  • Request: asks a neighbour for all or some routes (sent at start-up).
  • Response: carries routing table entries, either periodic or triggered.

Timers

Timer Value Purpose
Periodic 30 s Send routing updates
Expiration (timeout) 180 s If no update for a route within this time, mark it invalid (metric 16)
Garbage collection 120 s Keep the invalid route advertised as 16 before deleting it

Problems and solutions

Count-to-infinity / slow convergence: bad news travels slowly, so routers may keep increasing the cost of a failed route until it reaches 16.

Fixes:

  • Split horizon: do not advertise a route back out of the interface from which it was learned.
  • Poison reverse: advertise it back with metric 16 (infinity).
  • Triggered updates: send an update immediately when a route changes.
  • Hold-down timers and a low infinity value (16).

Advantages and disadvantages

Advantages Disadvantages
Simple and easy to configure Limited to 15 hops
Low router resource usage Slow convergence, count-to-infinity
Widely supported Hop count ignores bandwidth and delay
Sends the full table every 30 s, wasting bandwidth

OSPF is preferred for larger networks.

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.