How does route redistribution work, and what rules do you need to know?
Show the answer
Say this first
A router running two routing sources copies routes from one into the other: statics into OSPF, OSPF into
EIGRP during a merger, an IGP into BGP. The receiving protocol needs a seed metric. Only routes that are in
the RIB from that source, plus connected networks the source protocol runs on, are taken. It is not
transitive on one router. OSPF needs subnets on older releases. And you always filter it with a route-map.
Go deeper
Seed metrics
| Into | Default | What to do |
|---|---|---|
| OSPF | metric 20, type E2 (1 for routes from BGP) | set metric and E1 or E2 deliberately |
| EIGRP | routes from other protocols are not advertised without a metric | metric <bw> <delay> <rel> <load> <mtu> |
| RIP | routes from other protocols are not advertised without a metric | metric <hops> |
| BGP | MED is set from the IGP metric | usually reset or filtered |
Example
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-EIGRPThe EIGRP seed is bandwidth 100,000 kbps, delay 10 (tens of microseconds), reliability 255, load 1, MTU 1500.
What gets taken
redistribute ospf 1 on R2 takes routes that are in R2's routing table as OSPF routes, plus the connected
subnets of interfaces where OSPF runs. If R2 prefers an EIGRP copy of some prefix, that prefix is not
redistributed from OSPF, because it is not an OSPF route in R2's table.
Not transitive
R2 runs RIP, OSPF and EIGRP. RIP goes into OSPF, and OSPF goes into EIGRP. The RIP routes do not reach EIGRP, because in R2's own table they are RIP routes, not OSPF routes. Redistribute RIP into EIGRP as well if you need them.
OSPF E1 and E2
E2 keeps the seed metric everywhere in the domain. E1 adds the internal cost to the ASBR, so routers prefer the closer exit. With two ASBRs injecting the same prefix, E1 usually gives the better path.
They will ask next
What happens if you forget the metric when redistributing OSPF into EIGRP?
Nothing is advertised. The routes are taken but have an infinite metric. You set it on the
redistributeline, withdefault-metricunder the process, or in the route-map.
Traps
- Redistributing without a route-map. One typo pulls an internet table or a default route into the IGP.
- Forgetting
subnetson an older IOS release and wondering why only classful networks appear.