OSPF Type-5 LSAs: The Missing Link Between Intra-Area and Inter-Area Reachability
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.
Once you understand this separation, the entire mechanism becomes straightforward.
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.
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:
- Type-1/2 LSAs when the ASBR is in the router's own area
- Type-4 LSAs when the ASBR is in a remote area
This is where intra-area and inter-area concepts enter the picture.
Scenario 1: ASBR in the Same Area
Area 0
R1 -------- ASBR
|
10.10.10.0/24
The ASBR redistributes a route and originates a Type-5 LSA:
router ospf 1 redistribute static
R1 receives two kinds of information:
- Type-1 (Router) LSAs: R1 learns the ASBR's position through its normal SPF calculation. The ASBR sets the E-bit in its own Router LSA, which marks it as an ASBR.
- Type-5 LSA: the ASBR advertises 10.10.10.0/24 as an external route.
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.
Scenario 2: ASBR in Another Area
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."
Type-4 → reach the ASBR (via the ABR)
Type-5 → reach the external prefix
Combining the two, R1 can install the external route.
The Critical Relationship
Many engineers memorize LSA types individually. A better way is to see the dependency:
- Type-5 needs an ASBR.
- Type-4 tells you where the ASBR is.
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.
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 |
E1 vs E2, and Why the Path Matters
OSPF external routes come in two flavors.
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.
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.
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.
router ospf 1 redistribute static metric 20 metric-type 1
What Happens Internally
When a router processes a Type-5 LSA:
- Find the originating ASBR (the LSA's Advertising Router field).
- 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.
- Apply the external information from the Type-5: prefix, metric, and E1 or E2.
- Install the route. If the ASBR is unreachable, the Type-5 stays in the database but no route is installed.
Where Area Types Change the Picture
As covered in Chapter 01, area types filter these LSAs:
- Stub and totally stubby areas block Type-4 and Type-5 LSAs entirely. Routers inside reach external destinations through a default route from the ABR.
- NSSA lets an ASBR inside the area redistribute routes as Type-7 LSAs. The ABR translates them into Type-5 LSAs for the rest of the domain, and from then on the translating ABR acts as the ASBR for those routes.
The Golden Rule
| 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."