Sindhuja Gudala

Route Poisoning and Count to Infinity Problem

This article explains the Route Poisoning and Count to infinity problem which is caused by the routing loop (A network problem in which packets continue to be routed in an endless circle) in the Distance Vector Routing (DVR) network protocol. The Distance Vector Routing protocol acquires information/ packets from its neighbor routers/nodes to reach the destination router. This protocol follows the Bellman-Ford Algorithm which is popularly used in Competitive programming and it helps in finding the shortest path from a vertex to all other vertices of a given weighted graph. Bellman-Ford algorithm does not prevent loops therefore the chance of routing loops in the network is possible.

Introduction

The count to infinity problem in Distance Vector Routing occurs due to routing loops in the network. Distance Vector Routing uses the Bellman-Ford algorithm to find the shortest distance from one router to another router. In Distance Vector Routing, we get the information only from the neighboring routers in the network. The neighboring routers share only the distance vector which contains the minimum distance required to move from the current router to all other routers in the given network but it does not pass the whole Distance Vector table. This simply follows a Bellman-Ford algorithm but this algorithm ignores the major issue which is it cannot prevent loops. Therefore the routing loops occur due to which the Count to infinity problem occurs. Routing loops usually occur when an interface goes down or two routers send updates at the same time.

Route Poisoning is one of the solutions to be followed to avoid routing loops in the network. Route poisoning is when there is a broken interface between two routers then the metric value of the distance between them is updated as infinity. And whenever we pass this information to its neighbors which contain infinity that path is considered as poisoned/ failed and it is not reverted again.

The Count of Infinity Problem

In the above section, we have discussed Distance Vector Routing. Since this protocol follows Bellman-Ford algorithm and ignores the major issue of Routing loops, which is the cause of the count to infinity problem in the network. The Routing Loops occur when the two neighboring routers in the network send an update simultaneously at the same time to the router. The Routing Loops also occur when an interface (link) goes down between two routers in the network. The interface can fail because of several reasons like insufficient bandwidth to support the traffic volume, misconfigured duplex and speed settings, excessive buffering on interfaces, misconfigured EtherChannels, and faulty cables or hardware. The count to-infinity problem is clearly explained using the below example by following the Bellman-Ford algorithm similarly as used in Distance Vector Routing:

The below image indicates the given network where A, B, and C are the routers and an internet connection:

image-of-indicator-with-router-and-internet-connection
  • The distance/ cost from router B to the internet is 1 which is indicated alongside the link present between router B and the internet. Similarly, the distance between the routers is indicated as corresponding to the link present between them.
  • The initial values of the distances between each router to its neighboring router or the internet are clearly shown in the below image as [1, 1, 1]:
network-with-router-and-internet-connection-sample
  • If there is no direct link between the router and the internet the distance between them is considered to be infinity.
  • In the next pass by using the Distance Vector Routing protocol we get the distance vectors of the neighboring routers to the present router and hence it calculates the minimum distance needed by every router to the internet. Like a router, A sends [0, 1, 1] to router B which indicates it requires 0 distance to be followed to reach router A, the metric value of distance as 1 to reach router B, the metric value of distance as 1 to reach router C. This distance vector helps in calculating the minimum value needed to reach the other routers with the help of its neighbor routers.
    It is clearly shown in the below image:
network-with-router-and-internet-connection-sample2
  • In every pass only the distance vector of the neighboring routers is sent but the path which is followed to reach the internet is not transferred.
  • After the second pass, the normal process happens by calculating the minimum required to reach the internet from all the routers. But assume the link present between router B and the internet is broken due to several internal and external reasons like insufficient bandwidth to support the traffic volume, misconfigured duplex and speed settings, excessive buffering on interfaces, misconfigured EtherChannels, and faulty cables or hardware. The next pass for finding the distance vector is as shown in the below image:
network-with-router-and-internet-connection-sample3
  • Now the distance from router B to the internet is updated to infinity. In the next pass for router A, the two neighbor distance vectors are 3 and infinity which indicates that router C takes the distance C to get router A to reach the internet whereas router B costs distances of infinity to reach the internet, and the minimum value among these is chosen and stored in the Distance Vector table of the router A. Similarly the values of router C and router B are updated as shown in the below image:
network-with-router-and-internet-connection-sample4
  • The values of the distance vectors of the routers are updated in every pass and finally, we reach a point where the count to infinity problem occurs. It occurs because we are sending only the distance vector/matrix rather than sending the path that is followed to reach the internet. If you are sending with the path then it can verify whether it is possible to reach the other router from the current router, but it is not possible since it sends only the distance vector table. Therefore without the loop prevention techniques, the networks might face the count-to-infinity problem.

The problems faced by the network due to count to infinity problem are:

  • Packets (information) may loop around the inter-network while the routers count to infinity. This makes the inter-network process slow down, excessive buffering, and faulty cables. These are the issues as the bandwidth is consumed by the looping packets between the routers.
  • The count to infinity process takes a lot of time to understand that the network has failed. To understand that there is the problem of counting to infinity in the networks takes a longer time to predict and in that meantime, the whole network may get failed.

Solution for the Count to Infinity Problem

There are two solutions available to overcome the count-to-infinity problem in the network which are:

1. Route Poisoning: Route poisoning is one of the methods which is used to prevent the count-to-infinity problem in networks when there is a breakage of a link or an interface between the routers in the network. This news is spread among all the other routers in the network by indicating the metric value of the distance between the routers where the interface is broken as infinity. Therefore the routers with metric values as infinity are considered poisoned and failed. If the metric value is found to be infinity at any router, then it simply stops sending the distance vector to its neighbor routers. This method also has a disadvantage i.e., it increases the sizes of the routing announcements in many common networks. This is clearly explained in the below image:

route-poisoning-example

2. Split Horizon: Split horizon is a method used by distance vector protocols to prevent network routing loops. The basic principle is we should never send routing information back in the direction from which it was received. In this way, we can avoid routing loops. In the example, we have taken earlier when the interface between router B and the internet has gone down. The route from C to A and B to A is always calculated and goes into the loop till it reaches the count-to-infinity problem. This becomes an infinite loop, to avoid that we can use a Split Horizon rule where the route from router B to router A will not be reverted to router A.

split-horizon-example

Conclusion

  • The count-to-infinity problem occurred due to routing loops from the Distance Vector Routing Protocol because it uses the Bellman-Ford algorithm and cannot prevent routing loops.
  • Routing loops in the network can occur due to failure of the interface or link between two routers in the network.
  • The count-to-infinity problem can be avoided by following the below methods:
    • Route poisoning
    • Split Horizon
  • By following the solutions of the count to infinity problem can be successfully tackled.

Author