Distance Vector Routing Algorithm
For Complete YouTube Video: Click Here
In this class, we will try to understand Distance Vector Routing Algorithm.
Our previous class discussed the basic definitions of Routing, Routing Tables, and Routing Algorithms.
Distance Vector Routing Algorithm
The Distance Vector Routing algorithm generates the routing tables for each router.
The steps of the algorithm are as follows.
STEP 01:
Each router prepares its routing table using the knowledge of its immediate neighbor.
STEP 02:
Each router exchanges its distance vector obtained in Step-01 with its neighbors.
After exchanging the distance vectors, each router prepares a new routing table.
This class will understand how the first step works and how the data is filled in the routing tables.
In the next class, we will cover the second step and the number of steps required to stabilize the routing tables.
To understand these steps, we will consider the internetwork as shown below.
Initially, the routing tables were empty.
The first step states that Each router prepares its routing table using the knowledge of its immediate neighbor.
The routing tables will get updated based on the knowledge of the distance of routers directly connected to it.
Consider the A’s routing table.
The image below shows the A’s routing table after executing the first step.
The first row states that to transmit the data from A to A, it needs a distance of 0. The router to which the data has to be transmitted is A itself.
The second row states that to transmit the data from A to B, it needs a distance of 12. The router to which the data has to be transmitted is through B.
The third row states that to transmit the data from A to C, it needs a distance of 9. The router to which the data has to be transmitted is through C.
The fourth row states that to transmit the data from A to C, it needs a distance of 4. The router to which the data has to be transmitted is through D.
The image below shows the routing tables on each router after the first step execution.