Mastering OSPF.
Chapter 04 · Link-State Routing · CCIE
Macro photograph of an integrated circuit die

OSPF Type-5 LSAs: The Missing Link Between Intra-Area and Inter-Area Reachability

CCIE OSPF Type-5 LSA Type-4 LSA ASBR E1 / E2

One of the most misunderstood topics in OSPF is how routers actually reach a destination described by a Type-5 LSA. Many engineers learn that Type-5 LSAs represent external routes, then get confused about whether that route is reached through an intra-area or an inter-area path.

The key realization: a Type-5 LSA does not tell a router how to reach the destination. It only tells the router that the destination exists. The router must first work out how to reach the ASBR (Autonomous System Boundary Router) that originated it.

Once you understand this separation, the entire mechanism becomes straightforward.

01

The Two Questions Every Router Must Answer

When a router receives a Type-5 LSA, it must answer two independent questions.

Question 1: Where is the external network? This is answered by the Type-5 LSA itself.

Type-5 LSA contents (simplified)
Network: 10.10.10.0/24
Metric:  20
Type:    E2

The router now knows that 10.10.10.0/24 exists outside the OSPF domain. But it still doesn't know where to send packets.

Question 2: How do I reach the ASBR that advertised it? This is answered by a different set of LSAs:

This is where intra-area and inter-area concepts enter the picture.

02

Scenario 1: ASBR in the Same Area

Topology
          Area 0

     R1 -------- ASBR
                    |
              10.10.10.0/24

The ASBR redistributes a route and originates a Type-5 LSA:

ASBR
router ospf 1
 redistribute static

R1 receives two kinds of information:

Type-1/2 → find the ASBR

Type-5 → find the external network

R1 knows where the ASBR is and knows the external route exists, so it can install the route. This is an external destination reached over an intra-area path to the ASBR.

03

Scenario 2: ASBR in Another Area

Topology
Area 0                     Area 1

R1 -------- ABR -------- ASBR
                           |
                     10.10.10.0/24

Now the ASBR is no longer inside R1's area. Can R1 see Area 1's Type-1 LSAs? No. Each area has its own link-state database, and Type-1 and Type-2 LSAs never leave their area. R1 has no way to learn directly that the ASBR exists.

The Type-5 LSA, on the other hand, is flooded across the whole OSPF domain (except stub and NSSA areas). So R1 knows 10.10.10.0/24 exists, but has no path to the router that originated it.

The solution: the Type-4 LSA

The ABR generates a Type-4 Summary ASBR LSA, which tells the other areas: "The ASBR is reachable through me, at this cost."

CCIE Tip: A Type-4 LSA does not advertise networks. It advertises a single router: the ASBR, identified by its router ID. Each ABR regenerates it at every area boundary it crosses.

Type-4 → reach the ASBR (via the ABR)

Type-5 → reach the external prefix

Combining the two, R1 can install the external route.

04

The Critical Relationship

Many engineers memorize LSA types individually. A better way is to see the dependency:

Therefore: Type-4 LSAs exist to support Type-5 LSAs across areas. Without them, routers in other areas would know an external network exists but could not reach the ASBR that originated it.

What about the path to the ABR?

A common follow-up question is whether Type-3 LSAs are involved. They are not, at least not for reaching routers. Type-3 LSAs carry networks, not routers. R1 reaches the ABR the same way it reaches any router in its own area: through the Type-1/2 LSAs and SPF. The complete chain looks like this:

Type-1/2 → reach the ABR (it sits in R1's own area)

Type-4 → reach the ASBR behind the ABR

Type-5 → reach the external network behind the ASBR

The total cost to the ASBR is R1's intra-area cost to the ABR plus the cost the ABR advertises in the Type-4 LSA.

05

The Simplest Way to Remember It

ASBR location Path to ASBR Destination Result
Same area Type-1/2 Type-5 External route reached over the intra-area topology
Remote area Type-1/2 to the ABR, then Type-4 to the ASBR Type-5 External route reached over the inter-area topology
06

E1 vs E2, and Why the Path Matters

OSPF external routes come in two flavors.

O E2 (default)
EXT ONLY

The route's metric is the external metric the ASBR advertised. The internal cost to the ASBR (the forward metric) is used only to break ties.

O E1
INT + EXT

The route's metric is the cost to the ASBR plus the external metric. Here the intra-area or inter-area path directly changes the result.

Example: two ASBRs both advertise 10.10.10.0/24 with metric 20. The cost to ASBR-A is 10; the cost to ASBR-B is 50.

E1 path selection
Via ASBR-A = 10 + 20 = 30   <-- wins
Via ASBR-B = 50 + 20 = 70

With E2, both paths would show metric 20, and the router would break the tie on the forward metric, so ASBR-A still wins, but for a different reason.

Order of preference: for the same prefix, OSPF always prefers E1 over E2, whatever the metrics. Path type is compared before cost: intra-area > inter-area > E1 > E2.
Set the metric type at the ASBR
router ospf 1
 redistribute static metric 20 metric-type 1
07

What Happens Internally

When a router processes a Type-5 LSA:

  1. Find the originating ASBR (the LSA's Advertising Router field).
  2. Determine reachability to that ASBR: if it is in the local area, use the Type-1/2 SPF result; if it is remote, use the Type-4 information.
  3. Apply the external information from the Type-5: prefix, metric, and E1 or E2.
  4. Install the route. If the ASBR is unreachable, the Type-5 stays in the database but no route is installed.
CCIE Tip: the forwarding address. If the Type-5 LSA carries a non-zero forwarding address, the router resolves the path to that address instead of to the ASBR, and the address must be reachable as an intra-area or inter-area OSPF route. This lets traffic bypass the ASBR when the real next hop sits on a shared segment. With a forwarding address of 0.0.0.0, the router uses the path to the ASBR as described above.
08

Where Area Types Change the Picture

As covered in Chapter 01, area types filter these LSAs:

09

The Golden Rule

A Type-5 LSA describes the destination, not the path. The path always comes from somewhere else.
Scenario Path Destination
Same area Type-1/2 Type-5
Different area Type-1/2 to ABR → Type-4 to ASBR Type-5

That single distinction explains why an external route can be reached over either an intra-area or an inter-area path, while still being, fundamentally, a Type-5 external route.

  • "Type-5 says what exists; Type-1/2 or Type-4 says how to get to whoever said it."
  • "Type-4 LSAs exist so Type-5 LSAs work across area boundaries."
  • "E2 ignores the internal path except as a tie-breaker; E1 adds it to the metric."

← Back to Overview