A real-life situation
The company connects to a partner that runs EIGRP and owns 10.50.0.0/16. R5 speaks both protocols. Users everywhere need to reach the partner, but OSPF routers only know OSPF routes. R5 must redistribute the partner's routes into OSPF, and every router, in every area, has to work out both the route and how to reach R5.
What external routes are
- 1. R5 learns 10.50.0.0/16 from the partner R5 runs EIGRP towards the partner and redistributes those routes into OSPF. That makes R5 an ASBR.
- 2. R5's type 5 LSA is flooded everywhere Unchanged through areas 2, 0 and 1. It says: 10.50.0.0/16, metric 20, type E2, advertised by 5.5.5.5.
- 3. R4 tells area 0 where R5 is Area 0 has no type 1 LSA for R5, so R4 creates a type 4: ASBR 5.5.5.5 is reachable through me.
- 4. R2 does the same for area 1 R2 creates its own type 4 into area 1, with its cost to reach R5. Now R1 can complete the route.
Why it works this way
External prefixes can be numerous (a full partner network, or thousands of BGP routes), so OSPF floods each one once, unchanged, as a type 5 LSA. It doesn't rewrite them at every ABR the way type 3 summaries are rewritten. That leaves one question for routers in other areas: where is the ASBR? The type 4 LSA answers it with the ABR's cost to the ASBR, so each router can add its own cost to the ABR.
E2 and E1
| Type | Metric shown | R1's metric for 10.50.0.0/16 (seed 20) |
|---|---|---|
| E2 (default) | The seed metric only | 20 |
| E1 | Seed metric + internal cost to the ASBR | 20 + 4 = 24 (R1 → R2 → R3 → R4 → R5) |
With E2, routers still know the internal cost to the ASBR (the forward metric) and use it to choose between two E2 routes with the same seed metric, for example from two ASBRs.
Which route type wins
For the same prefix, OSPF prefers, in order:
- intra-area (
O), - inter-area (
O IA), - external type 1 (
O E1, orO N1in an NSSA), - external type 2 (
O E2, orO N2).
Only within the same type does the lower metric decide.
How to configure it on Cisco IOS
router ospf 1
redistribute eigrp 100 subnetsOn R5. Every EIGRP route becomes a type 5 LSA with the default seed metric 20 and type E2.
router ospf 1
redistribute eigrp 100 subnets metric 50 metric-type 1Seed metric 50 and type E1, so each router adds its own cost to reach R5.
router ospf 1
summary-address 10.50.0.0 255.255.0.0On the ASBR: advertise one type 5 LSA for the whole range instead of one per redistributed subnet. (area range is the ABR equivalent for internal routes.)
💡 Redistributing in both directions (OSPF into EIGRP and EIGRP into OSPF) on more than one router can create routing loops. Real networks use route maps and tags to control it; that is CCNP material.
How to verify it
R1#show ip ospf database OSPF Router with ID (1.1.1.1) (Process ID 1) Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 802 0x80000006 0x00A3F1 6 2.2.2.2 2.2.2.2 795 0x80000004 0x0051C2 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum 10.0.23.0 2.2.2.2 790 0x80000001 0x00E21B 10.0.34.0 2.2.2.2 790 0x80000001 0x00D93A 10.2.45.0 2.2.2.2 790 0x80000001 0x0077C5 Summary ASB Link States (Area 1) Link ID ADV Router Age Seq# Checksum 5.5.5.5 2.2.2.2 512 0x80000001 0x00F06D Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 10.50.0.0 5.5.5.5 515 0x80000001 0x00B8D4 0
R1#show ip route ospf | include 10.50 O E2 10.50.0.0/16 [110/20] via 10.1.12.2, 00:08:35, GigabitEthernet0/1
metric-type 1 it would read O E1 10.50.0.0/16 [110/24].show ip ospf border-routersOn R1: lists R2 as an ABR and 5.5.5.5 as an ASBR reachable through 10.1.12.2.
What goes wrong and how to troubleshoot it
- The ASBR has the routes but OSPF doesn't advertise them. No
redistribute, or (on old IOS) nosubnets, so only classful networks went across. - External routes reach some areas but not one. That area is a stub or totally stubby area, which blocks type 5 LSAs by design.
- Traffic uses a far exit. Two ASBRs advertise the same prefix as E2 with different seed metrics, so internal distance is ignored. Use E1, or equal seed metrics.
Common mistakes
- Expecting type 4 LSAs in the ASBR's own area. They are only needed in other areas.
- Thinking E2 routes ignore distance completely; the forward metric still breaks ties.
- Comparing an E1 and an O IA route by metric. The route type decides first.
Key takeaways
- An ASBR redistributes outside routes as type 5 LSAs, flooded unchanged to every normal area.
- ABRs create type 4 LSAs so routers in other areas can reach the ASBR.
- E2 (default, seed 20 for redistributed routes) keeps the seed metric; E1 adds internal cost.
- Preference: O, then O IA, then E1/N1, then E2/N2.
Check yourself
Which router creates the type 4 LSA that R1 uses to find R5?
R5 redistributes with metric-type 1 and seed 20. R1's cost to R5 is 4. What does R1 show?
A router has O IA 10.50.1.0/24 [110/80] and O E1 10.50.1.0/24 [110/30] for the same prefix. Which is installed?