You redistribute both ways between OSPF and EIGRP on two routers. What can go wrong, and how do you prevent it?
Show the answer
Say this first
With two redistribution points a route can leave domain A on one router, cross domain B, and come back into A on the other router. Because OSPF (110) beats EIGRP external (170), the second redistributor may prefer that copy over the native route, giving a longer path and, when the original disappears, a loop that keeps a dead route alive. The standard fix: tag routes as they enter a domain and deny that tag on the way back out, on both routers. Then fix the AD preference for the routes that come back.
Go deeper
Topology
R1 is in OSPF, R4 in EIGRP 100. R2 and R3 sit between them and redistribute both ways. R4 redistributes a static for a partner network, 192.0.2.0/24, so R2 and R3 see it as EIGRP external, AD 170.
What goes wrong
- R2 redistributes 192.0.2.0/24 into OSPF as E2.
- R3 now has it from EIGRP (170) and from OSPF (110). It installs the OSPF copy: traffic from R3 goes R3, R1, R2, R4 instead of straight to R4.
- Because it is an OSPF route in R3's table, R3 redistributes it into EIGRP, back toward R4.
- If R4's static is removed, R4 can install R3's copy, R2 still sees an EIGRP route and keeps feeding OSPF, and the route circulates with no real destination. Traffic loops until TTL expires.
Fix 1: tags (stops the feedback)
The same configuration on R2 and R3:
route-map EIGRP-TO-OSPF deny 10
match tag 110
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 ospf 1
redistribute eigrp 100 subnets route-map EIGRP-TO-OSPF
!
router eigrp 100
redistribute ospf 1 metric 100000 10 255 1 1500 route-map OSPF-TO-EIGRPRoutes from EIGRP enter OSPF with tag 90 and can never be redistributed back into EIGRP. Routes from OSPF enter EIGRP with tag 110 and can never go back into OSPF. Both OSPF external LSAs and EIGRP external routes carry the tag across the domain.
Fix 2: the AD preference
Tags stop the loop but R3 still prefers the OSPF E2 copy of 192.0.2.0/24. One clean way is to stop each redistributor from installing routes that started in the other domain and came back:
route-map NO-EIGRP-ORIGIN deny 10
match tag 90
route-map NO-EIGRP-ORIGIN permit 20
!
router ospf 1
distribute-list route-map NO-EIGRP-ORIGIN inOn R2 and R3 this only filters what OSPF puts in their own routing table; the LSAs still flood to R1. Now R3 uses its native EIGRP external route. The trade-off: if R3 loses its EIGRP side, it cannot reach those prefixes through OSPF itself.
Other options
- Raise AD for specific prefixes with
distanceand an ACL. - Redistribute at one point only, with the second router as a manual backup.
- Redistribute only a default route in one direction, which avoids most of the problem.
They will ask next
Why don't EIGRP internal routes have this problem?
EIGRP internal is AD 90, which beats OSPF's 110, so a redistributor always prefers the native internal route over its OSPF copy. The trouble starts with EIGRP externals (170), or with RIP (120), which both lose to OSPF.
Do tags survive across the whole domain?
Yes. OSPF carries a 32-bit tag in type 5 and type 7 LSAs, EIGRP carries a tag in external routes, and RIPv2 has a 16-bit route tag. Every router in the domain sees the tag the redistributor set.
Traps
- Saying tags fix suboptimal routing. Tags stop routes being re-injected; the AD choice on the redistributor needs its own fix.
- Applying the route-maps on only one of the two redistributors.