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

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-OSPF

Tags 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

ToolWhereWhat it stops
distribute-list prefix P in (OSPF)router ospfRoutes entering this router's RIB; LSAs still flood
distribute-list prefix P out <protocol> (OSPF)router ospfOnly on an ASBR, while redistributing
distribute-list P in|out <if> (EIGRP)router eigrpUpdates sent or received on an interface
Split horizonInterface (EIGRP, RIP)Advertising a route back out the interface it was learned on
Poison reverse / route poisoningRIP, EIGRPAdvertising 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 externalExternal LSAs with their tags.
show ip protocolsDistribute lists in and out per protocol.

Exam traps

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