4.6k views

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, the link $N1-N2$ goes down. $N2$ will reflect this change immediately in its distance vector as cost, $\infty$. After the NEXT ROUND of update, what will be the cost to $N1$ in the distance vector of $N3$ ?

1. $3$
2. $9$
3. $10$
4. $\infty$
edited | 4.6k views
0
"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." is given in the question, that means to reflect that change and reach it till N3 it will take 2 rounds and as what asked in the question in 1 round it must be 3 itself?! please help, wont the shared distance vectors from previous round itself with no change @ N3, changes will only be reflected at N2 only for 1 round
0
Why it's answer is not 3? Can someone plz tell whether we compare current table entries with received tables or not? Here after seeing the answer it seems that we are only comparing  entries of received tables.
+1
Simple question. Giving  try is quicker then reading all the comments and answer :)
+1

What does the following line means

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.

Does changing N2-N3 should change only N2 cost in N3 table or the entire cost of all nodes in table of N3?

0
The cost of link N2-N3 reduces to 2 (in both directions) --> this line is confusing. The link n2 n3 changes it's fine. But does the distance vectors changes in their routing tables in that state only??
0
After updating  of N2 -N1 as inf.  N3  will receive value from N4(8,4,2,0,4) and N2(inf,0,2,4,3)

Here N4 has updated from (8,7,2,0,4) to (8,4,2,0,4) in previous round .

" Imp to note that neighbours will  propagate  their distance vectors only when THERE IS A CHANGE IN THEIR  DVs" so N4 got updated that's why it will send it's Dv to N3

" Second imp point .. node will update its value to new value received from the neighbour even if neighbour has larger value , this is the case when there is a change in neighbours value for the same hop"

For eg. Here N3 will receive inf from N2 to reach N1 , prior this N3 already can reach with distance 3 via N2 ,  thus neighbour node (I.e N2 ) changed its value for the same hop(I.e. N1), therefore N3 has to update it as inf .

After this N4's table is also their to compare ..from their we can change N3's hop to reach N1 via N4 as N4 propagates value 8+2 , which is lesser than inf
+1

0
What will be the values of N2 here?
0
reading comments will get u more confused here,  just see the vectors given in the question .

and as said if any link is suddenly changed it will immediately reflect in the nodes connected to that edge only..

now in each round of update each node is getting dist. vector  from its neighbors (Keep in mind that link which got changed immediately will be updated and this vector in which only that entry is updated will be forwarded to neighbours )...

just follow these steps and again i'm saying , see the vectors given in the question and find out the answer by writing on the paper.

it is pretty easy.

Note : thing which got me confused was that why didn't N4 updated its value to 5 for entry N1 after receiving packet from N3 , then i suddenly saw the vector given in the question it was 7 for N1 entry in N3 distance vector. so N4 got vector N3 (7, 2, 0, 2, 6) in the previous round of update.which is why it didn't change its value for N1 from its previous value.

then its just simply straight forward .
0
yes the answer should not be 7?
0

@Dheer

No answer will be 10 only..

0

@akash.dinkar12 latest distance(Min from all neighbours) has to update whether initial own table contain less cost.

i.e Min(infinity,10)=10 am i correct?

First, as soon as N1-N2 goes down, N2 and N1 both update that entry in their tables as infinity.So N2 at this moment will be N2(inf,0,2,_,_). I have left blank coz that details are not important.

Now for N3 to get updated in the subsequent round it will get tables from N2 and N4 only. But first we need to find the N4 calculated in previous update. So in previous question N4 received updates from N3 and N5 which are N3: (7, 6, 0, 2, 6),N5: (4, 3, 6, 4, 0).

NOW THIS IS VERY IMPORTANT AS WHY N4 DID NOT GET UPDATED TABLES FROM N3. SO ANSWER IS THAT these tables were shared at the same moment and so in a particular round of update old values of all the tables are used and not the updated values.

N3 was updates AFTER IT PASSED ITS OLD table to its neighbors AS WHY WOULD N4 WAIT FOR N3 to GET UPDATED first !!! So N4 will update its table (in prev question) to N4(8,7,2,0,4).

See here path to N1 exists via N5 and not via N3 bcoz  when table was shared by N3 it contained path to N1 as 7 and N1 via N3 sums to 7+2 =9 . Now when N3 receives tables from N2(inf,0,_,_,_) and N4(8,7,2,0,4).

At first it will see its distance to N1 as "Inf" and NOT 3 because "inf" is the new distance with the same Next hop N2 (If next hop is same, new entry is updated even though it is larger than previous entry for the same NEXT HOP).

