L3 · igp · reviewed
Redistribution
Route redistribution between routing protocols
Moves routes from one protocol into another, discarding the metric and the loop prevention that made them trustworthy.
Presenter modeEmbed this figure
Why it exists
Networks end up running more than one routing protocol — an acquisition, a vendor migration, a segment that needs something the rest does not. Each protocol knows only its own routes, and something has to carry a prefix across the boundary.
Redistribution does that, and in doing so discards two things: the metric, because the units are incompatible, and the loop prevention, because that is internal to the protocol that had it. Everything difficult about redistribution follows from the second. AS-external-LSAsRFC 2328 · INTERNET STANDARD · April 1998
The best redistribution design is usually less redistribution. Most requirements that look symmetric are not, and a default route one way with a summary the other removes the problem rather than managing it.
A route crosses a boundary and loses its history
Two protocols measure distance in incompatible units. Crossing between them discards the metric, and something has to invent a replacement.
OSPF measures cost, derived from bandwidth. EIGRP measures a composite of bandwidth and delay. The two numbers are not comparable and there is no conversion. OSPF domain: Metric cost. ASBR. EIGRP domain: Metric composite.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| OSPF domain | cloud | Metric: cost |
| ASBR | router | — |
| EIGRP domain | cloud | Metric: composite |
| OSPF domain — ASBR | link | up |
| ASBR — EIGRP domain | link | up |
OSPF measures cost, derived from bandwidth. EIGRP measures a composite of bandwidth and delay. The two numbers are not comparable and there is no conversion.
What changed
- OSPF domain: Metric → cost
- EIGRP domain: Metric → composite
- Emphasis on ASBR
How it works
A router running both protocols takes routes from one routing information base and originates them into the other. It supplies a seed metric, because the original is meaningless in the new protocol, and marks them external.
External routes are deliberately discounted. A protocol prefers its own routes because it can reason about them and cannot reason about one whose history it does not have — which is why EIGRP gives external routes an administrative distance of 170 against 90 for internal.
Administrative distance decides which protocol wins for the same prefix on the same router. It is local, configurable, compares nothing about the routes themselves, and runs only after longest-prefix match has already chosen the prefix.
Route tags are the mechanism that puts back what redistribution removed. A tag applied on export and matched on import lets a router recognise a route that originated in its own domain and refuse to re-import it.
On the wire
Constructed examples, encoded from the field table below them — not captured traffic.
- LSA header
- Present at the start of every LSA and listed by itself inside Database Description packets. RFC 2328
Configure it
route-map OSPF-TO-EIGRP permit 10 match tag 200 set tag 100Tags every route leaving OSPF with 100, and refuses anything already carrying 200 — the tag the other direction applies. Both halves in one map.
Common mistake: Applying a tag and never matching on it. The tag alone changes nothing; the deny on import is what breaks the loop.
route-map OSPF-TO-EIGRP deny 5 match tag 100Evaluated first because of the lower sequence number. A route already tagged 100 originated in OSPF and must not be sent back.
router eigrp CORE address-family ipv4 unicast autonomous-system 100 topology base redistribute ospf 1 metric 1000000 100 255 1 1500 route-map OSPF-TO-EIGRPThe seed metric is bandwidth, delay, reliability, load and MTU. Omitting it on EIGRP redistributes nothing at all, silently.
Common mistake: Relying on a default metric. On EIGRP there is none and the redistribution is accepted and does nothing.
RFC 2328 §12.4.4
route-map EIGRP-TO-OSPF deny 5 match tag 200 route-map EIGRP-TO-OSPF permit 10 set tag 200 router ospf 1 redistribute eigrp 100 subnets route-map EIGRP-TO-OSPFThe mirror image, with the tags reversed. `subnets` is required on OSPF or only classful networks are redistributed — a default that surprises everyone once.
Verify
show ip route ospf- External routes and their tags.
show ip eigrp topology- External routes with their origin.
show route-map- Match counts, which reveal a map matching nothing.
Caveats
- Route map sequence order matters: the deny must be evaluated before the permit.
- Without `subnets`, OSPF redistribution silently drops everything that is not a classful network.
When it breaks
Symptom first, because that is what you have when it happens.
Traffic to a prefix loops between two border routers, or a route flaps continuously between two sources.
Narrow it down
- Establish where the prefix originates and trace every path it can take back to that protocol.
- Check whether both borders redistribute in both directions.
- Look for route tags — their absence is usually the answer.
Cause
Mutual redistribution with no tagging. A route leaves one protocol, returns through the other, and is re-injected because nothing records that it started there.
Fix
Tag on export and deny on import at every redistribution point, in both directions. Or remove one direction and send a default instead.
Redistribution is configured, the command is accepted, and no routes appear.
Narrow it down
- Check whether a seed metric was set, and what the platform default is.
- Confirm the source routes are actually in the routing table, not just in the protocol database.
- Look for a route map that matches nothing.
Cause
A missing seed metric. Redistributing into some protocols with no metric produces a metric of infinity, which is a valid configuration that advertises nothing.
Fix
Set the metric explicitly. Never rely on the default, which differs by platform and by target protocol.
Traffic takes a long path to a destination that has a much shorter one, and the routing table looks correct.
Narrow it down
- Check whether the preferred route is internal and the shorter one external.
- Compare administrative distances rather than metrics.
- Establish whether the flat seed metric has made two very different paths look identical.
Cause
Either external routes are being discounted as designed, or every redistributed route carries the same seed metric so the protocol cannot tell a near destination from a far one.
Fix
Set metrics per prefix with a route map where the distinction matters. Changing administrative distance is the tempting fix and the one that creates loops.
Redistributing one protocol into another works, and the directly connected networks on the redistributing router are missing.
Narrow it down
- Check whether connected routes are being redistributed separately.
- Confirm which interfaces are covered by the source protocol’s own configuration.
- Look at whether a passive interface is involved.
Cause
Redistributing a protocol moves that protocol’s routes and nothing else. A connected network the source protocol does not carry is not included, because it was never one of its routes.
Fix
Redistribute connected as well, with a route map limiting it to the interfaces intended. Redistributing all connected routes without one is how management and point-to-point subnets end up advertised globally.
Routes leave one domain and never return, or return only for some prefixes, after a route-map change that looked symmetric.
Narrow it down
- Compare the export and import route maps at every redistribution point.
- Confirm tag match and set clauses point the same way on both borders.
- Check whether a deny that was meant for re-import also matches first-hop exports.
Cause
Policy applied in only one direction, or a deny that matches more than the tagged re-imports. Redistribution is not symmetric just because both directions are configured — each map is evaluated independently.
Fix
Make export and import explicit and opposite: set the tag on the way out, match and deny it on the way in. Test with a single prefix before opening the whole table.
Design notes
Tag from the beginning, at every redistribution point, in both directions. Tags cost nothing and retrofitting them to a network that is already looping means enumerating every path a route can take — which is exactly the analysis the loop made hard.
Set the seed metric deliberately. The default on some platforms is infinity, which silently redistributes nothing; on others it is a flat value that makes every external destination look equidistant regardless of how far away it is.
Changing administrative distance to fix a redistribution problem usually moves it. Distance is per router and per source, so a change that fixes the path at one border can invert the preference at another and produce a loop that was not there before.
Prefer one-way redistribution with a default. It is smaller, it cannot loop, and the optimality it gives up is rarely worth what mutual redistribution costs to operate.
Misconceptions
- “The metric is converted when a route is redistributed.”
- It is discarded. There is no conversion because the units are not comparable — an OSPF cost is not a number of anything EIGRP measures. A seed metric is invented at the boundary, and every route gets the same one unless a policy says otherwise.
- “Administrative distance is a kind of metric.”
- A metric compares paths within one protocol. Distance compares protocols, is local to one router, is configurable, and never crosses the wire. Two routers can disagree about it entirely, which is one way to build a loop.
- “Route tags are a nice-to-have.”
- They are the only mechanism that puts back the loop prevention redistribution removes. In a mutual redistribution they are not optional, and adding them after the loop appears is far harder than adding them at the start.
- “Redistributing at two points is more redundant.”
- It is more redundant and it is what creates the loop. One redistribution point cannot loop; two can, and the second is the reason tagging exists. The redundancy is worth having and has to be paid for with policy.
More walkthroughs
Mutual redistribution, and the loop it buildsfailure
Two routers redistribute both ways. A route leaves one protocol, returns through the other, and is believed — because nothing remembers where it came from.
Two routers join the domains, and both redistribute in both directions. This is a common and reasonable-looking design: it provides redundancy. OSPF. R1: Redistributing both ways. R2: Redistributing both ways. EIGRP.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| OSPF | cloud | — |
| R1 | router | Redistributing: both ways |
| R2 | router | Redistributing: both ways |
| EIGRP | cloud | — |
| OSPF — R1 | link | up |
| OSPF — R2 | link | up |
| R1 — EIGRP | link | up |
| R2 — EIGRP | link | up |
Two routers join the domains, and both redistribute in both directions. This is a common and reasonable-looking design: it provides redundancy.
What changed
- R1: Redistributing → both ways
- R2: Redistributing → both ways
- Emphasis on R1
- Emphasis on R2
One-way redistribution and a default routedesign-choice
Most designs that need mutual redistribution do not. Sending a default one way removes the loop, the tags, and the argument.
The branch needs to reach the core, and the core needs to reach the branch. The instinct is to redistribute both ways. Core · OSPF. Border: Proposed mutual redistribution. Branch · EIGRP.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| Core · OSPF | cloud | — |
| Border | router | Proposed: mutual redistribution |
| Branch · EIGRP | cloud | — |
| Core · OSPF — Border | link | up |
| Border — Branch · EIGRP | link | up |
The branch needs to reach the core, and the core needs to reach the branch. The instinct is to redistribute both ways.
What changed
- Emphasis on Border
- Border: Proposed → mutual redistribution
Terms
- Seed metric
- The metric invented at a redistribution boundary, because the original is meaningless in the receiving protocol. Every route gets the same one unless a policy differentiates them.
- Administrative distance
- A local, configurable preference between routing protocols offering the same prefix. It never crosses the wire and runs only after longest-prefix match has chosen the prefix.
- Route tag
- A value attached to a route and carried across protocols. In a mutual redistribution it restores the origin history that redistribution discarded, which is what prevents the loop.