Lesson Overview

Routing loops are among the most serious problems in enterprise networks because they can cause packet loss, increased latency, high bandwidth utilization, routing instability, and service outages.


A routing loop occurs when packets are repeatedly forwarded between routers instead of reaching their intended destination. Routing loops may result from incorrect routing configurations, routing protocol convergence problems, route redistribution, or inconsistent routing policies.


In enterprise networks, multiple routing protocols such as OSPF, EIGRP, and BGP often operate together. When routes are redistributed between different routing domains, improper filtering or route preference can cause routing information to return to its original domain, potentially creating routing loops.


Cisco routing protocols include several mechanisms to help prevent loops. These include split horizon, route poisoning, the EIGRP Diffusing Update Algorithm (DUAL), OSPF link-state databases and shortest-path calculations, BGP AS_PATH loop detection, and route filtering.


Network engineers can also implement additional loop-prevention mechanisms such as route tagging, route maps, prefix lists, Administrative Distance adjustments, and carefully designed redistribution policies.


This lesson explains the causes of routing loops, prevention mechanisms used by different routing protocols, practical Cisco configurations, verification commands, troubleshooting procedures, and real-world incident scenarios.

Lesson Focus: This module uses RIP, OSPF and EIGRP examples to show the principles. The same design ideas apply to redistribution between other protocols such as OSPF, IS-IS and BGP.


Learning Objectives

  • Explain why redistribution can create routing loops and suboptimal routing.
  • Understand split horizon and route poisoning and where those mechanisms apply.
  • Use route tags to identify redistributed routes and block them from returning to their source domain.
  • Use administrative-distance manipulation when multiple sources advertise the same prefix.
  • Use prefix-lists, distribute-lists and route-maps to control redistribution.
  • Understand why one-way redistribution is inherently safer than uncontrolled mutual redistribution.
  • Verify route origin, metric, tag, next hop and protocol preference in the routing table.
  • Troubleshoot route feedback, duplicate routes and unstable path selection.

1. What Is a Routing Loop?

A routing loop occurs when a packet travels repeatedly between two or more routers without reaching its intended destination.


Example

Router R1 forwards a packet to R2.

Router R2 forwards the same packet to R3.

Router R3 forwards the packet back to R1.

The packet continues circulating until its IP Time to Live (TTL) expires or another condition stops forwarding.


Routing Loop Topology

Pasted content image


Key Concept

Routing loops are different from normal redundant routing paths.

Redundancy provides alternative paths to reach a destination, whereas a routing loop causes packets to circulate without reaching that destination.


2. Types of Routing Loops

Routing loops can occur at different levels.

Type

Description

Example

Data-Plane Loop

Packets circulate between routers

R1 forwards to R2, R2 forwards to R1

Control-Plane Route Feedback

Routing information is reintroduced into its original domain

OSPF → EIGRP → OSPF

Transient Loop

Temporary loop during network convergence

Link failure before routing updates complete

Persistent Loop

Loop remains until configuration or network state changes

Incorrect static routes

Redistribution-Induced Loop

Multiple redistribution points create inconsistent route selection

Dual OSPF/EIGRP redistribution

Important: Route feedback does not always produce a forwarding loop. It becomes dangerous when the resulting route selection causes incorrect forwarding, route instability, or circular next-hop dependencies.


3. Causes and Effects of Routing Loops

3.1 Incorrect Static Routes

Two routers may have static routes pointing to each other for the same destination.


3.2 Routing Protocol Convergence

During a topology change, different routers may temporarily have inconsistent routing information.


3.3 Route Redistribution

Routes may be redistributed between protocols and then reintroduced into their original domain.


3.4 Incorrect Administrative Distance

Route preference changes may cause routers to select unintended routes.


3.5 Improper Route Filtering

Missing prefix lists or route maps can allow unnecessary or incorrect routing advertisements.


3.6 Inconsistent Routing Policies

Different routers may apply conflicting policies that cause traffic to circulate.


3.7 Incorrect Default Routes

Misconfigured default routes can cause routers to forward traffic toward each other.


4. Impact of Routing Loops

Impact

Description

Packet Loss

Packets expire before reaching the destination

High Latency

Traffic follows repeated forwarding paths

Bandwidth Consumption

Repeated packets consume link capacity

Application Outages

Services become unreachable

Routing Instability

Routing information changes unexpectedly

Increased CPU Usage

Certain platforms may experience additional processing load

Troubleshooting Complexity

Forwarding behavior becomes difficult to predict

