Distance vector protocols are susceptible to routing loops. Routing loops occur when a packet is continually routed through the same routers over and over again, in an endless circle. Because they can render a network unusable, distance vector routing protocols (such as RIP and EIGRP) employ several different mechanisms to prevent routing loops. We will describe them in this article.
Split horizon is one of the features of distance vector routing protocols that prevents routing loops. This feature prevents a router from advertising a route back onto the interface from which it was learned.
Consider the following network topology:
Router R1 has a route to the subnet 10.0.1.0/24 that is advertised to router R2 by using RIP. Router R2 receives the update and stores the route in its routing table. Router R2 knows that the routing update for that route has come from R1, so it won’t advertise the route back to router R1. Otherwise, if the network 10.0.1.0/24 goes down, router R1 could receive a route to the subnet 10.0.1.0/24 from R2. Router R1 would think that R2 has the route to reach the subnet, and would send packets destinated for the 10.0.1.0/24 to R2. R2 would receive the packets from R1 and sends them back to R1, because R2 thinks that R1 has a route to reach the subnet, thereby creating a routing loop.
Route poisoning is another method for preventing routing loops employed by distance vector routing protocols. When a router detects that one of its directly connected routes has failed, it sends the advertisement for that route with an infinite metric (poisoning the route). A router that receives the update knows that the route has failed and doesn’t use it anymore.
Consider the following example:
Router R1 is directly connected to the 10.0.1.0/24 subnet. Router R1 runs RIP and the subnet is advertised to R2. When the R1’s Fa0/1 interface fails, the route advertisement is sent by R1 to R2 indicating that the route has failed. The route has a metric of 16, which is more than the RIP’s maximum hop count of 15, so R1 considers the route to be unreachable.
Holddown is another loop-prevention mechanism employed by distance vector routing protocol. This feature prevents a router from learning new information about a failed route. When a router receives the information about the unreachable route, the holddown timer is started. The router ignores all routing updates for that route until the timer expires (by default, 180 seconds in RIP). Only updates allowed during that period are updates sent from the router that originally advertised the route. If that router advertise the update, the holddown timer is stopped and the routing information is processed.
An example will help you understand the concept better. Consider the following network topology.
Router R1 has advertised its directly connected subnet 10.0.1.0/24 through RIP. After some period of time, the interface Fa0/1 on R1 fails and the router R1 sends the poisoned route to R2. R2 receives the routing update, marks the route as unreachable and starts the holddown timer. During that time all updates from any other routers about that route are ignored to prevent routing loops. If interface Fa0/1 on R1 comes back up, R1 again advertises the route. R2 process that update even if the holddown timer is still running, because the update is sent by the same router that originally advertised the route.
Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.
We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: