count to infinity in DVr
Distance vector routing:
- Distance Vector Routing is one of the dynamic routing algorithm.
- It is suitable for packet switched network.
- In distance vector routing, each router maintains a routing table.
- It contains one entry for each router in the subnet.
This entry has two parts:
a. The first part shows the preferred outgoing line to be used to reach the destination.
b. Second part gives an estimate of the time or distance to the destination.
- In distance vector routing, a node tells its neighbor about its distance to every other node in the network.
Count to infinity problem:
- One of the important issue in Distance Vector Routing is County of Infinity Problem.
- Counting to infinity is just another name for a routing loop.
- In distance vector routing, routing loops usually occur when an interface goes down.
- It can also occur when two routers send updates to each other at the same time.
Imagine a network with a graph as shown above in figure 4.8.
As you see in this graph, there is only one link between A and the other parts of the network.
Now imagine that the link between A and B is cut.
At this time, B corrects its table.
After a specific amount of time, routers exchange their tables, and so B receives C's routing table.
Since C doesn't know what has happened to the link between A and B, it says that it has a link to A with the weight of 2 (1 for C to B, and 1 for B to A -- it doesn't know B has no link to A).
B receives this table and thinks there is a separate link between C and A, so it corrects its table and changes infinity to 3 (1 for B to C, and 2 for C to A, as C said).
Once again, routers exchange their tables.
When C receives B's routing table, it sees that B has changed the weight of its link to A from 1 to 3, so C updates its table and changes the weight of the link to A to 4 (1 for C to B, and 3 for B to A, as B said).
This process loops until all nodes find out that the weight of link to A is infinity.
This situation is shown in the table below 4.2.
In this way, Distance Vector Algorithms have a slow convergence rate.
One way to solve this problem is for routers to send information only to the neighbors that are not exclusive links to the destination.
For example, in this case, C shouldn't send any information to B about A, because B is the only way to A.