Loading learning content...
If OSPF areas are the architecture of a building, Link-State Advertisements (LSAs) are the bricks. Every piece of topology information in OSPF—every router, every network, every external route—is encoded in an LSA and distributed through the OSPF domain. Understanding LSA types is fundamental to understanding what OSPF knows, how it knows it, and how to troubleshoot when things go wrong.
OSPF defines multiple LSA types, each designed for a specific purpose. Some describe routers and their links. Others describe networks or summarized routes. Some flood within a single area; others propagate throughout the entire OSPF domain. This differentiated approach enables OSPF's hierarchical design while maintaining complete routing information where needed.
By the end of this page, you will understand the seven primary OSPF LSA types (Types 1-7), their structures and contents, where each type floods, who originates each type, and how they work together to provide intra-area, inter-area, and external routing. You'll be able to interpret LSA database contents and diagnose routing issues based on LSA presence or absence.
Every LSA, regardless of type, shares a common 20-byte header. This header contains identification and lifecycle information critical for database synchronization and flooding.
LSA Header Fields:
| Field | Size | Description |
|---|---|---|
| LS Age | 16 bits | Seconds since LSA originated; 0-3600 (MaxAge) |
| Options | 8 bits | Capability flags (E, MC, N/P, DC, O, DN) |
| LS Type | 8 bits | LSA type identifier (1-7 for standard types) |
| Link State ID | 32 bits | Identifies what the LSA describes (meaning varies by type) |
| Advertising Router | 32 bits | Router ID of the LSA originator |
| LS Sequence Number | 32 bits | Version number for updates (signed, starts at 0x80000001) |
| LS Checksum | 16 bits | Fletcher checksum of entire LSA except Age field |
| Length | 16 bits | Total length of LSA including header (in bytes) |
Key Header Fields Explained:
Link State ID + Advertising Router = Unique Identity
The combination of LS Type, Link State ID, and Advertising Router uniquely identifies an LSA in the database. When comparing LSAs:
The Options Field:
The Options field contains capability bits that affect OSPF behavior:
When viewing LSDB output, you'll see columns for Type, Link-ID, and Advertising Router (ADV Router). The Type tells you what kind of information to expect. The Link-ID's meaning changes per type—for Type 1 it's the Router ID, for Type 2 it's the DR's interface IP, for Type 3 it's the network prefix. Understanding this varying interpretation is key to reading LSDB output correctly.
The Router LSA (Type 1) is the most fundamental LSA type—every OSPF router generates at least one Router LSA for each area it belongs to. This LSA describes the router itself: its interfaces, their states, and the costs to reach connected networks or neighbors.
Who Originates: Every OSPF router
Flooding Scope: Single area (floods within the originating area only)
Link State ID: The Router ID of the originating router
Describes: All of the router's links (interfaces) within this area
| Link Type | Description | Example |
|---|---|---|
| Type 1: Point-to-Point | Connection to another router on point-to-point network | Serial link, GRE tunnel |
| Type 2: Transit | Connection to transit network (multi-access with other routers) | Ethernet with multiple routers |
| Type 3: Stub | Connection to stub network (no other OSPF routers) | Ethernet with only hosts, loopback |
| Type 4: Virtual Link | Connection through virtual link to backbone | Virtual link endpoint |
Router LSA Content Details:
For each link, the Router LSA includes:
Router Flags:
The Router LSA header includes flags indicating special router roles:
When OSPF runs Dijkstra's algorithm, it starts by processing Type 1 (Router) and Type 2 (Network) LSAs. These LSAs define the vertices (routers and networks) and edges (links) of the topology graph. Without Type 1 LSAs, there would be no graph to compute paths on. Every router "votes" on the topology by advertising its own perspective via Type 1 LSAs.
The Network LSA (Type 2) represents a multi-access network segment (like Ethernet) where multiple OSPF routers connect. It's originated by the Designated Router (DR) on behalf of the segment and lists all routers attached to that network.
Who Originates: Designated Router only
Flooding Scope: Single area
Link State ID: IP address of the DR's interface on this network
Describes: The multi-access network and all attached routers
Why Network LSAs Exist:
On a multi-access segment with n routers, each router could advertise links to all (n-1) other routers—creating O(n²) link descriptions. Instead, OSPF introduces a pseudonode representing the network itself:
This optimization is essential for scaling OSPF on large broadcast networks.
| Field | Description |
|---|---|
| Network Mask | Subnet mask of the multi-access network |
| Attached Router (repeated) | Router IDs of all routers attached to this network, including the DR |
Example Scenario:
Consider an Ethernet segment 10.0.0.0/24 with three routers (R1, R2, R3). R1 is elected DR.
R1's Type 2 Network LSA contains:
Each router's Type 1 LSA contains a Transit link:
The Type 1 Transit links point TO the Type 2 Network LSA, and the Type 2 LSA points BACK to the routers. Together, they describe the multi-access network topology.
When the DR fails, the BDR takes over and originates a new Type 2 Network LSA. The old DR's Type 2 LSA ages out (or is flushed by the new DR with MaxAge). During transition, routing may briefly be affected on that segment. This is one reason BDR exists—to minimize the gap between DR failure and new DR election.
Point-to-Point Networks: No Type 2
On point-to-point networks (serial links, tunnels), there are only two routers and no need for a DR or Network LSA. Each router advertises a Type 1 Point-to-Point link directly to the other router's ID. This is simpler and results in faster convergence.
The Summary LSA (Type 3) is how ABRs advertise reachable networks from one area into other areas. Despite its name, it doesn't necessarily 'summarize' routes (aggregate them)—it simply describes inter-area routes. Summarization is an optional optimization performed when generating Type 3 LSAs.
Who Originates: Area Border Routers only
Flooding Scope: Single area (generated separately for each connected area)
Link State ID: Network address being advertised
Describes: Reachable network and cost to reach it
How Type 3 LSAs Work:
| Field | Description |
|---|---|
| Network Mask | Subnet mask of the destination network |
| Metric | Cost to reach this network from the ABR |
Critical Understanding: Type 3 Hides Topology
Type 3 LSAs contain NO topology information—only a prefix and a cost. Routers receiving Type 3 LSAs don't know:
This information hiding is intentional—it's what enables area scalability. Routers only need to know 'I can reach 10.1.0.0/16 via the ABR at cost 50,' not the detailed internal path.
In stub areas, Type 3 LSAs are allowed (carrying inter-area routes). Only Type 5 (external) LSAs are blocked. In totally stubby areas, even Type 3 LSAs are blocked—except for the default route (0.0.0.0/0) that the ABR injects. This maximizes LSDB reduction for resource-constrained branch routers.
Route Selection with Type 3 LSAs:
When multiple ABRs advertise the same prefix via Type 3 LSAs, routers calculate total path cost:
Total Cost = (Intra-area cost to ABR) + (Type 3 advertised metric)
The ABR with the lowest total cost is selected. This allows intelligent path selection even without detailed inter-area topology knowledge.
The ASBR Summary LSA (Type 4) has a specific, limited purpose: to advertise the location of an ASBR to routers in other areas. It's needed because Type 5 External LSAs flood domain-wide but only contain the ASBR's Router ID—not how to reach it.
Who Originates: Area Border Routers
Flooding Scope: Single area (flooded into areas that don't contain the ASBR)
Link State ID: The Router ID of the ASBR being described
Describes: The cost to reach a specific ASBR
Why Type 4 LSAs Are Needed:
Consider this scenario:
Solution: ABRs connecting to Area 1 generate Type 4 LSAs in Area 0 (and Area 2) saying: 'ASBR 4.4.4.4 is reachable through me at cost X.'
| Field | Description |
|---|---|
| Network Mask | Set to 0.0.0.0 (field exists for format consistency) |
| Metric | Cost to reach the ASBR from this ABR |
Type 4 LSAs are not generated in the area containing the ASBR—in that area, routers can see the ASBR directly via Type 1 LSAs. Type 4 LSAs only appear in areas that need to reach an ASBR in a different area. If your ASBR is in Area 0 (backbone), other areas will have Type 4 LSAs for it. If your ASBR is in Area 1, you'll see Type 4 in Area 0 and any other areas.
The AS External LSA (Type 5) describes routes redistributed into OSPF from external sources—other routing protocols (BGP, EIGRP, RIP), static routes, or connected interfaces not participating in OSPF. These routes originate from ASBRs and flood throughout the entire OSPF domain.
Who Originates: Autonomous System Boundary Routers (ASBRs)
Flooding Scope: Entire OSPF domain (all areas except stub/NSSA)
Link State ID: External network address
Describes: Redistributed external route, metric, and metric type
| Field | Description |
|---|---|
| Network Mask | Subnet mask of external network |
| E bit (Metric Type) | E=1: Type 2 metric (don't add internal cost); E=0: Type 1 metric (add internal cost) |
| Metric | Cost of external route |
| Forwarding Address | Where to forward traffic (0.0.0.0 means forward to ASBR) |
| External Route Tag | 32-bit tag for route policies (often carries BGP AS) |
External Metric Types: E1 vs. E2
OSPF supports two external metric types with critically different behaviors:
E1 (External Type 1):
E2 (External Type 2) — Default:
When multiple ASBRs redistribute the same external route, E1 and E2 behave very differently. With E1, traffic naturally flows to the closest ASBR (internal cost matters). With E2, all ASBRs appear equally preferred until the tie-breaker kicks in. For predictable behavior in complex environments, E1 is often safer. However, E2 is the default, so be explicit when it matters.
The Forwarding Address Field:
Normally, traffic to external routes goes to the ASBR (forwarding address = 0.0.0.0). However, if the ASBR learns the external route on an OSPF-enabled network where the next-hop is also reachable via OSPF, it sets the forwarding address to that next-hop. This allows traffic to bypass the ASBR and go directly to the actual next-hop—an optimization for common network topologies.
The NSSA External LSA (Type 7) solves a specific problem: how can an ASBR within a stub area redistribute external routes? Normal stub areas block Type 5 LSAs and prohibit ASBRs. Not-So-Stubby Areas (NSSA) allow local external route injection using Type 7 LSAs while still blocking Type 5 LSAs from entering the area.
Who Originates: ASBRs within NSSA areas
Flooding Scope: The NSSA only (converted to Type 5 at ABR for other areas)
Link State ID: External network address
Describes: Externally redistributed route within an NSSA
| Characteristic | Type 5 (AS External) | Type 7 (NSSA External) |
|---|---|---|
| Originator | ASBR anywhere (not in stub/NSSA) | ASBR within NSSA only |
| Flooding Scope | Entire OSPF domain | NSSA only |
| LSA Structure | Includes E bit, forwarding address, tag | Same structure as Type 5 |
| At ABR | Flooded as-is | Converted to Type 5 for other areas |
| P bit (Propagate) | N/A | If set, ABR converts to Type 5 |
The Type 7 to Type 5 Conversion:
Type 7 LSAs exist only within their originating NSSA. For other areas to learn about these external routes:
This conversion means external routes from NSSAs appear to originate from the ABR in the rest of the domain—the original ASBR's identity is hidden behind the ABR.
NSSAs don't automatically inject default routes like stub areas. The ABR can be configured to generate a default route (Type 7) into the NSSA using 'area X nssa default-information-originate'. This provides NSSA routers a path to external destinations not specifically redistributed within the NSSA.
We've completed a comprehensive exploration of OSPF's LSA types—the fundamental data structures that encode network topology. Let's consolidate this knowledge into a reference framework:
| Type | Name | Originated By | Flooding Scope | Purpose |
|---|---|---|---|---|
| 1 | Router LSA | Every router | Area-local | Describes router and its links |
| 2 | Network LSA | DR only | Area-local | Describes multi-access network and attached routers |
| 3 | Summary LSA | ABR | Area-local | Advertises inter-area network reachability |
| 4 | ASBR Summary | ABR | Area-local | Advertises how to reach an ASBR in another area |
| 5 | AS External | ASBR | Domain-wide | Describes redistributed external routes |
| 7 | NSSA External | ASBR in NSSA | NSSA only | External routes in NSSA (converted to Type 5 at ABR) |
What's Next:
With LSA types mastered, we'll explore Designated Routers (DR) and Backup Designated Routers (BDR)—the mechanisms OSPF uses to optimize operation on broadcast multi-access networks. You'll understand DR election, the role of DRs in flooding and adjacencies, and how to influence DR selection through priority configuration.
You now understand OSPF's LSA types—the vocabulary with which OSPF describes network topology. This knowledge is essential for reading LSDB output, understanding OSPF behavior, and troubleshooting routing issues. When you see LSA types in show commands, you'll know exactly what information each type conveys and where it came from.