Getty Images
The purpose of route poisoning in networking
Route poisoning is an effective way of stopping routers from sending data packets across bad links and stop routing loops. This limits delays and creates a more stable network.
Route poisoning is a mechanism that prevents routing loops or fixes problems with bad routes in networking.
When a route becomes invalid or unreachable, route poisoning marks the bad route -- or poisons it -- to stop routing devices from sending data packets over the path. Doing so prevents unnecessary delay, bandwidth wastage and unneeded power consumption.
What happens in route poisoning?
Route poisoning is a networking methodology that uses an infinite metric, such as a hop count of 16, to prevent routing devices from sending data packets to a failed route. This infinite metric is assigned to the failed route and shows that all nodes in the invalid route are infinitely distant.
After the path is marked as unreachable, the route poisoning mechanism propagates this information throughout the entire network until the network stabilizes. Essentially, the mechanism advertises that the route has an infinite hop count to all other network routing devices. Other operational routers consider infinity to indicate routing failure and don't send data packets through the invalid route.
Overview of distance vector routing and routing loops
Distance vector routing (DVR) uses route poisoning to ensure accurate and efficient route updates. DVR is an algorithm that enables routers to choose the shortest data transfer path.
Each router maintains a routing table that contains a collection of distance vectors -- called hops -- needed to reach each router in the network. There are various metrics, including hop count, time delays and cost. Routing devices advertise all prefixes through every interface and periodically update each other with complete information through routing tables.
The DVR algorithm fails when an interface fails, a cable breaks or two routers deliver simultaneous updates. As a result, a never-ending routing loop forms in the network.
A routing loop is a technical error in which two or more routers forward the same packet to each other indefinitely. These packets never reach their destination address. Routing loops cause unwanted network latency and waste bandwidth. Route poisoning categorizes routing loops, invalid paths and bad routes into failed links.
Route poisoning example
Routing Information Protocol (RIP) is the most common DVR algorithm used in networking. It uses hop count as the routing metric, and the hop limit shows the number of networks RIP can support.
Count-to-infinity problem
Suppose a company has five routers: A, B, C, D and E. Each router has routing table entries for every other router in the network. The following example lists four iterations to explain the count-to-infinity problem.
In this example, Router E must receive an information packet. The table here shows the distance from Router E to every other routing device in the network. Router D advertises that it can get to Router E the fastest with one hop.
Routing device | A | B | C | D |
Hop count | 4 | 3 | 2 | 1 |
However, suppose the link between D and E breaks down due to a technical issue.
Before Router D removes that link from its routing table, it notices that the other three routers have links to E.
Router C now shows the shortest path to Router E with two hops. The problem is D does not know that C relies on the D-to-E link to reach E. Router D updates the routing table to incorporate the routing costs of Router C.
The table here shows the updated hop counts to Router E.
Routing device | A | B | C | D |
Hop count | 4 | 3 | 2 | 3 |
In Router C's path to E, Router D is the next hop. Router C notices D increased the cost to reach E, forcing C to increase the cost as well. The table here shows the updated distance in the routing.
Routing device | A | B | C | D |
Hop count | 4 | 3 | 4 | 3 |
Similarly, Router B updates the cost to reach Router E. Once again, Router D updates the distance to reach E. The process continues indefinitely, indicating the presence of a routing loop. The table here shows the updated routing distance.
Routing device | A | B | C | D |
Hop count | 4 | 5 | 4 | 5 |
This is a well-known problem in the DVR algorithm known as count to infinity. The information propagates indefinitely through the network and physically manifests as extra power consumption, used memory and wasted bandwidth.
Route poisoning solution
When the D-to-E link goes down, Router D informs E about the failure. Refer to the first table for the original route distances.
Using route poisoning, Router D assigns the value of 16 to Router E in the hop count section to indicate a failed route. The table below shows the updated distances to Router E.
Routing device | A | B | C | D |
Hop count | 4 | 3 | 2 | 16 |
The maximum permissible hop count in RIP is 15. Metrics greater than 15, such as the 16 hops Router D assigned to E, show that the router is unreachable. Sometimes, an infinity metric can also be assigned to the failed link. Router C receives the update from D and updates the routing, as seen here.
Routing device | A | B | C | D |
Hop count | 4 | 3 | 17 | 16 |
Finally, Routers B and A receive the new cost to update the routing, shown here.
Routing device | A | B | C | D |
Hop count | 19 | 18 | 17 | 16 |
With each iteration, the poisoned route propagates through the network. The process continues until all the routers update their costs to reach Router E. With Router E marked as unreachable and dropped from routing tables to ensure correct costs, the network reaches route convergence. All routes to reach Router E are poisoned, eliminating the routing loop and stabilizing the network.
Benefits and drawbacks of route poisoning
A route might become unreachable due to node failure, topology changes or manual configurations. While more modern networks typically don't use route poisoning due to their use of link-state routing protocols, the mechanism is still commonly used in networks that deploy DVR protocols.
Below are some of the benefits and challenges associated with route poisoning.
Benefits
The benefits of route poisoning include the following:
- Performance optimization. Route poisoning optimizes network performance by limiting the number of packets sent over an invalid path. It executes route convergence to ensure routers use correct and updated paths. In small networks, quick recovery minimizes downtime.
- Hold-down mechanism. Using a hold-down timer eliminates mismatched information and prevents routing loops. When a link fails, the operational route assigns a high metric to the same link and advertises it throughout the network. After poisoning the route, the operational router enters a hold-down state. In this state, the router temporarily ignores advertised routing costs related to the failed link.
Drawbacks
The drawbacks of route poisoning include the following:
- Slow route convergence. Route convergence takes a long time to execute in large networks. Poisoned routes contribute to memory overhead. As a result, large networks tend to recover slowly from the link failure.
- Multirouter failure. Route poisoning is less effective if more than one router fails or multiple routers form network loops. In these cases, temporary network congestion and latency persist for long periods.
- Internet black holes. Route poisoning can form temporary black holes in the network. During the hold-down state, the router might reject important updates, leading to permanent packet loss.
Venus Kohli is an engineer turned technical content writer, having completed a degree in electronics and telecommunication at Mumbai University in 2019. Kohli writes for various tech and media companies on topics related to semiconductors, electronics, networking, programming, quantum physics and more.