Have a look on this example:
The routing table will be:
R1 R2 R3
R1 0 1 2
R2 1 0 1
R3 2 1 0
Now, assume the connection between R2 and R3 is lost (You can the line broke or a middle router between them fell).
After one iteration of sending the information, you wil get the following routing table:
R1 R2 R3
R1 0 1 2
R2 1 0 3
R3 2 3 0
It happens because R2,R3 is no longer connected, so R2 "thinks" it can redirect packages to R3 through R1, which has a path of 2 - so it will get a path of weight 3.
After an extra iteration, R1 "sees" R2 is more expensive than it used to be, so it modifies its routing table:
R1 R2 R3
R1 0 1 4
R2 1 0 3
R3 4 3 0
and so on, until they converge on the correct value - but that could take a long time, especially if (R1,R3) is expensive.
This is called "count to infinity" (if w(R1,R3)=infinity
and is the only path - it will continue counting forever).
Note that when a cost between two routers goes up you will encounter the same issue (assume w(R2,R3)
goes up to 50 in the above example). The same thing will happen - R2
will try to route to R3
via R1
without "realizing" it depends on (R2,R3)
as well, and you will get the same first steps and converge once you find the correct cost.
However, if the cost goes down - it will not happen since the new cost is better then the current - and the router R2
will stick with the same routing with decreased cost, and will not try to route through R1
.