in Computer Networks
1,157 views
2 votes
2 votes

in Computer Networks
1.2k views

1 Answer

3 votes
3 votes

Distance Vector Routing works on local knowledge i.e. a node relies on the routing knowledge which it's neighbors have.

C will get routing tables from B and D

From B --> A:3
From C --> A:3

C will calculate this

Min Distance to A = Min (  Distance to B + B's distance to A,   Distance to D + D's Distance to A)
Min Distance to A = Min ( 1 + 3, 1 + 3)
Min Distance to A = Min( 4, 4)
Min Distance to A = 4

This is how $4$ is updated for A at node C....

Remember C does replies on its neighbors knowledge. It believes what it's neighbors will say. 


Link State Routing on the other hand relies on Global Knowledge and uses Dijkstra Algorithm to find th shortest path to the node. 

Now, every node will receive information from all other nodes

Node C will get

From B --> A: Infinity
From D --> A: No record.

Remember, in Link state, a node will send about its neighbors only. A is not a neighbor of D, so will not send nay record for A.

C will then use Dijkstra to find out shortest path.

As can be seen above, C will immediately know that B is down and will set its distance to infinity.

Hope this helps !

11 Comments

I got to some extent

my biggest doubt is

In DVRP , a node gets info from its neighbour and a node gives info to its neighbour

In Link state also the same

but why one is local knowledge other is global knowledge
0
0

In Distance Vector Routing, a node exchanges routing table only with its neighbors

In Link State Routing, a node exchanges routing tables with all the nodes in network. So everyone has all the knowledge. Everyone has global knowledge. And then every node applies Dijkstra to find shortest path

0
0
May be its silly but plz explain

Information is flooded for neighbours only
0
0
In distance vector routing algorithm, a node will give routing tables to its neighbors only and not to every node in the network .

Did I answer your question ?
0
0
yes what u said is true

even in link state info is flooded to neighbours only

is this statement true ??
0
0

No, wrong. 

In Link state, the information is given to all the nodes.

A single node will give information about its neighbors to all the nodes.

1
1
Thank u sir for all ur explanation i got the point
0
0
I am no Sir :)

But I am happy that I could help you :)
1
1
i have some doubt regarding your explanation... first thing in DVR whenever updations are performed the new table is compared with old ones and the minimum will be selected...it won't change if the neighbor is giving some path with higher cost. So definitely the question on instability is obvious...please resolve my query...!!!
1
1
is it because the neighbour which is saying i am x distance away from A is itself now saying i am y distance away now,,,??
0
0
Because Of A if we have the path let say P ie A----P its x units and now x is updated to y then we try to find other path to P which is <y if no path is found then simple update x to y in table
0
0

Related questions