Common Cases Where Routing Loops Occur During Redistribution
Mutual Redistribution Between Two Protocols
Scenario: Redistributing OSPF into BGP and BGP back into OSPF.
Risk: A route learned from OSPF gets injected into BGP, then redistributed back into OSPF—creating a loop.
Redistributing iBGP into IGP
Scenario: iBGP routes redistributed into OSPF or EIGRP.
Risk: iBGP routes can be seen as internal by IGP, then re-advertised to other BGP speakers, violating BGP split-horizon rules.
Must explicitly deny iBGP in route-maps unless the intension is to redistribute it.
Lack of Route Tagging
Scenario: Routes redistributed without tagging.
Risk: No way to identify the origin of a route, so it gets re-learned and re-injected endlessly.
Best Practice: Use set tag in route-maps and filter with match tag.
Overlapping Administrative Distances
Scenario: Redistributed routes have similar ADs across protocols.
Risk: RIB may prefer a redistributed route over the native one, causing suboptimal paths or loops.
Solution: Adjust ADs using distance command in route-maps.
Improper Filtering
Scenario: Redistributing all routes without prefix-lists or route-maps.
Risk: Unintended routes get redistributed and re-learned.
An empty prefix-list permits all routes—be explicit.
How to Avoid Routing Loops
Use Route Tagging
Apply Prefix Lists and Route Maps Filter only necessary prefixes.
Adjust Administrative Distance
Lower AD for trusted sources, raise for redistributed ones.
Avoid Mutual Redistribution
Prefer one-way redistribution with clear boundaries.
If mutual redistribution is required, tag and filter aggressively.
Use redistribute internal or external selectively
IOS XR and NX-OS support filtering based on route type.
Example
Mutual Redistribution Between Two Protocols
Scenario: OSPF ↔ BGP redistribution Loop Risk: A route from OSPF gets into BGP, then back into OSPF—creating a loop.
Strategy:
Tag routes when redistributing from OSPF to BGP (set tag 65001)
Deny re-entry of tagged routes into OSPF
NX-OS Example:
Redistributing iBGP into IGP
Scenario: iBGP routes redistributed into OSPF Loop Risk: iBGP routes re-advertised to other BGP speakers via IGP—violating split-horizon.
Strategy:
Deny redistribution of iBGP (internal) routes
Permit only eBGP (external) routes
IOS XE Example:
Lack of Route Tagging
Scenario: Redistributed routes not tagged Loop Risk: No way to identify origin—routes re-learned and re-injected
Strategy:
Use set tag in route-policy
Filter tagged routes on re-entry
IOS XR Example:
Overlapping Administrative Distances
Scenario: Redistributed routes have similar ADs Loop Risk: RIB prefers redistributed route over native one
Strategy:
Raise AD of redistributed routes to deprioritize them
Ensure native IGP routes are preferred
NX-OS Example:
Improper Filtering
Scenario: Redistributing all routes without control Loop Risk: Unintended routes get redistributed and re-learned
Strategy:
Use prefix-lists to filter only necessary routes
Avoid implicit permit (empty prefix-list)
IOS XE Example:
Last updated