CS FundamentalsVery hardProduct company interview · GATE level
Five routers use distance-vector routing with link costs A-B = 1, B-C = 2, C-D = 1, D-E = 3, A-E = 12, A-D = 7 and B-D = 5. Initially each router knows only the costs of its own links. In each round all routers simultaneously send their current vectors to their neighbours and then all recompute. What is A's distance to E after exactly two rounds?
- A. 9
- B. 10
- C. 7
- D. 12
Correct answer: A. 9
After r rounds a router knows the best path of at most r + 1 hops. Start: A-E = 12 (1 hop). After round 1 (2 hops): A-D-E = 7 + 3 = 10. After round 2 (3 hops): A-B-D-E = 1 + 5 + 3 = 9. Only after round 3 does A learn the true shortest path A-B-C-D-E = 1 + 2 + 1 + 3 = 7, which needs 4 hops. So after two rounds the entry is 9; 7 is the converged value, and 10 is the value one round earlier.
More Computer Networks questions
- Dijkstra's algorithm is run from S on an undirected network with link costs S-A 7, S-B 2, S-C 6, A-B 3, B-D 8, A-D 4, B-C 5, C-E 5, D-E 1…
- The block 10.20.64.0/20 is allocated with VLSM, always taking the lowest free addresses and handling requests in this order: LANs needing…
- A router uses longest-prefix matching with these entries: 10.4.0.0/14 -> interface A, 10.6.0.0/15 -> interface B, 10.6.128.0/17 ->…
- A site owns 172.18.72.0/22, 172.18.76.0/23 and 172.18.80.0/22 and wants to advertise them with one prefix. What is the smallest single…
- From the block 192.168.0.0/22, three subnets have already been assigned: 192.168.1.64/26, 192.168.2.0/25 and 192.168.3.240/28. How many…
- Host X sends 10 packets of 1000 bytes each to host Y through two store-and-forward routers. The three links on the path have rates 2 Mbps…