VMware ESXi and vSphere Cluster Management
OSPF LSA Types: Type 1 Through Type 5 Explained
Learn how OSPF Type 1 through Type 5 LSAs are originated, flooded, stored in the LSDB, and used to calculate intra-area, interarea, and external routes.
OSPF link-state advertisements (LSAs) are the records that tell OSPF routers about topology and reachable networks. Routers collect these records in a link-state database (LSDB) and run the Shortest Path First (SPF) calculation to build their routing tables.
This lesson focuses on the principal OSPF LSA types, Types 1 through 5: their originators, contents, flooding scope, and relationship to intra-area, interarea, and external routes.
LSA Fundamentals
An LSA is an OSPF topology or reachability information record. LSAs are carried inside Link-State Update OSPF packets. A router does not normally send an LSA as a standalone packet; OSPF packets transport, request, acknowledge, and synchronize LSAs between neighbors.
Each OSPF area has an LSDB containing the LSAs known for that area. OSPF uses the database as a graph of routers, networks, links, costs, and reachable prefixes. SPF then calculates the shortest paths from the local router to destinations in that graph.
| Concept | Meaning |
|---|---|
| LSA | A topology or reachability record advertised and flooded by OSPF. |
| LSDB | The per-area collection of LSAs used as input to SPF. |
| SPF | The shortest-path calculation that derives OSPF routes from the LSDB. |
| OSPF packet | A protocol message used for neighbor discovery, database synchronization, LSA transport, or acknowledgment. |
Flooding scope describes where an LSA is distributed. Types 1 and 2 describe an individual area and remain area-local. ABRs advertise selected reachability between areas with Types 3 and 4. Type 5 carries external reachability across ordinary OSPF areas, subject to area-type restrictions.
OSPF Router Roles Used by LSAs
- Internal router: A router whose OSPF interfaces all belong to one area. It originates a Type 1 LSA for that area.
- Designated router (DR): The router elected to represent a multiaccess broadcast or NBMA segment. Where a DR exists, it originates the Type 2 Network LSA for that segment.
- Area Border Router (ABR): A router connected to Area 0 and at least one additional OSPF area. It originates Type 3 and Type 4 LSAs to advertise interarea reachability.
- Autonomous System Boundary Router (ASBR): A router that injects routes learned from outside the OSPF domain, such as static, connected, or another routing protocol's routes. It originates Type 5 LSAs for external routes.
These roles are not mutually exclusive. For example, an ABR can also be an ASBR if it redistributes an external route. In each area where it has OSPF interfaces, that router also originates a Type 1 LSA. On a qualifying multiaccess segment, it might additionally be the DR and originate a Type 2 LSA.
OSPF LSA Types 1 Through 5: Quick Reference
| LSA type | Common name | Originating router role | Primary purpose | Flooding scope | Key information represented | Typical route category |
|---|---|---|---|---|---|---|
| 1 | Router LSA | Every OSPF router, once per participating area | Describes the router's links and connectivity | Originating area | Router ID, links, link types, states, metrics, and connected topology | Intra-area |
| 2 | Network LSA | DR | Represents a multiaccess transit network | Originating area | Transit network and attached OSPF routers | Intra-area |
| 3 | Summary or Summary Network LSA | ABR | Advertises networks from one area into another | Other OSPF areas as permitted | Prefix, mask, metric, and advertising ABR | Interarea |
| 4 | ASBR Summary LSA | ABR | Advertises how to reach an ASBR | Other areas as needed | ASBR router ID and path cost to that ASBR | Support for external routes |
| 5 | AS External LSA | ASBR | Advertises a route external to OSPF | Ordinary areas, but not stub or totally stubby areas | External prefix, metric, route type, forwarding address, and ASBR | External |
Type 1 LSA: Router LSA
A Type 1 Router LSA is the basic description of an OSPF router's participation in an area. Every OSPF router originates one Type 1 LSA per area in which it has OSPF interfaces.
The record uses the router's Router ID, a 32-bit identifier, to identify the originating router. It describes links and interfaces in the area, link state, link type, OSPF metric, and connected topology details. SPF combines Type 1 records from multiple routers to determine how routers connect to one another and to attached networks.
Type 1 LSAs remain within their originating area. An ABR does not flood an area's Type 1 LSA unchanged into another area. Instead, the ABR uses the area-local information to create appropriate Type 3 or Type 4 advertisements.
Because Type 1 records form the fundamental router-to-network graph, a missing or unstable Type 1 LSA can cause missing routes, incorrect paths, or repeated SPF calculations.
Type 2 LSA: Network LSA
A Type 2 Network LSA is originated only by the DR on a multiaccess broadcast or NBMA segment where a DR represents the segment. It describes the transit network and lists the OSPF routers attached to that network.
Without a Type 2 LSA, every router on a shared segment could need to describe every adjacency to every other router. The DR provides a shared representation of the segment, reducing the amount of topology information required.
Type 2 LSAs are area-scoped. They are not normally generated for point-to-point links because a point-to-point link has no DR representing a shared network.
Single-Area Example
Imagine three routers in Area 0. Two routers share an Ethernet LAN, and one router connects through a point-to-point link. Each router originates a Type 1 LSA describing its own links. The DR on the Ethernet LAN originates one Type 2 LSA listing the attached OSPF routers. All of these Type 1 and Type 2 records remain inside Area 0.
Type 3 LSA: Summary LSA
A Type 3 Summary LSA, also called a Summary Network LSA, is originated by an ABR. It advertises a network prefix from one area into another area.
A Type 3 record includes the advertised prefix, its mask, an OSPF metric, and the ABR advertising it. It provides interarea reachability; it does not provide a detailed copy of the source area's Type 1 and Type 2 topology records.
For example, if Area 10 contains the network 10.10.20.0/24, its ABR can advertise that prefix into Area 0 with a Type 3 LSA. Routers in Area 0 learn how to reach the prefix through the ABR, but they do not receive Area 10's complete internal router-and-link graph.
An ABR can summarize multiple contiguous prefixes into a shorter prefix. That route summarization changes the Type 3 information advertised between areas. Filtering or summarization can therefore affect whether a remote area sees a specific prefix.
Type 4 LSA: ASBR Summary LSA
A Type 4 ASBR Summary LSA is originated by an ABR to tell routers in another area how to reach an ASBR. Its link-state ID identifies the ASBR by Router ID.
This information is needed because an external route is originated by the ASBR, but routers in other areas may not have a direct path to that router. Before using an external prefix, a remote router needs a path to the ASBR that advertised it.
Type 4 does not describe an external destination. It describes reachability to the router that originates external information. It commonly accompanies Type 5 advertisements when an ASBR and the receiving router are in different areas.
Type 5 LSA: AS External LSA
A Type 5 AS External LSA is originated by an ASBR when it redistributes an external route into OSPF or advertises an external or default route. The record can represent an external prefix, external metric, forwarding address, external route type, and originating ASBR information.
External metrics have two common forms:
- E1: The route comparison includes the external metric and the internal OSPF cost to reach the ASBR. E1 is useful when the internal path to the redistribution point should influence route selection.
- E2: The external metric is the principal comparison value. Internal cost to the ASBR is considered only after the relevant external metrics are otherwise tied. E2 is the traditional default external metric type on many Cisco configurations.
Type 5 LSAs are flooded throughout ordinary OSPF areas, but they are not permitted in stub and totally stubby areas. Those area types generally use a default route toward the ABR instead of carrying individual external LSAs. Type 5 LSAs are also not used inside an NSSA; external information introduced inside an NSSA uses Type 7 LSAs before an ABR may translate it to Type 5 for other areas.
How the LSA Types Work Together
Two Areas and an ABR
Suppose Area 10 contains internal networks behind an ABR, while Area 0 contains backbone routers. Area 10 routers create Type 1 LSAs and, when a qualifying multiaccess segment exists, a DR creates a Type 2 LSA. These records remain in Area 10. The ABR reads that topology and advertises Area 10 prefixes into Area 0 with Type 3 LSAs.
Backbone routers can therefore reach Area 10 networks without receiving Area 10's detailed Type 1 and Type 2 records. The ABR limits topology visibility while still advertising reachable prefixes.
External Route in Another Area
Suppose an ASBR in Area 10 redistributes the static prefix 192.0.2.0/24. The ASBR originates a Type 5 LSA for that prefix. The ABR originates a Type 4 LSA into Area 0 identifying how to reach the ASBR.
A router in Area 0 uses both pieces of information: Type 4 supplies a path to the ASBR, and Type 5 supplies the external destination and its metric. Neither record alone provides the complete dependency chain for reaching the external network.
LSA Scope and Route Categories
| Topology information | Primary LSA types | Where it is used | Route category |
|---|---|---|---|
| Detailed router and link connectivity inside an area | Types 1 and 2 | Within one area | Intra-area |
| Reachable prefixes across an ABR | Type 3 | Between areas | Interarea |
| Path to an ASBR in another area | Type 4 | Between areas | Support for external routing |
| Destinations outside the OSPF domain | Type 5 | Ordinary areas, subject to area restrictions | External |
| Characteristic | Type 3 | Type 4 | Type 5 |
|---|---|---|---|
| Originator | ABR | ABR | ASBR |
| Identifies | An interarea network prefix | An ASBR | An external network prefix |
| Purpose | Reach a network in another area | Reach the router that advertises external routes | Reach a destination outside OSPF |
| Contains a full source-area topology? | No | No | No |
LSA Link-State ID and Header Fields
Every LSA has a header. Common fields include age, options, LSA type, link-state ID, advertising router, sequence number, checksum, and length.
- Age: Indicates how long the LSA has existed since its origination or refresh.
- Options: Indicates capabilities or behaviors relevant to the OSPF exchange.
- LSA type: Determines how the record should be interpreted.
- Link-state ID: Identifies the object described by the LSA. Its meaning changes with the LSA type.
- Advertising router: Identifies the router that originated the record.
- Sequence number: Helps routers recognize newer versions of the same LSA.
- Checksum: Detects corruption in the LSA.
- Length: States the size of the complete LSA.
| LSA type | Link-state ID interpretation | Advertising router | What the entry identifies |
|---|---|---|---|
| 1 | Originating router's Router ID | The same router | One router's links within an area |
| 2 | Interface IP address of the DR on the represented segment | DR | One multiaccess transit network |
| 3 | Advertised network prefix | ABR | A network reachable in another area |
| 4 | ASBR's Router ID | ABR | A path to an ASBR |
| 5 | External network prefix | ASBR | An external destination |
The link-state ID is not always an IP address in the same sense. For example, in a Type 4 LSA it represents the ASBR's Router ID, while in a Type 3 or Type 5 LSA it represents the advertised network prefix.
LSA Visibility by Area Type
| Area type | Types 1 and 2 | Type 3 | Type 4 | Type 5 | External-route handling |
|---|---|---|---|---|---|
| Normal area | Present for local topology | Allowed | Allowed when needed | Allowed | External routes are carried as Type 5 |
| Stub area | Present for local topology | Allowed | Restricted according to stub behavior | Blocked | Typically uses a default route from the ABR |
| Totally stubby area | Present for local topology | Typically restricted to a default route | Blocked or suppressed | Blocked | Typically uses an ABR-provided default route |
| NSSA | Present for local topology | Allowed | Allowed as appropriate | Not used inside the NSSA | Locally introduced external routes use Type 7 |
OSPF defines additional LSA types beyond this central set. Type 7 is especially important for NSSA external routes. Other LSA types may be associated with particular OSPF versions or features.
Inspecting the LSDB on Cisco IOS and IOS XE
These commands display the LSDB by LSA category and help correlate LSAs with routes, interfaces, and neighbors:
show ip ospf database
show ip ospf database router
show ip ospf database network
show ip ospf database summary
show ip ospf database asbr-summary
show ip ospf database external
show ip route ospf
show ip ospf neighbor
show ip ospf interface
show ip protocols
Use show ip ospf database router to inspect Type 1 records, network for Type 2, summary for Type 3, asbr-summary for Type 4, and external for Type 5. Compare the advertising router and link-state ID with the physical topology and Router IDs.
Then use show ip route ospf to check whether the information produced an installed route. A route marked O is normally intra-area, O IA is interarea, and O E1 or O E2 is external. Neighbor and interface commands help determine whether missing LSAs are caused by adjacency or network-type problems.
Minimal Lab Context
router ospf 1
router-id 1.1.1.1
network 10.0.0.0 0.0.0.255 area 0
To produce an external LSA in a controlled lab, a router can redistribute a static route:
ip route 192.0.2.0 255.255.255.0 Null0
router ospf 1
redistribute static subnets
Troubleshooting LSA Problems
No Type 2 Network LSA on an Ethernet Segment
- The interface may not be using a broadcast or NBMA multiaccess OSPF network type.
- No DR may have been elected, or adjacency formation may be incomplete.
- The interface may be configured as point-to-point, where a Type 2 LSA is not expected.
show ip ospf interface
show ip ospf neighbor
show ip ospf database network
A Remote-Area Prefix Is Missing
- The ABR may not be advertising the prefix into the destination area.
- The source network may not be active in OSPF.
- Area membership or backbone connectivity may be incorrect.
- An ABR summary or filtering policy may suppress the Type 3 advertisement.
show ip ospf database summary
show ip route ospf
show ip ospf interface brief
An External Route Is Missing in Another Area
- The receiving area may be stub or totally stubby, which blocks Type 5 LSAs.
- Redistribution may be absent or filtered, or the external route may not be installed on the ASBR.
- The ABR may not be advertising Type 4 reachability to the ASBR.
- The area may be an NSSA, where Type 7 behavior must be checked instead of expecting Type 5 inside the area.
show ip ospf database external
show ip ospf database asbr-summary
show ip route ospf
show ip protocols
Inconsistent LSDBs or Route Flapping
- Neighbor adjacencies may not be fully established.
- Area assignments, timers, network types, MTU settings, or authentication settings may differ.
- Unstable interfaces may repeatedly generate updated Type 1 LSAs.
show ip ospf neighbor
show ip ospf interface
show ip ospf database
show logging
Exam-Relevant Summary
- Type 1 is the Router LSA: every OSPF router originates one per participating area, and it stays in that area.
- Type 2 is the Network LSA: the DR originates it for a qualifying broadcast or NBMA multiaccess segment.
- Type 3 is the Summary Network LSA: an ABR advertises prefixes between areas.
- Type 4 is the ASBR Summary LSA: an ABR advertises how to reach an ASBR.
- Type 5 is the AS External LSA: an ASBR advertises routes learned from outside OSPF.
- Types 1 and 2 support intra-area topology; Type 3 supports interarea reachability; Type 5 represents external destinations.
- For an external route in another area, the remote router generally needs both Type 4 reachability to the ASBR and Type 5 information about the external prefix.
- Type 5 flooding is not universal: stub and totally stubby areas block it, and NSSAs use Type 7 inside the area.
- An LSA type is an information-record category, not an OSPF packet type.
For a related reference, see Types of LSAs: Link-State Advertisements.