Skip to content
Log in Sign up My account

1.4 Redistribution

Blueprint 1.4: Troubleshoot redistribution between any routing protocols or routing sources

  • What gets redistributed: routes in the RIB from the source protocol, plus the connected networks that protocol runs on
  • Seed metrics and their defaults for EIGRP, OSPF, RIP and BGP, and the subnets, metric-type, include-connected and redistribute-internal details
  • Redistributing static, connected and default routes
  • One-point versus two-point mutual redistribution
  • Problems at multiple redistribution points: route feedback, suboptimal routing, routing loops
  • Fixes: tags, prefix filtering, administrative distance, and how to choose between them

How redistribution works

Redistribution copies routes from one routing source into another routing protocol on the same router. The router doing it is a boundary router; in OSPF it becomes an ASBR.

Three rules explain almost every "why is this route missing" question:

  1. Only routes in the RIB can be redistributed. redistribute ospf 1 takes routes whose RIB entry says "Known via ospf 1". If OSPF has the prefix in its database but EIGRP won the RIB with a lower AD, OSPF's copy is not redistributed.
  2. The connected networks that the source protocol runs on come too. redistribute eigrp 100 also brings in the connected subnets matched by EIGRP's network statements, even though they are C routes in the RIB. Other connected networks need redistribute connected.
  3. Redistribution is not transitive. A router running RIP, EIGRP and OSPF that redistributes RIP into EIGRP and EIGRP into OSPF does not put the RIP routes into OSPF. Each pair needs its own redistribute.
graph LR
  subgraph EIGRP ["EIGRP AS 100"]
    E1["EIGRP routers"]
  end
  subgraph OSPF ["OSPF area 0"]
    O1["OSPF routers"]
  end
  E1 -- "Gi0/0 10.1.2.0/30" --- B["Boundary router<br/>ASBR"]
  B -- "Gi0/1 10.2.4.0/30" --- O1
  B -. "EIGRP routes appear as O E2, AD 110" .-> O1
  B -. "OSPF routes appear as D EX, AD 170" .-> E1

Seed metrics

Each protocol needs a starting metric for routes that arrive from elsewhere. If you set nothing, defaults apply.

Redistributing into Default seed metric Practical result
EIGRP Infinite for routes from other protocols Routes are not advertised. Set a metric.
RIP Infinite for routes from other protocols Routes are not advertised. Set a metric.
OSPF 20 as E2, except routes from BGP, which get 1 Works without a metric
BGP The IGP metric is copied into MED; origin is incomplete (?) Works without a metric

Exceptions to the infinite default: connected and static routes redistributed into EIGRP or RIP take a usable metric from the interface, and routes redistributed from one EIGRP AS into another keep their EIGRP metric.

Ways to set it, from most specific to least:

route-map O2E permit 10
 set metric 1000000 10 255 1 1500           ! 1) route map wins
!
router eigrp 100
 redistribute ospf 1 metric 100000 100 255 1 1500 route-map O2E  ! 2) then the metric keyword
 default-metric 10000 100 255 1 1500        ! 3) then default-metric for anything left

The five EIGRP values are bandwidth in kbps, delay in tens of microseconds, reliability (1 to 255), load (1 to 255) and MTU in bytes.

router eigrp 100
 redistribute ospf 1 metric 1000000 10 255 1 1500 route-map O2E
 redistribute static
 redistribute connected route-map CONN
router eigrp CORP
 address-family ipv4 unicast autonomous-system 100
  topology base
   redistribute ospf 1 metric 1000000 10 255 1 1500 route-map O2E
router ospf 1
 redistribute eigrp 100 subnets metric 50 metric-type 1 tag 90
 redistribute static subnets route-map STATICS
 default-information originate              ! a default route is never taken by "redistribute"
router bgp 65001
 address-family ipv4 unicast
  redistribute ospf 1 match internal external 1 external 2 route-map O2B
  redistribute static route-map STATICS
router bgp 65001
 address-family ipv4 unicast
  bgp redistribute-internal          ! otherwise only eBGP routes are redistributed
!
router ospf 1
 redistribute bgp 65001 subnets route-map ONLY-CUSTOMER-PREFIXES
ipv6 router ospf 1
 redistribute eigrp 100 include-connected
!
router eigrp CORP
 address-family ipv6 unicast autonomous-system 100
  topology base
   redistribute ospf 1 metric 1000000 10 255 1 1500 include-connected

