Introduction to Networking

# Distance Vector Routing Algorithm

Distance vector routing Algorithm is a dynamic Routing Algorithm. Calculations of the Distance Vector Routing Algorithm may done in the following steps

Step-01:

As we know, every router maintains its routing table. So, each router knows about

• All the routers exist in the network
• Distance to its neighboring routers

Step-02:

• Each router only shares its distance vector column with its neighboring routers.
• Each router maintains a new routing table using the distance vectors that it has obtained from its neighbors.
• if there are n routers in the network, then This step is repeated for (n-1) times.
• After repeating this, routing tables reach the stable state and are updated shortly each time.

## Distance Vector Routing Example

Let’s explain distance vector routing by using an example. Suppose a network has 4 routers.

• The values (weights) are mentioned on the edges.
• values could be distances costs, or delays.

## Manually calculations of Distance Vector Routing

Suppose we are at Router C and want to reach D

• Cost of reaching destination D via (C–> D) = min { 11 }
• Cost of reaching destination D via (C–>B–>D) = min { 3+7} = 10
• Cost of reaching destination D via((C–>B–>A–>D) = min { 3+2+1} = 6

So, ((C–>B–> A–>D)  is the best path to send data