IP TTL and Routing Loops

  • The IPv4 Time to Live field limits how long a packet can circulate.
  • Each forwarding router decrements TTL.
  • When TTL reaches zero, the router discards the packet and normally generates an ICMP Time Exceeded message, subject to filtering and platform behavior.
  • For IPv6, the equivalent mechanism is the Hop Limit field.
  • TTL prevents packets from circulating indefinitely, but it does not fix the underlying routing problem.

5. Why Redistribution Can Create Routing Loops

A route learned in one protocol is redistributed into another and receives a new protocol identity and metric.

If the redistributed copy is advertised back toward the original protocol, another router can believe that the returning copy is a legitimate alternative path.

With multiple redistribution points, each boundary router can re-inject routes learned from the other boundary.

If administrative distance, metric, or topology causes the returned route to look preferable, the original route can be replaced by its redistributed copy.

The result may be packet forwarding loops, routing-table churn, repeated updates, unstable convergence, and intermittent reachability.


5.1 Example Feedback Scenario

RIP learns 10.1.1.0/24 natively.

R1 redistributes 10.1.1.0/24 into OSPF as an external route.

A second boundary router could redistribute that OSPF external route back into RIP.

RIP now sees 10.1.1.0/24 as a redistributed route even though it originated in RIP.

Without tags or filtering, the route can continue to circulate between protocols.

Important: Redistribution itself is not a loop-prevention mechanism. You must deliberately define which prefixes are allowed to cross the boundary and how returned routes are identified.


7. Split Horizon

Split horizon is a routing loop-prevention mechanism commonly associated with distance-vector routing protocols.

The basic rule is:

A router does not advertise a route back out the interface through which that route was learned.


Example

R1 advertises network 192.168.10.0/24 to R2.

R2 learns the route through its interface toward R1.

Split horizon prevents R2 from advertising that learned route back to R1 through the same interface.


Topology

Pasted content image

How Split Horizon Prevents Loops

Without split horizon, a router could incorrectly learn its own previously advertised route from a neighbor after a failure.

Split horizon reduces the possibility of this route feedback.


Cisco EIGRP Verification

show ip eigrp interfaces detail

On supported IOS/IOS XE platforms, interface-level EIGRP information can help verify split-horizon behavior.  

Disable Split Horizon – Lab Only

configure terminal

 

interface GigabitEthernet0/0

 no ip split-horizon eigrp 100

 

end

Warning: Disabling split horizon can introduce routing loops. It should only be used when required by a validated network design, such as certain hub-and-spoke topologies.  

8. Route Poisoning and Poison Reverse

8.1 What Is Route Poisoning?

Route poisoning is a distance-vector routing mechanism in which a failed destination is advertised with an unreachable metric.

For RIP, the unreachable metric is 16.


Example

A router learns that network 192.168.10.0/24 is no longer reachable.

Instead of continuing to advertise the network as reachable, it advertises the route with metric 16.


RIP Example

Destination: 192.168.10.0/24

 

Before Failure:

Metric = 2

 

After Failure:

Metric = 16 (Unreachable)

Purpose: Route poisoning helps neighboring routers learn that a destination has failed.


8.2 What Is Poison Reverse?

Poison reverse is related to split horizon. Instead of suppressing the route advertisement entirely, a router may advertise the learned route back toward the neighbor with an unreachable metric.


Comparison

Feature

Split Horizon

Poison Reverse

Operation

Suppress advertisement back toward learning interface

Advertise route as unreachable back toward neighbor

Purpose

Reduce route feedback

Explicitly indicate route is unusable through the advertising router

Common Association

Distance-vector protocols

Distance-vector protocols

Loop Prevention

Helps prevent loops

Helps prevent loops

These mechanisms reduce routing-loop risk but do not solve every possible multi-router loop scenario.


9. EIGRP Loop Prevention

EIGRP uses the Diffusing Update Algorithm (DUAL).

DUAL helps EIGRP calculate loop-free paths and coordinate route recomputation after topology changes.

Important EIGRP concepts include:

  • Successor.

  • Feasible Distance (FD).

  • Reported Distance (RD).

  • Feasible Successor.

  • Feasibility Condition.

  • Active and Passive route states.

9.1 EIGRP Feasibility Condition

The classic EIGRP feasibility condition is:

RD < FD

Where:

  • RD is the neighbor's reported distance.

  • FD is the local router's feasible distance for the destination.

A neighbor satisfying this condition can qualify as a feasible successor, subject to the applicable EIGRP route-selection rules.


Example

Neighbor

Reported Distance

Current FD

Feasible Successor?

R2

10,000

20,000

Yes

R3

25,000

20,000

No

R2 satisfies the feasibility condition.

