edited by
23,449 views
48 votes
48 votes

Consider a network with five nodes, $N1$ to $N5$, as shown as below.

The network uses a Distance Vector Routing protocol. Once the routes have been stabilized, the distance vectors at different nodes are as follows.

N1: $(0, 1, 7, 8, 4)$

N2: $(1, 0, 6, 7, 3)$

N3: $(7, 6, 0, 2, 6)$

N4: $(8, 7, 2, 0, 4)$

N5: $(4, 3, 6, 4, 0)$

Each distance vector is the distance of the best known path at that instance to nodes, $N1$ to $N5$, where the distance to itself is $0$. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors.

The cost of link $N2-N3$ reduces to $2$ (in both directions). After the next round of updates, what will be the new distance vector at node, $N3$?

  1. $(3, 2, 0, 2, 5)$
  2. $(3, 2, 0, 2, 6)$
  3. $(7, 2, 0, 2, 5)$
  4. $(7, 2, 0, 2, 6)$
edited by

4 Answers

Best answer
77 votes
77 votes

Answer is (A).

1. As soon as $N2-N3$ reduces to $2$,both $N2$ and $N3$ instantly updates their distance to $N3$ and $N2$ to $2$ respectively. So, $N2$: $(1, 0, 2, 7, 3)$, $N3$: $(7, 2, 0, 2, 6)$ becomes this.

After this starts first round of update in which each node shares its table with their respective neighbors ONLY. BUT KEEP IN MIND THAT ONLY OLD TABLES WILL BE SHARED.What I mean is tables that will be used for updation at this moment contain the values as $N1$$:$ $(0, 1, 7, 8, 4)$,$N2:$ $(1, 0, 2, 7, 3)$,$N3$: $(7, 2, 0, 2, 6)$,$N4:$ $(8, 7, 2, 0, 4)$,$N5:$ $(4, 3, 6, 4, 0)$.

SEE at this time all the entries are old EXCEPT in $N2$ and $N3$ where value changes to $2$ instead of $6$.

Question asks for $N3$. So focus on that.

N3 receives tables from $N2:$ $(1, 0, 2, 7, 3)$ and $N4:$ $(8, 7, 2, 0, 4)$. Using THIS ONLY original $N3:$ $(7, 2, 0, 2, 6)$ updates to $N3(3,2,0,2,5)$. (For updation and forming the tables for this refer FOROUZAN.)

So, answer is (A).

edited by
4 votes
4 votes

Last line of the question is very important to solve this correctly

1 votes
1 votes
4.11  Answer should be A.

Each node sends their distance vectors to their neighbours. So, N3 receives the following updates in next round of updates.

From N2 - B{1,0,6,7,3}

From N4 - C{8,7,2,0,4}

Now, the new distance from N3 to N2 is 2 and to N4 is 2.

So, the table for N3 will be updated as follows;

Suppose array A represents distance vectors at N3, B represents distance vectors received from N2 and C represents distance vectors received from N4.

for i=1 to 5 :

     A[i] = minimum(A[i],B[i]+2,C[i]+2)

 

Hence, the updated value will be A{3,2,0,2,5}

 

4.12 Answer is a) 3.

N2 reports the distance to N1 as infinity but since N3 already has an entry 3 for distance to N1, it will not update the entry.
1 votes
1 votes
At first, Option (D) seems to be the correct answer if we consider immediate round after the cost changes. But, the question asks for the new distance vector after next

round of updates (note the plural).
Answer:

Related questions