Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

OSPF LSA Types Reference

Direct answer

OSPF describes the network in link-state advertisements (LSAs). Types 1 and 2 describe an area's topology, type 3 carries networks from other areas, type 4 locates an ASBR, type 5 carries redistributed routes, and type 7 is the NSSA form of type 5.

When to use this

Use it when a route is missing although neighbours are Full: the route's code — O, O IA, O E1/E2, O N1/N2 — tells which LSA type it comes from and therefore which router to examine.

First 30 seconds

1. Decide which code the route should have: O, O IA or O E.

2. show ip ospf database — is the matching LSA present, and from which advertising router?

3. Missing → go to that router: originator, ABR or ASBR.

4. Present but not installed → another route source, or an unreachable ASBR or forwarding address.

Operational verification

network originated (type 1/2) → ABR advertises it to other areas (type 3) → for external routes: ASBR originates type 5, ABR adds type 4 → LSA present in the local database → SPF → route installed with the matching code

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard
Key commandshow ip ospf database
Scope / prerequisiteUse it when a route is missing although neighbours are Full: the route's code — O, O IA, O E1/E2, O N1/N2 — tells which…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational verification Verify boundary
show ip ospf database
show ip ospf database summary 10.20.0.0
show ip ospf database external 203.0.113.0
show ip route ospf

The database summary is grouped by type and area: "Router Link States", "Net Link States", "Summary Net Link States", "Summary ASB Link States", "Type-5 AS External Link States" and "Type-7 AS External Link States". The detailed commands show one LSA with its advertising router and metric. The routing table shows the routes that resulted, with their codes.

Known-good: the LSA for the network exists, from the expected advertising router, and the route is installed with the matching code.

Step 2 Typical faults & boundaries Narrow the fault
  • An O route is missing. The originating router does not have the interface in OSPF, or is not fully adjacent.
  • An O IA route is missing. The ABR does not create the type 3 LSA: no backbone connection, a filter, or a range.
  • An external route is missing in one area. It is a stub area — or the type 4 LSA to the ASBR is missing.
  • The LSA is in the database but the route is not in the routing table. Another source with lower administrative distance has the prefix, or the forwarding address is unreachable.
  • Applying OSPFv2 type numbers to OSPFv3. OSPFv3 has additional types and carries prefixes separately.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

O routes come from the originating router's own LSA; O IA from the ABR; O E from the ASBR, and need the ASBR to be reachable. Stub areas do not accept type 5. An LSA in the database does not guarantee a route in the routing table.

Key checks
  • show ip ospf database — all LSAs by area and type.
  • show ip ospf database summary <network> — the type 3 LSA and its ABR.
  • show ip ospf database external <network> — the type 5 LSA, metric type and forwarding address.
  • show ip route ospf — the resulting routes and their codes.
ReferenceWhat it is1 section · depth on demand

Mechanics & mental model

OSPF routers describe the network to each other in link-state advertisements (LSAs). There are several types, each carrying one kind of information and each flooded over a defined scope — a segment's routers, one area, or the whole OSPF domain.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

The code in front of an OSPF route — O, O IA, O E2, O N2 — tells which LSA type it came from, and so which router to look at when the route is missing: the neighbour, the ABR or the ASBR.

ReferenceHow it works1 section · depth on demand

How it works

TypeNameCreated byDescribesFloodedRoute code
1RouterEvery routerThe router's own links and their costsWithin the areaO
2NetworkThe DR of a segmentThe routers attached to a multi-access segmentWithin the areaO
3SummaryABRA network in another areaInto one areaO IA
4ASBR SummaryABRThe location of an ASBR in another areaInto one area—
5ExternalASBRA network redistributed into OSPFAll normal areasO E1, O E2
7NSSA ExternalASBR inside an NSSAA redistributed network, within the NSSAWithin the NSSAO N1, O N2

Types 1 and 2 are the map of an area. Every router in the area holds the same set, and runs SPF on it to find the shortest paths.

Type 3 is how one area learns about another. The ABR does not pass the map on; it advertises each network with its own cost to it. Beyond its own area, OSPF therefore behaves like a distance-vector protocol.

Type 5 is created where routes enter OSPF from elsewhere and is flooded unchanged. For routers in other areas to use it they must know how to reach the ASBR, which is what type 4 provides.

Stub areas do not accept type 5. An NSSA does not either, but lets its own ASBR originate type 7, which the ABR converts to type 5 for the rest of the network.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

LSA types 1–5 and how each is identified

RFC 2328 states that LS type, Link State ID and Advertising Router together identify an LSA uniquely. What the Link State ID means depends on the type:

TypeNameOriginated byLink State IDFlooding scope
1Router-LSAEvery routerOriginating router's router IDArea
2Network-LSADR of a transit networkDR's interface IP addressArea
3Summary-LSA (network)ABRDestination networkArea
4Summary-LSA (ASBR)ABRRouter ID of the ASBRArea
5AS-external-LSAASBRDestination network (0.0.0.0 for the default route)Whole AS, except stub areas

Type 7 (NSSA external) is defined outside RFC 2328 and is translated to type 5 at the NSSA's ABR.

C9300# show ip ospf database
            OSPF Router with ID (10.0.0.11) (Process ID 1)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
10.0.0.11       10.0.0.11       812         0x80000214 0x00A1C2 4
10.0.0.12       10.0.0.12       640         0x8000019E 0x0071E0 4
                Summary Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
10.10.0.0       10.0.0.11       1201        0x80000033 0x0028F4
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         10.0.0.21       331         0x80000052 0x00B3A1 1
C9300# show ip ospf database router 10.0.0.12
C9300# show ip ospf database external 0.0.0.0

Using the types in troubleshooting

QuestionLSA to inspect
Which links and neighbours does router X report?Type 1 from X
Which routers are on a broadcast segment?Type 2 from the DR
Where does an inter-area route come from?Type 3, advertising ABR
How do other areas reach an ASBR?Type 4
Which ASBR injects an external route, with which metric type?Type 5 (or 7 in an NSSA)

Types 1–4 stay within one area; type 5 floods everywhere except stub areas. An unexpected route in an area can therefore be traced to an ABR (type 3) or an ASBR (type 5).

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 2328

Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → OSPF LSA Types Reference. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc2328.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
lsa type 1lsa type 2lsa type 3lsa type 5lsa type 7ospf database
Embedded quick reference

Operational notes

Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.

OSPFv2 LSA Quick Reference

Common LSA type lookup.

Type 1 Router → every router, area scope

Type 2 Network → DR, area scope

Type 3 Summary → ABR, inter-area prefixes

Type 4 ASBR Summary → ABR, reach ASBR

Type 5 External → ASBR, external route

Type 7 NSSA External → ASBR in NSSA; may translate to Type 5

Confirmation

Confirm action

Continue?