Distance Vector Routing Example
Let us review the specification of the algorithm. 


  In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors.


Right after the cost of link N2-N3 changes to 2, the distance vectors at different nodes are as follows. The only difference from before is the distance from N2 to N3 and the distance from N3 to N2 has been updated from 6 to 2.

N1: (0,1,7,8,4)
N2: (1,0,2,7,3)
N3: (7,2,0,2,6)
N4: (8,7,2,0,4)
N5: (4,3,6,4,0)  

In the next round of exchange, all nodes exchange their distance vectors with their respective neighbors. In particular, N3 sends (7,2,0,2,6) to its neighbor N2 and N4. Right after this round of exchange, the knowledge of each node are as follows besides their knowledge of respective distances to their neighbors.

N1 knows (1,0,2,7,3) from N2.
N2 knows (0,1,7,8,4) from N1 and (7,2,0,2,6) from N3 and (4,3,6,4,0) from N5.
N3 knows (1,0,2,7,3) from N2 and (8,7,2,0,4) from N4.
N4 knows (7,2,0,2,6) from N3 and (4,3,6,4,0) from N5.
N5 knows (1,0,2,7,3) from N2 and (8,7,2,0,4) from N4.   

Discarding current distance vectors, all nodes regenerate their distance vectors at the same time. So after, for example, a fraction of a second, the distance vectors at different nodes becomes the following.

N1: (0,1,3,8,4)
N2: (1,0,2,4,3)
N3: (3,2,0,2,5)
N4: (8,4,2,0,4)
N5: (4,3,5,4,0)

If no change of the network happens before the next round of exchange, then in the next round of exchange, each node will send above distance vectors to its neighbors. In particular, N3 will send (3,2,0,2,5) to its neighbor N2 and N4 in the next round.



However, if before the next round of exchange, it happens that the link between N1 and N2 goes down. Then N1 and N2 will update their distance vector immediately, but only with the distance between N1 and N2. Now the distance vectors at each node are as follows.

N1: (0,infinity,3,8,4)
N2: (infinity,0,2,4,3)
N3: (3,2,0,2,5)
N4: (8,4,2,0,4)
N5: (4,3,5,4,0)

After the next round of exchange, N3 knows the distance vector (infinity,0,2,4,3) from N2 and (8,4,2,0,4) from N4. So N3 will update its distance vector to (10,2,0,2,5).