Octet

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

IntoDefaultWhat to do
OSPFmetric 20, type E2 (1 for routes from BGP)set metric and E1 or E2 deliberately
EIGRProutes from other protocols are not advertised without a metricmetric <bw> <delay> <rel> <load> <mtu>
RIProutes from other protocols are not advertised without a metricmetric <hops>
BGPMED is set from the IGP metricusually reset or filtered

Example

Cisco IOS
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-EIGRP

The 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.

Traps

  • Redistributing without a route-map. One typo pulls an internet table or a default route into the IGP.
  • Forgetting subnets on an older IOS release and wondering why only classful networks appear.
How did you do?Book 3.4 Routing