Protocol details that cause faults

Detail What goes wrong
OSPF subnets On older IOS, without subnets only classful networks are redistributed into OSPF. Current IOS XE adds subnets automatically, but exam exhibits may show the keyword missing on purpose.
OSPF default route redistribute static never redistributes 0.0.0.0/0 into OSPF. Use default-information originate (needs a default in the RIB) or default-information originate always. EIGRP and RIP do redistribute a static default with redistribute static.
OSPF E1 versus E2 E2 (default) keeps the seed metric everywhere. E1 adds the internal cost to the ASBR. An E1 route is preferred over an E2 route for the same prefix regardless of metric.
OSPF stub areas An ASBR cannot sit in a stub or totally stubby area because Type 5 LSAs are not allowed there. Use NSSA, where the ASBR originates Type 7 LSAs that the ABR translates to Type 5.
OSPF into BGP Only internal OSPF routes (intra-area and inter-area) are redistributed by default. Add match internal external 1 external 2.
BGP into IGP Only eBGP-learned routes by default. iBGP routes need bgp redistribute-internal. Redistributing a full Internet table into an IGP is never the right answer.
IPv6 Connected interfaces of the source protocol are not included unless you add include-connected.
Process numbers redistribute ospf 2 when the OSPF process is 1 is accepted and does nothing useful. Always compare with show ip protocols.

Exam trap

If an EIGRP or RIP router has no external routes after redistribute ospf 1, check the seed metric first. The configuration looks complete, the command is accepted, show ip protocols lists the redistribution, and nothing is advertised because the metric is infinite. On the boundary router itself the source routes are still present, which misleads people into checking the wrong router.

Verifying redistribution

R2# show ip protocols | section eigrp
Routing Protocol is "eigrp 100"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Default networks flagged in outgoing updates
  Default networks accepted from incoming updates
  Redistributing: ospf 1
  EIGRP-IPv4 Protocol for AS(100)
    Metric weight K1=1, K2=0, K3=1, K4=0, K5=0
  ...
  Distance: internal 90 external 170

On the boundary router, the RIB entry for a source route tells you where it is being redistributed:

R2# show ip route 10.4.40.0
Routing entry for 10.4.40.0/24
  Known via "ospf 1", distance 110, metric 2, type intra area
  Redistributing via eigrp 100
  Advertised by eigrp 100 metric 1000000 10 255 1 1500 route-map O2E
  Last update from 10.2.4.2 on GigabitEthernet0/1, 00:20:13 ago

Inside each domain, look for the external code and its details: D EX with show ip eigrp topology <prefix> (external protocol, external metric, tag), and O E1/O E2 with show ip ospf database external <prefix> (advertising router, metric type, tag, forward address).

One-point and two-point redistribution

Design What it looks like Risk
One-point, one-way Routes go from A into B at one router. B sends a default route back into A. Lowest. No feedback path.
One-point, mutual One router redistributes both ways Low. Routes cannot loop back in through a second router. No redundancy.
Multipoint, one-way Several routers redistribute A into B only Suboptimal routing possible, no feedback
Multipoint (two-point), mutual Two or more routers redistribute both ways Route feedback, suboptimal routing, loops, route flapping

Two-point mutual redistribution is the design the exam uses, because it is what real networks build for redundancy and it breaks in interesting ways.

Problem 1: suboptimal routing from AD

Take a prefix native to EIGRP that enters EIGRP as an external (for example a partner network, AD 170). Boundary router R2 redistributes it into OSPF. Boundary router R3 now hears it twice: as D EX from the EIGRP side (AD 170) and as O E2 from the OSPF side (AD 110). OSPF wins. R3 sends traffic for an EIGRP network across the OSPF domain to R2 and back into EIGRP.

The same thing happens with RIP: a RIP-native route (AD 120) that comes back in as an OSPF external (AD 110) beats the real RIP path on the second boundary router.

EIGRP internal routes are safe on their own because AD 90 beats OSPF 110. The trouble is EIGRP externals and RIP routes.

