Distance Vector Algorithm

What
The distance vector algorithm is a routing algorithm run in the network layer that is responsible for updating each router's shortest path beliefs about the network.

Distance Vector
The distance vector is the set of beliefs that a router holds about the distance to other routers

Message Complexity
We send messages only when an update lowers the cost of a path

Speed of Convergence
Distance vector converges more slowly and may have routing loops while it is converging

Robustness
When one router fails or starts sending erroneous results, it has a direct effect on the rest of the routers in the network

Update Algorithm
For our update algorithm, we will use the classic Bellman-Ford algorithm update, which is

$$d(u, v) = min(c(u, x) + d(x, v)), x \in (u, x)$$

Procedure

 * 1) At some random point, a router sends its distance vector to another router
 * 2) The receiving router runs the update algorithm to update its distance vector. It uses the sending router as the neighbor or $$x$$ as in the equation above
 * 3) Repeat this process and have routers all send random messages to their neighbors