But at the same time it sees distance to N1 from N4 as 8 and so updates with the value (N3-N4 + N4-N1)= (2+8)=10. So N3-N1 distance in N3(10,_,0,_,_) is 10.

So, answer is (C)

Reference: http://www.cs.princeton.edu/courses/archive/spr11/cos461/docs/lec14-distvector.pdf

answered by Loyal (7.7k points)
edited
0

I THINK THE LINE IN BRACKETS CREATS PROBLEM BECZ ORIGINAL LANGUAGE IS DIFFERENT IN QUESTION . WE ARE NOT GIVEN THAT WE NEED TO DO NEXT ROUND OF  UPDATE AFTER UPDATION OF LINK THIS CREATE TWO TIMES OF UPDATIONS ...SO I THINK THIS SENTENCE IS EXTRA

The cost of link N2-N3 reduces to 2 (in both directions). {After the next round of updates,} the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector as cost, ∞∞. After the NEXT ROUND of update,

0

@Ayush Upadhyaya why we are considering old table ?As question clearly mention tht after reducing to 2 link down so we have to calculate from previous question na?

0

@jk_1-where exactly you have problem in my comment? I too think something went wrong so help me trace it. :)

0
I am saying why we are taking previous node distance vectors ? As question clearly. Saying that we have to first decrease by 2 and then it goes down .so we should calculate new distance vector from updated vectors
0

@jk_1-Check this

Still any trouble then feel free to ask again.

0
After the last exchange & the link down between N2 & N1 the distance vectors for,

N2 is (infinity, 0, 2, 4, 3)

N3 is (3, 2, 0, 2, 5)

N4 is (8, 4, 2, 0, 4)

now N3 will get vectors from N2 & N4 we should have min(3, infinity+2, 8+2). so N3-N1 record should be 3?? Please explain to me what am i doing wrong??
0

@noxevolution  N4 update next round up.

what dou mean to say "After the last exchange"

0
means last round or last hop.
0
ok...n hope stabilize at max (n-1) round....after down you have to check  at least 4 round then you will get  ans....did you check it.
0

When N2-N3 link cost reduces to 2, does N3 not change its distance vector from (7,6,0,2,6) to (3,2,0,2,6) ?,

"Each router receives and saves the most recently received distance vector from each of its neighbors. "(taken from here :https://www.geeksforgeeks.org/computer-network-routing-protocols-set-1-distance-vector-routing/)

I think each router keeps with it the  information of it's links and the tables shared by its neighbours, so when ever the a link goes down or cost changes , it recalculates its distance vectors from its saved neighbour tables.

So,I think N3 has the below information before N2-N3 link cost reduces to 2.

Distance vector of neighbours

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

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

So based on above N2 and N4 ,N3 DV = (7,6,0,2,6)

After N2-N3 link cost reduces to 2.

it uses its saved N2 and N4 tables and recalculate the DV again ,so N3 = (3,2,0,2,5) .

Please someone correct me if I am wrong here?

N3 will ask for there distance vectors from N2 and N4. N4 table will inform N3 that it'll take 8 unit time to reach N1 and N2 will show ∞. so, N3 will update 8+2 distance in its table.
answered by Junior (933 points)
+2
I don't get this.... It is written in previous question "After next round of updates"... Why didn't N3 send its distance vector (3,2,0,2,5) to N4
0
It ia said that only neighbours will send info to each other. So in first round n3 n n4 will exchange old values of their tables and won't be changed. And this part of ques says "after the update in previous ques" means thAt round is over and we got n3 n2 changed but all three remaining tables unchaged. Now n1-n2 goes down and n2 reflect this change into its table..then again all neighbours will send table to each other. N3 will get old table of n4 and New table of n2. So n3 to n1 updates with 8+2=10
+1
@khushtak

Still not clear :( Can you elaborate a bit??
0
Why N4 table will inform N3 that it'll take 8 unit time to reach N1 ? hen N2 's table is updated, it will share its info with N5 no ?
When the link N2-N3 reduces to 2, first round of update will happen. In this round N3 will share [7,2,0,2,6] as its distance vector because immediate nodes will reflect the change in distance vectors immediately. When the link N2-N1 goes down, the following distance vectors will be shared-

Therefore N4 will become [8,4,2,0,4] and N2 will become [inf,0,2,4,3]

The final updated vector at N3 will be [10,2,0,2,5]
answered by Boss (16.8k points)
Why the ans is not 3 ?

As N3: (3, 2, 0, 2, 5)
answered by Active (1.3k points)

1