11.2 Route Redistribution & Loop Prevention
Key Takeaways
- Route redistribution exchanges routing information between dissimilar routing domains (e.g., OSPF, EIGRP, BGP, Static), but introduces severe risks of routing loops, suboptimal paths, and route flapping if unconstrained.
- Redistributing into EIGRP or RIP requires an explicit seed metric (default metric of 0/infinity), whereas redistributing into OSPF uses a default seed metric of 20 (metric 1 for BGP) as Type 2 External (E2) and requires the 'subnets' keyword in OSPFv2.
- Administrative Distance (AD) differences across multiple redistribution points can cause AD inversion, where redistributed external routes appear more or less preferred than native internal routes, creating persistent feedback loops.
- Route tagging with route-maps is the premier enterprise loop prevention mechanism: ASBRs assign unique 32-bit administrative tags upon route injection and filter those tags at mutual redistribution points to prevent re-injection.
- Prefix-lists provide high-performance, radix-tree prefix and mask-length matching (using 'ge' and 'le' modifiers), whereas distribute-lists filter route updates (noting that in OSPF, an inbound distribute-list only prevents local RIB installation without blocking LSA flooding across the area).
11.2 Route Redistribution & Loop Prevention
In modern enterprise networks, distinct routing protocols frequently coexist across organizational boundaries, legacy network acquisitions, data center fabrics, SD-WAN overlays, and external partner networks. Route redistribution is the process of taking routing reachability information learned from one routing source (e.g., OSPF, EIGRP, BGP, or static routes) and injecting it into another routing protocol's database.
Because different routing protocols utilize fundamentally incompatible metric structures (e.g., OSPF cumulative cost vs. EIGRP composite bandwidth/delay vs. BGP path attributes), the redistributing router—the Autonomous System Boundary Router (ASBR)—must translate and assign a meaningful seed metric upon injection.
+-----------------------------------------------------------------------------------+
| MULTI-PROTOCOL ROUTING BOUNDARY |
+-----------------------------------------------------------------------------------+
| |
| +------------------------+ +------------------------+ |
| | EIGRP DOMAIN | | OSPF DOMAIN | |
| | - AS Number: 100 | | - Process ID: 1 | |
| | - Internal AD: 90 | | - Default AD: 110 | |
| | - Metric: Composite | | - Metric: Cost (BW) | |
| +------------------------+ +------------------------+ |
| \ / |
| \ +---------------------------+ / |
| +----> | ASBR (Boundary Router) | <----+ |
| | - Translates Metrics | |
| | - Sets Seed Metrics | |
| | - Applies Route Tags | |
| +---------------------------+ |
| |
+-----------------------------------------------------------------------------------+
1. Multi-Point Redistribution Topologies & Inherent Risks
Route redistribution topologies are categorized based on the number of boundary routers (single-point vs. multi-point) and the direction of route exchange (one-way vs. two-way / mutual).
+-----------------------------------------------------------------------------------+
| REDISTRIBUTION TOPOLOGY TAXONOMY |
+-----------------------------------------------------------------------------------+
| |
| 1. SINGLE-POINT ONE-WAY: |
| - One ASBR; routes injected in one direction only. |
| - Loop-Free; no routing feedback possible. |
| |
| 2. SINGLE-POINT TWO-WAY (MUTUAL): |
| - One ASBR; routes exchanged bidirectionally between both protocols. |
| - Loop-Free across boundaries; potential suboptimal routing inside ASBR. |
| |
| 3. MULTI-POINT ONE-WAY: |
| - Multiple ASBRs; routes injected from Domain A into Domain B only. |
| - Potential suboptimal exit paths; redundant connectivity. |
| |
| 4. MULTI-POINT TWO-WAY (MUTUAL): |
| - Multiple ASBRs; bidirectional redistribution on all boundary routers. |
| - CRITICAL RISK: Severe routing loops, route feedback, and count-to-infinity!|
| - Requires mandatory route filtering, route tagging, and AD tuning. |
| |
+-----------------------------------------------------------------------------------+
2. Default Metric Seed Requirements by Protocol
When a router injects routes from a foreign protocol, it cannot map foreign metrics directly into its own algorithm. Consequently, the ASBR assigns an initial seed metric.
If an administrator does not explicitly specify a seed metric, each routing protocol behaves according to strict, hard-coded default rules.
+-----------------------------------------------------------------------------------+
| DEFAULT SEED METRICS & BEHAVIOR SUMMARY |
+-----------------------------------------------------------------------------------+
| Destination | Default Seed | Seed Metric Value | Mandatory Keywords/ |
| Protocol | Metric Defined?| | Special Behavior |
| :------------- | :------------: | :--------------------- | :----------------------|
| OSPF | YES | Metric = 20 (Type E2) | In OSPFv2, 'subnets' is|
| | | (Metric = 1 for BGP) | MANDATORY to redistribute|
| | | | classless prefixes! |
| EIGRP | NO (Infinity) | Metric = 0 (Infinity) | Routes NOT advertised |
| | | (Unreachable) | unless metric or |
| | | | 'default-metric' set. |
| BGP | YES | Inherits IGP Metric | Carried in MED |
| | | as BGP MED | Multi-Exit Discriminator|
| RIP | NO (Infinity) | Metric = 16 (Infinity) | Routes NOT advertised |
| | | (Unreachable) | unless metric set. |
| IS-IS | YES | Metric = 0 | Injected as Level-2 by |
| | | | default. |
+-----------------------------------------------------------------------------------+
1. Redistribution into OSPF & The Mandatory subnets Keyword
- Default Metric: OSPF assigns a default metric of 20 for all redistributed protocols (except BGP, which is assigned a default metric of 1).
- Default Metric Type: Routes are injected as Type 2 External (E2) by default. Type 2 metrics remain constant throughout the OSPF domain, ignoring internal link costs. To accumulate internal path costs, the administrator must specify
metric-type 1(E1). - The OSPFv2
subnetsKeyword: By default in IPv4 OSPFv2, theredistributecommand only redistributes classful network boundaries (e.g.,/8,/16,/24). All subnetted, supernetted, or classless prefixes are silently dropped unless thesubnetskeyword is explicitly configured.
! Correct OSPF Redistribution Configuration
Router(config)# router ospf 1
Router(config-router)# redistribute eigrp 100 subnets metric 30 metric-type 1
2. Redistribution into EIGRP & The Five Composite K-Metrics
- Default Seed Metric is Infinity: When redistributing any routing protocol (OSPF, BGP, RIP, IS-IS) into EIGRP, EIGRP assigns a metric of 0 (Infinity / Unreachable). If you omit the metric, EIGRP will not advertise the routes.
- Metric Parameters: The administrator must supply all 5 classic composite metric vectors:
- Bandwidth (in kilobits per second, e.g.,
100000for 100 Mbps) - Delay (in tens of microseconds, e.g.,
10for 100 microseconds) - Reliability (integer
1-255, where 255 is 100% reliable) - Load (integer
1-255, where 1 is minimally loaded) - MTU (Maximum Transmission Unit, e.g.,
1500bytes)
- Bandwidth (in kilobits per second, e.g.,
! Method A: Per-Command Metric Definition
Router(config)# router eigrp 100
Router(config-router)# redistribute ospf 1 metric 100000 10 255 1 1500
! Method B: Global Default Metric Definition under EIGRP Process
Router(config-router)# default-metric 100000 10 255 1 1500
Router(config-router)# redistribute ospf 1
3. Routing Loops, Suboptimal Routing & AD Inversion
In multi-point mutual redistribution topologies, the root cause of routing loops and path oscillation is Administrative Distance (AD) Inversion.
+-----------------------------------------------------------------------------------+
| CISCO DEFAULT AD HIERARCHY REVIEW |
+-----------------------------------------------------------------------------------+
| Connected: 0 | Static: 1 | eBGP: 20 | EIGRP Internal: 90 | OSPF: 110 |
| IS-IS: 115 | RIP: 120 | EIGRP External: 170 | iBGP: 200 |
+-----------------------------------------------------------------------------------+
The Anatomy of a Mutual Redistribution Routing Loop
Consider two boundary routers, ASBR-1 and ASBR-2, interconnecting an OSPF domain (AD 110) and an EIGRP domain (Internal AD 90, External AD 170):
+-----------------------------------------------------------------------------------+
| THE AD INVERSION FEEDBACK LOOP SCENARIO |
+-----------------------------------------------------------------------------------+
| |
| 1. Subnet 192.168.50.0/24 originates natively inside the OSPF domain (AD 110). |
| 2. ASBR-1 learns 192.168.50.0/24 via OSPF (AD 110) and redistributes it into |
| EIGRP as an EIGRP External route with AD 170. |
| 3. ASBR-2 learns 192.168.50.0/24 from two different sources: |
| - From native OSPF with AD 110. |
| - From EIGRP via ASBR-1 with AD 170. |
| - ASBR-2 compares AD: OSPF (110) beats EIGRP External (170). No loop yet! |
| |
| --- NOW CONSIDER THE REVERSE SCENARIO (THE TRAP) --- |
| |
| 1. Subnet 10.10.10.0/24 originates natively inside the EIGRP domain (AD 90). |
| 2. ASBR-1 learns 10.10.10.0/24 via EIGRP (AD 90) and redistributes it into OSPF |
| as an OSPF External Type 2 route with AD 110. |
| 3. ASBR-2 is also running mutual redistribution. What does ASBR-2 see? |
| - From native EIGRP: AD 90. |
| - From OSPF (via ASBR-1): AD 110. |
| - ASBR-2 prefers native EIGRP (AD 90 < 110). |
| 4. BUT if the primary link between ASBR-2 and the internal EIGRP core fails: |
| - ASBR-2 loses its native EIGRP route (AD 90). |
| - ASBR-2 installs the OSPF route (AD 110) advertised by ASBR-1. |
| - ASBR-2's mutual redistribution process now redistributes 10.10.10.0/24 |
| BACK into EIGRP with AD 170! |
| - When the EIGRP link recovers, ASBR-2 might continue preferring OSPF due to |
| stale LSA caching, creating a permanent count-to-infinity routing loop! |
+-----------------------------------------------------------------------------------+
Suboptimal Path Selection (RIP vs. OSPF vs. EIGRP External)
AD inversion is even more destructive when protocols like RIP (AD 120) or IS-IS (AD 115) interact with EIGRP External (AD 170):
- If an EIGRP route is redistributed into RIP (AD 120), another ASBR running both RIP and EIGRP will see the native RIP route at AD 120 and the EIGRP External route at AD 170.
- Because AD 120 beats AD 170, the router prefers the slow, distance-vector RIP path over the high-speed native EIGRP path! Traffic is routed suboptimally across the entire autonomous system.
4. Route Tagging Architecture for Loop Prevention
The industry standard, best-practice solution for multi-point mutual redistribution is Route Tagging paired with Route-Maps.
A route tag is an arbitrary 32-bit administrative integer attached to an IP prefix. Route tags are carried natively in OSPF Type 5/7 LSAs, EIGRP external topology structures, and BGP community attributes. They do not affect path cost or metric calculations directly, but serve as administrative identifiers.
+-----------------------------------------------------------------------------------+
| ROUTE TAGGING LOOP PREVENTION |
+-----------------------------------------------------------------------------------+
| |
| [ EIGRP Domain (AS 100) ] [ OSPF Domain (Area 0) ] |
| |
| +---------------------------------------------------+ |
| | ASBR-1 | |
| | - When EIGRP -> OSPF: SET TAG 100 | |
| | - When OSPF -> EIGRP: DENY TAG 200, SET TAG 110 | |
| +---------------------------------------------------+ |
| |
| +---------------------------------------------------+ |
| | ASBR-2 | |
| | - When EIGRP -> OSPF: DENY TAG 110, SET TAG 100 | |
| | - When OSPF -> EIGRP: DENY TAG 100, SET TAG 110 | |
| +---------------------------------------------------+ |
| |
| RESULT: Routes originating in OSPF are tagged with 110 when entering EIGRP. |
| When ASBR-2 sees Tag 110 in EIGRP, it REFUSES to re-inject into OSPF! |
+-----------------------------------------------------------------------------------+
Dual ASBR Tagging Implementation Configuration
! ====================================================================
! CONFIGURATION ON ASBR-1
! ====================================================================
! Step 1: Define Route-Maps for OSPF-to-EIGRP Redistribution
route-map OSPF_TO_EIGRP deny 10
description Drop routes that originated in EIGRP (Tag 100)
match tag 100
!
route-map OSPF_TO_EIGRP permit 20
description Tag native OSPF routes with Tag 110 and set composite metric
set tag 110
set metric 100000 10 255 1 1500
!
! Step 2: Define Route-Maps for EIGRP-to-OSPF Redistribution
route-map EIGRP_TO_OSPF deny 10
description Drop routes that originated in OSPF (Tag 110)
match tag 110
!
route-map EIGRP_TO_OSPF permit 20
description Tag native EIGRP routes with Tag 100 and inject as OSPF Type 1
set tag 100
set metric 20
set metric-type type-1
!
! Step 3: Apply Route-Maps under Routing Processes
router eigrp 100
redistribute ospf 1 route-map OSPF_TO_EIGRP
!
router ospf 1
redistribute eigrp 100 subnets route-map EIGRP_TO_OSPF
! ====================================================================
! CONFIGURATION ON ASBR-2 (Symmetrical Protection)
! ====================================================================
route-map OSPF_TO_EIGRP deny 10
match tag 100
!
route-map OSPF_TO_EIGRP permit 20
set tag 110
set metric 100000 10 255 1 1500
!
route-map EIGRP_TO_OSPF deny 10
match tag 110
!
route-map EIGRP_TO_OSPF permit 20
set tag 100
set metric 20
set metric-type type-1
!
router eigrp 100
redistribute ospf 1 route-map OSPF_TO_EIGRP
!
router ospf 1
redistribute eigrp 100 subnets route-map EIGRP_TO_OSPF
5. Prefix-Lists vs. Access-Lists for Route Filtering
While standard and extended Access Control Lists (ACLs) can filter routing updates, Cisco IP Prefix-Lists are specifically engineered for route filtering. Prefix-lists utilize a radix tree data structure that executes lookups exponentially faster than linear ACLs while providing precise matching of both the network prefix and the subnet mask length.
+-----------------------------------------------------------------------------------+
| PREFIX-LIST SYNTAX & EVALUATION |
+-----------------------------------------------------------------------------------+
| |
| ip prefix-list NAME [seq N] {permit | deny} prefix/len [ge min] [le max] |
| |
| Matching Rules: |
| 1. The target route must match the network bits specified in 'prefix/len'. |
| 2. The subnet mask length (/M) of the route must satisfy: |
| |
| len <= ge-value <= mask-length (/M) <= le-value <= 32 |
| |
+-----------------------------------------------------------------------------------+
Common Prefix-List Patterns & Logic
| Prefix-List Command | Matches | Explanation |
|---|---|---|
ip prefix-list P1 permit 10.0.0.0/8 | Exact 10.0.0.0/8 only | Matches prefix 10.0.0.0 with exact subnet mask /8. Subnets like 10.1.0.0/16 are rejected. |
ip prefix-list P2 permit 10.0.0.0/8 le 24 | 10.0.0.0 with masks /8 to /24 | Network must start with 10. Mask length must be between 8 and 24 bits inclusive. |
ip prefix-list P3 permit 10.0.0.0/8 ge 24 le 24 | 10.0.0.0 subnets of exact /24 | Matches any subnet within the 10.0.0.0 network that has an exact 24-bit mask. |
ip prefix-list P4 permit 0.0.0.0/0 | Default Route (0.0.0.0/0) | Matches only the quad-zero default route. |
ip prefix-list P5 permit 0.0.0.0/0 le 32 | Any Prefix (Permit Any) | Matches all possible IPv4 prefixes and all mask lengths (universal permit). |
ip prefix-list P6 permit 0.0.0.0/0 ge 32 | All /32 Host Routes | Matches any prefix anywhere as long as its subnet mask is exactly /32. |
Standard ACL vs. Extended ACL vs. Prefix-List for Route Filtering
| Feature | Standard ACL (1-99) | Extended ACL (100-199) | IP Prefix-List |
|---|---|---|---|
| Primary Matching Focus | Matches destination network prefix only | Source field = Network, Dest field = Subnet Mask | Matches network prefix AND subnet mask length simultaneously |
| Lookup Performance | Linear search (O(N) CPU overhead) | Linear search (O(N) CPU overhead) | Radix Tree (O(K) constant time) |
| Sequence Number Support | Yes (in modern named ACLs) | Yes | Yes (allows seamless rule insertion/deletion) |
| Mask Range Matching | No (cannot match ranges like /24 to /28) | Clunky (requires wildcard masks on destination field) | Native (ge and le modifiers) |
| Recommended Use | Legacy basic filtering | Policy-Based Routing, BGP complex matching | Standard Route Filtering & Redistribution |
6. Distribute-Lists & Link-State Filtering Caveats
A distribute-list applies an ACL, prefix-list, or route-map to filter routes entering or exiting a routing process.
! Distribute-List Syntax
Router(config-router)# distribute-list {acl-number | prefix prefix-list-name | route-map map-name} {in | out} [interface-name]
Distance-Vector vs. Link-State Distribute-List Behavior
Understanding how distribute-lists operate across different routing protocol classes is a crucial ENCOR exam concept:
-
Distance-Vector Protocols (EIGRP, RIP):
distribute-list out: Suppresses the specified routes from being sent in routing update packets to neighbors.distribute-list in: Drops the specified routes upon receipt; the router neither installs them in its own RIB nor advertises them to downstream neighbors.
-
Link-State Protocols (OSPF, IS-IS):
- Link-state protocols require every router within an area to maintain an identical Link-State Database (LSDB) to compute a valid, loop-free Dijkstra SPF shortest path tree.
distribute-list inon an Internal OSPF Router:- Does NOT filter or stop LSA flooding! The router receives the Type 1/2 LSAs and floods them unaltered to all adjacent neighbors.
- It only prevents the local router from installing the route into its local Routing Information Base (RIB).
- Downstream OSPF neighbors will still learn, compute, and install the route!
distribute-list outin OSPF:- Not permitted for native OSPF routes (OSPF cannot filter intra-area or inter-area LSAs upon egress).
- Only valid on an ASBR when redistributing external routes into OSPF.
A network administrator configures route redistribution from EIGRP into OSPFv2 on a Cisco IOS-XE router with the command: 'redistribute eigrp 100 metric 50 metric-type 1'. After applying the configuration, classful major networks appear in the OSPF database, but all subnetted prefixes (such as 10.10.10.0/24 and 172.16.50.0/24) are completely missing from OSPF. What is the root cause?
An engineer configures route redistribution from OSPF into EIGRP on a border router using the command 'redistribute ospf 1'. However, none of the OSPF routes appear in the EIGRP topology table or the routing tables of adjacent EIGRP neighbors. What is the reason for this behavior?
An enterprise network implements two boundary routers performing two-way mutual route redistribution between an OSPF core (AD 110) and an EIGRP campus network (AD 90/170). To prevent routing feedback loops and count-to-infinity conditions where routes injected into EIGRP are re-injected back into OSPF, what is the Cisco recommended design pattern?
An internal router in OSPF Area 0 is configured with an inbound distribute-list: 'distribute-list prefix-list FILTER_NET in'. The administrator confirms that prefix 10.200.1.0/24 is filtered and does not appear in the local router's routing table (RIB). However, a downstream router in the same area connected through this router continues to install 10.200.1.0/24 in its routing table. Why did the distribute-list fail to filter the route on the downstream router?