graph LR
  R1["R1 EIGRP<br/>Lo100 192.168.100.0/24<br/>redistributed: D EX"] -- "10.1.2.0/30" --- R2["R2 ASBR"]
  R1 -- "10.1.3.0/30" --- R3["R3 ASBR"]
  R2 -- "10.2.4.0/30" --- R4["R4 OSPF"]
  R3 -- "10.3.4.0/30" --- R4
  R3 -. "installs O E2 AD 110 via R4<br/>instead of D EX AD 170 via R1" .-> R4

Problem 2: route feedback and loops

R3 now has the prefix as an OSPF route in its RIB, so its redistribute ospf 1 under EIGRP sends it back into EIGRP as a new external. The prefix now exists in EIGRP from two origins: the real one and the copy R3 fed back. If the real source disappears, the fed-back copy can keep the route alive: R1 learns it from R3, R2 learns it from R1 and keeps the OSPF LSA alive, and R3 keeps feeding it back from OSPF. Traffic for the dead prefix loops until TTL expires, and the route may flap as timers expire and refresh.

Symptoms on the exam:

  • A border router shows an O E2 route for a prefix that clearly belongs to the EIGRP or RIP domain.
  • show ip route shows the update timer constantly near zero for one prefix (it keeps being replaced).
  • Traceroute repeats the border routers.
  • A prefix that was removed at its source is still reachable in the routing table but not by ping.

Fix 1: tags (stops feedback)

Tag routes as they enter each domain, and deny the opposite tag on the way out. Do it on every boundary router, in both directions, with the same values.

route-map E2O deny 10
 match tag 110
route-map E2O permit 20
 set tag 90
!
route-map O2E deny 10
 match tag 90
route-map O2E permit 20
 set tag 110
!
router ospf 1
 redistribute eigrp 100 subnets route-map E2O
router eigrp 100
 redistribute ospf 1 metric 1000000 10 255 1 1500 route-map O2E

Tags stop feedback. They do not by themselves stop suboptimal routing, because R3 still installs the O E2 copy (tag 90) instead of the EIGRP path; it just no longer sends it back.

Fix 2: AD (stops suboptimal routing)

router ospf 1
 distance ospf external 171

On the boundary routers, OSPF externals now lose to EIGRP externals (170), so the native EIGRP path wins. Simple, and the most common exam answer. Side effect: genuine OSPF externals from other ASBRs (for example an Internet default) also become 171. If the other boundary router has fed a copy of them into EIGRP, that copy now wins. Combine with tags so that never happens.

ip access-list standard EIGRP-EXTERNALS
 permit 192.168.100.0 0.0.0.255
!
router ospf 1
 ! source = router ID of the other boundary router
 distance 171 10.255.255.2 0.0.0.0 EIGRP-EXTERNALS

Precise, but needs maintenance as prefixes change, and must reference router IDs.

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 in

The boundary router simply never installs an OSPF route that originated in EIGRP, so its EIGRP copy is used. The LSA still floods to the rest of the OSPF domain normally. This scales with the tag scheme and has no side effects on genuine OSPF externals.

Exam trap

Lowering the EIGRP external AD below 110 on the boundary routers (distance eigrp 90 105) fixes the EIGRP-origin prefixes but creates the mirror problem for OSPF-origin prefixes: the copy the other boundary router redistributed into EIGRP now beats the native OSPF route. Raise OSPF externals above 170 instead, or filter by tag.

Exam trap

Configuring tags on only one boundary router, or in only one direction, leaves the loop open. When an exhibit shows route maps with tags, check all four combinations: router A into OSPF, router A into EIGRP, router B into OSPF, router B into EIGRP. A tag value that differs by one digit on one router is a classic planted fault.

Fix 3: prefix filtering

Permit only the prefixes native to each domain at each boundary. Precise, but every new subnet needs a change on every boundary router. It is a good extra safety net, and the right answer when the ticket says "only these networks may be redistributed".

Troubleshooting flow

graph TB
  A["Route missing or wrong in the target domain"] --> B{"Is the route in the boundary router RIB<br/>from the source protocol?"}
  B -->|"No"| B1["Fix the source protocol, or AD: another source won the RIB"]
  B -->|"Yes"| C{"show ip protocols: redistributing<br/>the right process?"}
  C -->|"No"| C1["Fix process number or add redistribute"]
  C -->|"Yes"| D{"Seed metric set where needed?"}
  D -->|"No"| D1["Add metric or default-metric"]
  D -->|"Yes"| E{"Route map or distribute list permits it?"}
  E -->|"No"| E1["Fix route map, prefix list or tag"]
  E -->|"Yes"| F["Check the target domain: stub area, filtering, AD on other routers"]

