1.3 Troubleshoot routing loop prevention: filters, tags, split horizon and poisoned routes
ENARSI 300-410 v1.1 · 1.0 Layer 3 Technologies
Routing loops appear when a route leaves a domain and comes back in as if it were new, usually at two-way redistribution with two or more redistribution points. IOS gives you four ways to stop them: filters (distribute lists, prefix lists), route tags, split horizon in distance-vector protocols, and route poisoning with infinite metrics.
What you must know
- Explain how two redistribution points create a feedback loop.
- Stop it with tags: set a tag when redistributing in, deny that tag when redistributing back.
- Use distribute lists and prefix lists in and out per protocol.
- Explain split horizon, poison reverse and why DMVPN hubs turn split horizon off.
How the loop forms
OSPF and EIGRP meet at two routers, R2 and R3, and each redistributes both ways. The OSPF prefix 172.16.1.0/24 enters EIGRP at R2. R3 learns it from EIGRP as D EX (AD 170) and from OSPF (110), keeps OSPF, and redistributes it from OSPF into EIGRP too, which is harmless. But if the OSPF original is lost, R3 now has only the EIGRP external route, redistributes that into OSPF, and the dead prefix circulates between the two domains with growing metrics.
With tags, the route that left OSPF at R2 (1) carries tag 110, and R3 denies tag 110 when it redistributes EIGRP into OSPF (2). The same is done the other way with tag 90.
Tag and deny at every redistribution point
route-map EIGRP-TO-OSPF deny 10
match tag 110 ! came from OSPF: never send it back
route-map EIGRP-TO-OSPF permit 20
set tag 90
!
route-map OSPF-TO-EIGRP deny 10
match tag 90
route-map OSPF-TO-EIGRP permit 20
set tag 110
!
router eigrp 100
redistribute ospf 1 metric 1000000 10 255 1 1500 route-map OSPF-TO-EIGRP
router ospf 1
redistribute eigrp 100 subnets route-map EIGRP-TO-OSPFTags survive inside each protocol: OSPF carries them in the external LSA, EIGRP in the external route TLV. Check them with show ip route <prefix> ("Tag 110") or show ip eigrp topology <prefix>.
Filters, split horizon and poisoning
| Tool | Where | What it stops |
|---|---|---|
distribute-list prefix P in (OSPF) | router ospf | Routes entering this router's RIB; LSAs still flood |
distribute-list prefix P out <protocol> (OSPF) | router ospf | Only on an ASBR, while redistributing |
distribute-list P in|out <if> (EIGRP) | router eigrp | Updates sent or received on an interface |
| Split horizon | Interface (EIGRP, RIP) | Advertising a route back out the interface it was learned on |
| Poison reverse / route poisoning | RIP, EIGRP | Advertising a lost route with an infinite metric, so neighbours drop it at once |
EIGRP's split horizon is on by default. On a DMVPN hub with phase 1 or 2, spokes learn each other's routes only if the hub turns it off on the tunnel: no ip split-horizon eigrp 100. EIGRP also poisons: a route that goes active is sent with an infinite delay to the neighbours that used it.
Commands
show ip route <prefix> | The route's tag, source and AD. |
show ip eigrp topology <prefix> | EIGRP external data: originating router, protocol and tag. |
show ip ospf database external | External LSAs with their tags. |
show ip protocols | Distribute lists in and out per protocol. |
Exam traps
- One-way redistribution, or one redistribution point, cannot loop on its own.
- OSPF
distribute-list infilters the RIB, not the LSDB. - Tags must be set at every redistribution point, or the loop comes back through the router you missed.
- Turning split horizon off on a hub is needed for spoke-to-spoke routes, and dangerous on a multi-access LAN.
Check yourself
- Why do two redistribution points loop when one does not?
- A route can leave the domain at one point and come back in at the other as new.
- How do tags stop the loop?
- The router that redistributes a route out tags it; the other point denies that tag when redistributing back.
- Does an OSPF inbound distribute list stop LSAs flooding?
- No, it only keeps the route out of that router's own RIB.
- What does EIGRP do with a route it has lost?
- It poisons it: it sends it with an infinite metric so neighbours remove it.
Labs
Try it live: Redistribution loops: two ASBRs, route tags and distance
More topics in 1.0 Layer 3 Technologies
- 1.1 Troubleshoot administrative distance across every routing source
- 1.2 Troubleshoot route maps in any routing protocol: attributes, tags and filters
- 1.6 Configure and verify policy-based routing
- 1.7 Configure and verify VRF-Lite
- 1.8 Describe how Bidirectional Forwarding Detection works
- 1.9 Troubleshoot EIGRP in classic and named mode, globally and in a VRF
- 1.10 Troubleshoot OSPFv2 and OSPFv3
- 1.11 Troubleshoot internal and external BGP, globally and in a VRF