CS FundamentalsVery hardProduct company interview · GATE level

Routers A, B and C run a basic distance-vector protocol with no split horizon or poisoned reverse. Link costs are A-B = 3, B-C = 2 and A-C = 40, and the tables are stable (B reaches C at cost 2, A reaches C at cost 5 via B). The cost of link B-C now rises to 30. B recomputes first and advertises to A; from then on A and B alternately recompute and advertise whenever their distance to C changes. Counting every change of the distance-to-C entry at A or B (including B's first), how many changes occur before the tables are stable, and what are the final distances to C?

  1. A. 8 changes; A = 29, B = 26
  2. B. 2 changes; A = 33, B = 30
  3. C. 10 changes; A = 40, B = 30
  4. D. 10 changes; A = 33, B = 30

Correct answer: D. 10 changes; A = 33, B = 30

B still believes A can reach C at cost 5, so it picks min(30, 3 + 5) = 8 - a route that actually loops back through B. Then A: min(40, 3 + 8) = 11; B: 14; A: 17; B: 20; A: 23; B: 26; A: 29; B: min(30, 3 + 29) = 30; A: min(40, 3 + 30) = 33; B: min(30, 36) = 30, unchanged. B's entry took the values 8, 14, 20, 26, 30 and A's 11, 17, 23, 29, 33: 10 changes in all. Only 2 changes would be needed if B knew A's route went through B itself, which is what poisoned reverse provides. A does not end at 40 because 3 + 30 = 33 through B is cheaper than the direct link.

More Computer Networks questions

Exams that ask this topic