Question
Consider a computer network using the distance vector routing algorithm in its network layer. The partial topology of the network is as shown below.
The objective is to find the shortest-cost path from the router to routers and . Assume that does not initially know the shortest routes to and . Assume that has three neighbouring routers denoted as , and . During one iteration, measures its distance to its neighbours , and as 3, 2, and 5, respectively. Router gets routing vectors from its neighbours that indicate that the distance to router from routers , and are 7, 6, and 5, respectively. The routing vector also indicates that the distance to router from routers , and are 4, 6, and 8, respectively. Which of the following statement(s) is/are correct with respect to the new routing table of , after updation during this iteration?
Official answer and solution
- Official answer
- B and C
- From
- Official GATE 2021 answer key
Solution
Apply the Bellman-Ford distance vector update equation for destinations and .
Router has direct links to neighbors with link costs:
Calculate the updated distance to destination :
- Via neighbor :
- Via neighbor :
- Via neighbor :
Taking the minimum:
Thus, the distance to is stored as 8 (not 10), and the next hop router is . Statement C is correct, and statement A is incorrect.
Calculate the updated distance to destination :
- Via neighbor :
- Via neighbor :
- Via neighbor :
Taking the minimum:
Thus, the distance to is stored as 7, and the next hop router is (not ). Statement B is correct, and statement D is incorrect.
Hence, statements B and C are correct.
B, C
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2021 Computer Science and Information Technology - Session 2 (CS2)
- Question
- 55 of 65, printed as CS Q.45
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.