Lab: two-point mutual redistribution, loop and fix

Topology: four IOSv routers. R1 is the EIGRP core and redistributes a partner network on Lo100 as an EIGRP external. R4 is in OSPF area 0. R2 and R3 redistribute mutually. For a timed, multi-fault version of this scenario, do Sim 05 after this lab.

graph LR
  subgraph EIGRP ["EIGRP AS 100"]
    R1["R1<br/>Lo10 10.1.10.1/24<br/>Lo100 192.168.100.1/24"]
  end
  subgraph OSPF ["OSPF area 0"]
    R4["R4<br/>Lo40 10.4.40.1/24"]
  end
  R1 -- "Gi0/0 .1 10.1.2.0/30 .2 Gi0/0" --- R2["R2 ASBR"]
  R1 -- "Gi0/1 .1 10.1.3.0/30 .2 Gi0/0" --- R3["R3 ASBR"]
  R2 -- "Gi0/1 .1 10.2.4.0/30 .2 Gi0/0" --- R4
  R3 -- "Gi0/1 .1 10.3.4.0/30 .2 Gi0/1" --- R4

Step 1. Build the faulty baseline (no tags, no AD changes: this is the design many networks start with).

! R1
interface Loopback10
 ip address 10.1.10.1 255.255.255.0
interface Loopback100
 ip address 192.168.100.1 255.255.255.0
interface GigabitEthernet0/0
 ip address 10.1.2.1 255.255.255.252
interface GigabitEthernet0/1
 ip address 10.1.3.1 255.255.255.252
ip prefix-list PARTNER seq 5 permit 192.168.100.0/24
route-map PARTNER permit 10
 match ip address prefix-list PARTNER
router eigrp 100
 eigrp router-id 10.255.255.1
 network 10.1.2.0 0.0.0.3
 network 10.1.3.0 0.0.0.3
 network 10.1.10.0 0.0.0.255
 redistribute connected route-map PARTNER
!
! R2 (R3 is the same with 10.1.3.2, 10.3.4.1 and router IDs 10.255.255.3)
interface GigabitEthernet0/0
 ip address 10.1.2.2 255.255.255.252
interface GigabitEthernet0/1
 ip address 10.2.4.1 255.255.255.252
router eigrp 100
 eigrp router-id 10.255.255.2
 network 10.1.2.0 0.0.0.3
 redistribute ospf 1 metric 1000000 10 255 1 1500
router ospf 1
 router-id 10.255.255.2
 network 10.2.4.0 0.0.0.3 area 0
 redistribute eigrp 100 subnets
!
! R4
interface Loopback40
 ip address 10.4.40.1 255.255.255.0
 ip ospf network point-to-point
interface GigabitEthernet0/0
 ip address 10.2.4.2 255.255.255.252
interface GigabitEthernet0/1
 ip address 10.3.4.2 255.255.255.252
router ospf 1
 router-id 10.255.255.4
 network 10.2.4.0 0.0.0.3 area 0
 network 10.3.4.0 0.0.0.3 area 0
 network 10.4.40.0 0.0.0.255 area 0

Step 2. Observe suboptimal routing. One of the two ASBRs (whichever redistributed the partner route first) keeps the EIGRP path; the other installs the OSPF copy. On the affected router:

R3# show ip route 192.168.100.0
Routing entry for 192.168.100.0/24
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 2
  Redistributing via eigrp 100
  Advertised by eigrp 100 metric 1000000 10 255 1 1500
  Last update from 10.3.4.2 on GigabitEthernet0/1, 00:01:10 ago
  Routing Descriptor Blocks:
  * 10.3.4.2, from 10.255.255.2, 00:01:10 ago, via GigabitEthernet0/1
      Route metric is 20, traffic share count is 1

R3# traceroute 192.168.100.1 numeric
  1 10.3.4.2 2 msec 1 msec 1 msec
  2 10.2.4.1 2 msec 2 msec 2 msec
  3 10.1.2.1 3 msec 3 msec 3 msec

R3 is one hop from R1 but goes through R4 and R2. Note also "Advertised by eigrp 100": R3 is feeding the OSPF copy back into EIGRP.

Step 3. Observe feedback. On R1, look at the topology table: there is a second external path for 192.168.100.0/24 from R3, with external protocol OSPF.

