Sub topic 12
Reading LSA Types 1, 2, 3, 4, and 5
This chapter assumes you know what the link-state database (LSDB) is, how LSAs are flooded, and how areas and router roles (internal, ABR, ASBR) divide an OSPF network. Here you learn what each common LSA type contains, who creates it, and how far it travels.
The Working Model
A link-state advertisement (LSA) is one record in the LSDB. Every LSA is identified by three fields: type, link-state ID, and advertising router. Within an area, all routers hold the same set of LSAs. That is what lets each router run SPF on the same map.
The five common types differ in three ways: who originates them, what they describe, and where they are flooded.
| Type | Name | Originated by | Flooded in |
|---|---|---|---|
| 1 | Router LSA | Every router | Its own area only |
| 2 | Network LSA | The DR of a multi-access segment | Its own area only |
| 3 | Summary LSA | ABR | Into adjacent areas |
| 4 | ASBR Summary LSA | ABR | Into adjacent areas |
| 5 | AS External LSA | ASBR | Whole OSPF domain (except stub-type areas) |
Types 1 and 2: Inside an Area
A Type 1 LSA describes the originating router and its links in that area: link type, cost, and neighbor or subnet. The link-state ID is the router ID. The router also sets flag bits in it to show it is an ABR or ASBR.
A Type 2 LSA exists only on broadcast and non-broadcast multi-access segments. The DR creates it. It lists every router attached to the segment, including the DR. This is how SPF models a shared segment as one pseudonode. Its link-state ID is the DR's interface IP address. Point-to-point links produce no Type 2 LSA.
Types 3 and 4: Between Areas
An ABR does not pass topology across an area boundary. It passes reachability. For each intra-area prefix, it originates a Type 3 LSA into other areas carrying the prefix, mask, and the ABR's cost to reach it. Routers in the other area do not see the original topology. They see only "reach this prefix through that ABR at this cost." Type 3 behaves like distance-vector information, which is why traffic between areas must cross area 0.
A Type 4 LSA solves a different problem. Routers in other areas receive Type 5 LSAs, but they may have no idea how to reach the ASBR that created them. The ABR originates a Type 4 LSA that advertises the ASBR's router ID and the cost to reach it.
Type 5: External Routes
An ASBR originates a Type 5 LSA for each prefix it redistributes into OSPF from another source. It carries the prefix, mask, metric, metric type (E1 or E2), and a forwarding address. The advertising router stays the ASBR throughout the domain. ABRs do not rewrite it. This is why a router needs a Type 1 LSA, or a Type 4 LSA, for the ASBR before it can use the route.
Common Mistakes
- Expecting Type 1 or 2 LSAs from another area in your LSDB. You will see only Type 3 for those prefixes.
- Looking for a Type 4 when the ASBR is in your own area. Type 4 is needed only across an area boundary.
- Assuming a missing Type 5 means the ASBR is not redistributing. It may be in a stub area, which blocks Type 5.
Exercise
R5 is in area 2. An ASBR in area 1 redistributes 172.16.0.0/16. Which LSA types must R5 hold to install this route, and who originated each?
Show answer
R5 needs the Type 5 LSA for 172.16.0.0/16, originated by the ASBR, and a Type 4 LSA for the ASBR, originated by the ABR between area 2 and the rest of the domain. Without the Type 4, R5 cannot compute a path to the advertising router and does not install the route.