Consider the network shown below, and assume that each node initially knows the costs to each of its neighbors. Consider the distance-vector algorithm and show the distance table entries at node z.
Distance vector routing algorithm exchanges the information with the neighbors and works asynchronously.
According to the distance vector algorithm, any node m computes the distance vector using the following formulas:
Note: NA is used when there is no distance value.
Construct the distance vector table for node z from the network diagram:
Now update the table with costs of all the neighboring nodes.
Update the table with minimum costs using the distance vector routing algorithm:
Example: v to y, two paths are available. v-u-y and v-x-y with costs 3 and 6 respectively. So, v-u-y is the path with minimum cost. Hence update the table with this value.
Therefore, at node z, the above table will be computed by the distance vector routing algorithm.