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.

Partial network topology: router R at the top is connected to its three neighbours X, Y and Z. Each of X, Y and Z has further links that continue off into dots (unknown parts of the network). Routers Q and P at the bottom each have a link that continues upward into dots.
Network topology for distance vector routing

The objective is to find the shortest-cost path from the router RR to routers PP and QQ. Assume that RR does not initially know the shortest routes to PP and QQ. Assume that RR has three neighbouring routers denoted as X,YX, Y, and ZZ. During one iteration, RR measures its distance to its neighbours X,YX, Y, and ZZ as 3, 2, and 5, respectively. Router RR gets routing vectors from its neighbours that indicate that the distance to router PP from routers X,YX, Y, and ZZ are 7, 6, and 5, respectively. The routing vector also indicates that the distance to router QQ from routers X,YX, Y, and ZZ are 4, 6, and 8, respectively. Which of the following statement(s) is/are correct with respect to the new routing table of RR, after updation during this iteration?

Choose every correct option
Official answer and solution
Official answer
B and C
From
Official GATE 2021 answer key

Solution

Apply the Bellman-Ford distance vector update equation DR(d)=min⁡v{c(R,v)+Dv(d)}D_R(d) = \min_{v} \{ c(R, v) + D_v(d) \} for destinations PP and QQ.

Router RR has direct links to neighbors X,Y,ZX, Y, Z with link costs:

c(R,X)=3,c(R,Y)=2,c(R,Z)=5c(R, X) = 3, \quad c(R, Y) = 2, \quad c(R, Z) = 5

Calculate the updated distance to destination PP:

  • Via neighbor XX: c(R,X)+DX(P)=3+7=10c(R, X) + D_X(P) = 3 + 7 = 10
  • Via neighbor YY: c(R,Y)+DY(P)=2+6=8c(R, Y) + D_Y(P) = 2 + 6 = 8
  • Via neighbor ZZ: c(R,Z)+DZ(P)=5+5=10c(R, Z) + D_Z(P) = 5 + 5 = 10
    Taking the minimum:
DR(P)=min⁡(10,8,10)=8with next hop YD_R(P) = \min(10, 8, 10) = 8 \quad \text{with next hop } Y

Thus, the distance to PP is stored as 8 (not 10), and the next hop router is YY. Statement C is correct, and statement A is incorrect.

Calculate the updated distance to destination QQ:

  • Via neighbor XX: c(R,X)+DX(Q)=3+4=7c(R, X) + D_X(Q) = 3 + 4 = 7
  • Via neighbor YY: c(R,Y)+DY(Q)=2+6=8c(R, Y) + D_Y(Q) = 2 + 6 = 8
  • Via neighbor ZZ: c(R,Z)+DZ(Q)=5+8=13c(R, Z) + D_Z(Q) = 5 + 8 = 13
    Taking the minimum:
DR(Q)=min⁡(7,8,13)=7with next hop XD_R(Q) = \min(7, 8, 13) = 7 \quad \text{with next hop } X

Thus, the distance to QQ is stored as 7, and the next hop router is XX (not ZZ). Statement B is correct, and statement D is incorrect.

Hence, statements B and C are correct.

Final answer

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.