1,410 views

1 Answer

Best answer
1 votes
1 votes

Distance-Vector Routing

 

Each node constructs a one-dimensional array containing the "distances"(costs) to all other nodes and distributes that vector to its immediate neighbors.

  1. The starting assumption for distance-vector routing is that each node knows the cost of the link to each of its directly connected neighbors.

  2. A link that is down is assigned an infinite cost.

Information

Stored at Node

Distance to Reach Node

A

B

C

D

E

F

G

A

0

1

1

1

1

B

1

0

1

C

1

1

0

1

D

1

0

1

E

1

0

F

1

0

1

G

1

1

0

Table 1. Initial distances stored at each node(global view).

 

We can represent each node's knowledge about the distances to all other nodes as a table like the one given in Table 1.

Note that each node only knows the information in one row of the table.

  1. Every node sends a message to its directly connected neighbors containing its personal list of distance. ( for example, A sends its information to its neighbors B,C,E, and F. )

  2. If any of the recipients of the information from A find that A is advertising a path shorter than the one they currently know about, they update their list to give the new path length and note that they should send packets for that destination through A. ( node B learns from A that node E can be reached at a cost of 1; B also knows it can reach A at a cost of 1, so it adds these to get the cost of reaching E by means of AB records that it can reach E at a cost of 2 by going through A.)

  3. After every node has exchanged a few updates with its directly connected neighbors, all nodes will know the least-cost path to all the other nodes.

  4. In addition to updating their list of distances when they receive updates, the nodes need to keep track of which node told them about the path that they used to calculate the cost, so that they can create their forwarding table. ( for example, B knows that it was A who said " I can reach E in one hop" and so B puts an entry in its table that says " To reach E, use the link to A.)

 

Information

Stored at Node

Distance to Reach Node

A

B

C

D

E

F

G

A

0

1

1

2

1

1

2

B

1

0

1

2

2

2

3

C

1

1

0

1

2

2

2

D

2

2

1

0

3

2

1

E

1

2

2

3

0

2

3

F

1

2

2

2

2

0

1

G

2

3

2

1

3

1

0

Table 2. final distances stored at each node ( global view).

 

In practice, each node's forwarding table consists of a set of triples of the form:

( Destination, Cost, NextHop).

For example, Table 3 shows the complete routing table maintained at node B for the network in figure1.

Destination

Cost

NextHop

A

1

A

C

1

C

D

2

C

E

2

A

F

2

A

G

3

A

Table 3. Routing table maintained at node B.

Hope this clarifies your doubt

 

 

 

selected by

Related questions

0 votes
0 votes
1 answer
2
RamaSivaSubrahmanyam asked Oct 27, 2022
394 views
Asynchronous: It does not require that all of its nodes operate in the lock step with each other.What does this mean?
1 votes
1 votes
1 answer
3