1. LPU MCA Semester 1
  2. CAP7001
  3. Unit 4

CAP7001 · Unit 4: Network layer

Distance vector routing and RIP

10 practice questions · in the ETE syllabus

Key points

  • Cost = min over neighbours of link cost + advertised cost
  • RIP metric is hop count and 16 is infinity
  • RIP sends the whole table about every 30 seconds
  • Split horizon omits a route, poison reverse advertises it as 16
  • Updates from the current next hop must be accepted even if worse

In distance vector routing each router tells its direct neighbours the distance to every network it knows. It uses the Bellman-Ford rule: the cost to a destination is the minimum, over neighbours, of the link cost to the neighbour plus the neighbour's advertised cost.

Worked example: A is linked to B at cost 2 and to C at cost 5. B advertises X at 7 and C advertises X at 1. A records min(2 + 7, 5 + 1) = 6 via C.

RIP is the classic distance vector protocol. Its metric is hop count, a receiver adds 1 to each advertised metric, and 16 means infinity (unreachable), so the largest usable distance is 15. Routers send their whole table about every 30 seconds.

Problems and fixes:

  • Count to infinity: bad news spreads slowly as routers feed each other stale routes.
  • Split horizon: do not advertise a route out of the interface it came from.
  • Poison reverse: advertise it back with metric 16 instead of omitting it.

If an update comes from the current next hop, the router must accept the new cost even when it is worse: a route at 4 via B, with B now reporting 6, becomes 7.

Exam trap: an advertised metric of 15 becomes 16 after adding the hop, so that route is unusable.

Try two questions

Question 1 · Tier 2, Understand

Which statement about distance vector routers is correct?

  1. Each router floods link states to every router in the area
  2. Each router builds a full topology map and runs Dijkstra
  3. Each router asks a central server for the best path
  4. Each router shares its whole table with its direct neighbours
Show the answer

D. Distance vector routers only know what neighbours tell them, which is called routing by rumour.

Why not A: Flooding link states is link state routing.

Why not B: Building a topology map and running Dijkstra is link state routing.

Why not C: Distance vector routing is distributed and has no central server.

Question 2 · Tier 4, Analyse

With split horizon and poison reverse, what does B advertise to A for a route that B learned from A?

  1. The route with metric 16, meaning unreachable
  2. The route with metric 0, meaning directly attached
  3. The route with its true metric, as normal
  4. Nothing at all, because the route is omitted
Show the answer

A. Poison reverse actively advertises infinity back to the source so that A cannot be misled.

Why not B: Metric 0 would claim B is attached to the network.

Why not C: Advertising the true metric is what causes the loop.

Why not D: Omitting the route is plain split horizon; poison reverse sends an explicit infinity.