R3 does not satisfy it, even if a route through R3 could eventually prove loop-free.


Important

A route that fails the feasibility condition is not automatically a loop.

DUAL can perform additional computations to determine a new loop-free successor.


EIGRP Route States

State

Meaning

Passive

Route is stable and not undergoing active DUAL recomputation

Active

DUAL is coordinating route recomputation

Stuck in Active

Route computation has not completed within the applicable active timer

A Stuck-in-Active condition does not necessarily mean a routing loop exists.


10. OSPF Loop Prevention

OSPF is a link-state routing protocol.

Routers within the same OSPF area maintain a synchronized link-state database describing the area's topology.

Each router runs the Shortest Path First (SPF) algorithm to calculate shortest paths.


OSPF Architecture

Pasted content image

OSPF Loop-Prevention Mechanisms

  1. Link-state database synchronization.

  2. Link-state advertisement sequencing and aging.

  3. SPF calculations based on topology information.

  4. Area hierarchy and inter-area routing rules.

  5. Route-type and route-selection rules.

Important Limitation

OSPF does not guarantee that transient forwarding loops can never occur during convergence.

Temporary inconsistencies between routers may produce microloops while forwarding tables are updated.


11. BGP Loop Prevention

BGP uses path attributes and policy rules to exchange routing information.

One important loop-prevention mechanism in external BGP is AS_PATH loop detection.


What Is AS_PATH?

AS_PATH is a BGP attribute containing the sequence of autonomous systems through which routing information has passed.

Example

AS_PATH: 65010 65020 65030


BGP Loop-Prevention Rule

By default, a BGP router rejects a route containing its own AS number in the AS_PATH.

This helps prevent inter-AS routing loops.


Example

If AS 65010 receives a route whose AS_PATH contains 65010, the route is normally rejected by the AS-loop detection mechanism.


Important

Features such as allowas-in and as-override can modify normal AS-path loop-detection behavior.

Use these features only when the routing design requires them and loop prevention has been considered.


12. iBGP Split-Horizon Rule

A route learned from one iBGP peer is not normally advertised to another iBGP peer.

This rule helps prevent routing loops within an autonomous system.


Example

Pasted content image

A full-mesh iBGP design allows routers to exchange routes directly without relying on iBGP-to-iBGP readvertisement.


Scaling Solutions

  • Route reflectors.

  • BGP confederations.

These designs have their own loop-prevention mechanisms and require correct configuration.


13. Lab Topology

Pasted content image

Figure 13 - Redistribution lab: RIP ↔ OSPF ↔ EIGRP with Cisco-style routers.


13.1 Addressing and Protocol Roles

Device

Role

Protocol/Network

PC1

Source endpoint

10.1.1.10/24

R1

RIP/OSPF boundary

RIP domain 10.1.1.0/24; OSPF-facing link 192.168.12.0/30

R2

OSPF/EIGRP boundary

OSPF-facing 192.168.12.0/30; EIGRP-facing 192.168.23.0/30

R3

EIGRP router

EIGRP domain toward 10.3.3.0/24

PC2

Destination endpoint

10.3.3.10/24


14. Route Tagging

Route tagging adds metadata to redistributed routes so that another redistribution point can identify where the route came from. Tags do not directly change forwarding preference; they are used as policy markers.


14.1 Tag Routes Entering OSPF

ip prefix-list RIP-TO-OSPF permit 10.1.1.0/24

 

route-map RIP-TO-OSPF permit 10

 match ip address prefix-list RIP-TO-OSPF

 set tag 100

 

router ospf 1

 redistribute rip subnets route-map RIP-TO-OSPF

14.2 Block Tagged Routes From Returning to RIP

route-map OSPF-TO-RIP deny 10

 match tag 100

route-map OSPF-TO-RIP permit 100

 

router rip

 version 2

 redistribute ospf 1 metric 2 route-map OSPF-TO-RIP

Design principle: Tag on entry, deny on return. This preserves the origin of the route and prevents it from being re-advertised into the protocol from which it came.

 

15. Administrative Distance Manipulation

Administrative distance (AD) determines which routing source is trusted when the same prefix is learned from multiple routing protocols. Changing AD can stop a redistributed copy from replacing a native route, but AD is a preference tool not a complete loop-prevention strategy.

Protocol / Route Type

Common Cisco AD

Comment

Connected

0

Always preferred.

Static

1

Normally preferred over dynamic protocols.

EIGRP internal

90

Native EIGRP route.

OSPF

110

OSPF intra/inter/external share the same default AD.

RIP

120

Less preferred than OSPF/EIGRP by default.