R1# show ip eigrp topology 192.168.100.0/24 | include from|External protocol
  0.0.0.0 (Loopback100), from Rconnected, Send flag is 0x0
  10.1.3.2 (GigabitEthernet0/1), from 10.1.3.2, Send flag is 0x0
        External protocol is OSPF, external metric is 20

Now shut Loopback100 on R1. Watch show ip route 192.168.100.0 on R1, R2 and R3 for a minute. You will usually find the prefix still present on some routers, sourced from the fed-back copy, and ping 192.168.100.1 from R4 fails with traceroute showing the ASBRs repeating. Exact behaviour depends on timing, which is why feedback problems look intermittent in production. Bring Loopback100 back up.

Step 4. Fix feedback with tags on R2 and R3.

route-map E2O deny 10
 match tag 110
route-map E2O permit 20
 set tag 90
route-map O2E deny 10
 match tag 90
route-map O2E permit 20
 set tag 110
!
router ospf 1
 redistribute eigrp 100 subnets route-map E2O
router eigrp 100
 redistribute ospf 1 metric 1000000 10 255 1 1500 route-map O2E

Step 5. Fix suboptimal routing with AD on R2 and R3.

router ospf 1
 distance ospf external 171

Step 6. Verify.

R3# show ip route 192.168.100.0
Routing entry for 192.168.100.0/24
  Known via "eigrp 100", distance 170, metric 130816, type external
  Redistributing via ospf 1
  Advertised by ospf 1 subnets route-map E2O
  Last update from 10.1.3.1 on GigabitEthernet0/0, 00:00:32 ago
  Routing Descriptor Blocks:
  * 10.1.3.1, from 10.1.3.1, 00:00:32 ago, via GigabitEthernet0/0
      Route metric is 130816, traffic share count is 1

R4# show ip ospf database external 192.168.100.0 | include Advertising|Metric|Tag
  Advertising Router: 10.255.255.2
        Metric Type: 2 (Larger than any link state path)
        Metric: 20
        External Route Tag: 90
  Advertising Router: 10.255.255.3
        Metric Type: 2 (Larger than any link state path)
        Metric: 20
        External Route Tag: 90

R4 now has two equal E2 routes, one through each ASBR, which is the redundancy the design wanted. Repeat the Loopback100 shutdown test: the prefix disappears everywhere within seconds. Check that R1's topology table no longer shows an OSPF-origin path for it.

Stretch. Replace distance ospf external 171 with the tag-based inbound filter (distribute-list route-map NO-EIGRP-ORIGIN in under OSPF). Then add a static default route on R4 redistributed with default-information originate and confirm it reaches R1 as D*EX, tagged 110, and is not fed back into OSPF.

Quick check

R2 redistributes OSPF into EIGRP. 10.2.4.0/30 is an OSPF-enabled link connected to R2, so it is a C route on R2. Does R1 learn it through EIGRP?

Yes, as D EX. Redistributing OSPF also brings the connected networks covered by OSPF's network statements or ip ospf area commands, provided the redistribution route map, if any, permits them. For IPv6 the same is only true with include-connected.

A boundary router has redistribute ospf 1 under router bgp 65001. Only some OSPF routes appear in BGP. Which ones are missing?

OSPF external routes (E1 and E2, and NSSA externals). By default only intra-area and inter-area OSPF routes are redistributed into BGP. Add match internal external 1 external 2 to the redistribute command.

Tags are configured correctly on both ASBRs, but one ASBR still sends traffic for an EIGRP external prefix through the OSPF domain. What is missing?

An AD fix. Tags stop feedback but do not change which copy the boundary router installs. Raise the OSPF external AD above 170 on the ASBRs, or deny OSPF routes carrying the EIGRP-origin tag with an inbound distribute list.

References

  • IP Routing: Protocol-Independent Configuration Guide, Cisco IOS XE 17, "Redistributing Routing Protocols" (search on cisco.com)
  • Cisco technote "Redistributing Routing Protocols" (document ID 8606, search on cisco.com)
  • IP Routing: OSPF Configuration Guide, Cisco IOS XE 17, NSSA and external route sections (search on cisco.com)
  • Cisco Live On-Demand Library: search "redistribution" and "advanced OSPF"
  • Related: Diagram N02, Diagram N03, Sim 05