EIGRP external

170

Redistributed into EIGRP.

Caution: Changing AD without a clear policy can hide the symptom while leaving route feedback intact. Use tags and filtering first; use AD only where the desired route preference is well understood.


16. Prefix Filtering

Prefix filtering limits which routes are allowed to cross a redistribution boundary. It is one of the most predictable ways to prevent accidental route feedback.


Prefix-List Example

ip prefix-list RIP-EXPORT seq 10 permit 10.1.1.0/24

ip prefix-list RIP-EXPORT seq 100 deny 0.0.0.0/0 le 32

 

route-map RIP-TO-OSPF permit 10

 match ip address prefix-list RIP-EXPORT

 set tag 100

 

router ospf 1

 redistribute rip subnets route-map RIP-TO-OSPF

Permit only prefixes that are intentionally exported.

Use explicit deny statements or route-map default deny behavior to block everything else.

Document why each prefix is allowed to cross the protocol boundary.


17. Route-Map Filtering

Route-maps combine multiple match conditions and set actions. They are ideal when redistribution policy must consider prefix, tag, metric, next-hop, interface, or route type.


Example - OSPF into EIGRP with filtering and tagging

route-map SAFE-REDIST deny 10

 match tag 100

route-map SAFE-REDIST permit 20

 match ip address prefix-list OSPF-EXPORT

 set metric 10000 100 255 1 1500

 set tag 200

 

router eigrp 100

 redistribute ospf 1 route-map SAFE-REDIST

 

18. One-Way Redistribution

One-way redistribution means routes move in only one direction between protocols. Because routes are not injected back into the source protocol, the feedback path is removed.

Design

Risk

Typical Use

RIP → OSPF only

Low

Legacy edge routes imported into an OSPF core.

OSPF → EIGRP only

Low to moderate

Migration or controlled domain interconnect.

Mutual redistribution

High

Requires tagging, filtering, metric control and verification.

Best practice: If the business requirement can be met with one-way redistribution plus a default route in the opposite direction, that design is usually simpler and safer.


19. Mutual Redistribution Risks

The same prefix can be imported into both protocols and then exported back again.

Route metrics are not directly comparable between protocols.

Multiple boundary routers can create different route copies and inconsistent path selection.

Loss of route origin can make a redistributed route look like a valid native route.

Convergence events can cause transient loops even when the steady-state routing table appears correct.


19.1 Safer Mutual Redistribution Pattern

Define exactly which prefixes are allowed in each direction.

Tag routes as they cross each redistribution boundary.

Deny the returning tag before redistributing back into the source protocol.

Set explicit metrics appropriate for the receiving protocol.

Use AD manipulation only when you need deterministic preference among multiple sources.

Verify route tables at every redistribution point after every change.


20. Troubleshooting Routing Loops

Symptom

Likely Cause

What to Check

Route keeps changing protocol owner

Feedback between redistribution points

Route tags, route-map order, AD, metrics.

Unexpected next hop

Returned route preferred

show ip route; compare protocol sources and AD.

High update activity

Repeated re-advertisement

debug only in lab; show ip protocols; route-map counters.

Prefix missing after filtering

Filter too restrictive

Prefix-list sequence and route-map permit statements.

Everything blocked

Implicit route-map deny

Add final permit sequence for intended routes.

Route tag missing

Set action not applied or protocol does not carry it as expected

Verify redistribution path and show ip route.

Black hole after one-way redistribution

No return route

Use default/static route or controlled reverse advertisement.


20.1 Troubleshooting Workflow

Identify the prefix that is looping or changing unexpectedly.

On every redistribution router, record how that prefix is learned: protocol, AD, metric, next hop and tag.

Trace every redistribution statement that can export that prefix.

Check route-map sequence order and prefix-list matches.

Confirm the prefix is tagged at its first redistribution point.

Confirm the same tag is denied before the route can return to its original protocol.

After correction, clear or reconverge routes carefully in a lab or approved maintenance window and verify stability.

Safety: Avoid enabling routing debug commands on busy production routers unless you understand their CPU and logging impact. Prefer show commands and counters first.

Quick knowledge check

1. What does split horizon prevent?

Answer: Advertising a route back out the interface on which it was learned.

2. Why use route tags?

Answer: To preserve route-origin information across protocol boundaries and filter returning routes.

3. Is administrative distance a complete loop-prevention mechanism?

Answer: No. It controls route preference but does not stop route feedback by itself.

4. What is the main risk of mutual redistribution?

Answer: The same route can circulate between protocols or multiple redistribution points unless tags and filters prevent it.