OSPF LSA Types: Type 1 Through Type 5
Learn how OSPF Type 1 through Type 5 LSAs work, who originates them, what they contain, where they flood, and how to verify them on Cisco IOS.
OSPF uses link-state advertisements (LSAs) to exchange topology and reachability information. Routers flood LSAs, store the received information in a link-state database (LSDB), and run the Shortest Path First (SPF) calculation to derive routes.
This lesson focuses on the foundational OSPF LSA types: Type 1 through Type 5. It also briefly introduces Type 7 LSAs, which are used by Not-So-Stubby Areas (NSSAs).
How LSAs support OSPF
What is an LSA?
A link-state advertisement (LSA) is an OSPF information record flooded among routers. Depending on its type, an LSA can describe a router's links, a shared network, an interarea prefix, a path to an ASBR, or an external route.
OSPF routers use LSAs in three major steps:
- Routers originate and flood LSAs through the appropriate part of the OSPF domain.
- Each router stores the LSAs it should know about in its LSDB.
- The router runs SPF against the LSDB and installs selected results in the routing table.
LSA, LSA header, LSDB, and route: do not confuse them
| Term | Meaning |
|---|---|
| LSA | The complete topology or reachability record, including its identifying fields and type-specific contents. |
| LSA header | The common identifying portion of an LSA. It includes fields such as type, link-state ID, advertising router, age, sequence number, and checksum. |
| LSDB | The collection of LSAs that models an area's topology and the OSPF information available to a router. |
| OSPF route | A path calculated from the LSDB and selected for installation in the routing table. An LSA is input data; it is not itself a routing-table entry. |
Flooding scope also does not determine route preference. An LSA may be successfully flooded but still fail to produce an installed route because the router cannot reach the next hop or ASBR, or because another route wins the selection process.
OSPF router roles and area boundaries
- Internal router: A router with all OSPF interfaces in one area. It originates a Type 1 LSA for that area.
- Backbone router: A router with at least one interface in Area 0. A backbone router can also be an internal router or an ABR.
- Area Border Router (ABR): A router connected to two or more OSPF areas, normally including Area 0. It maintains a separate LSDB for each attached area and originates Type 3 and Type 4 LSAs when needed.
- Designated Router (DR): The elected representative for a broadcast or NBMA multiaccess segment. The DR originates the Type 2 Network-LSA for that segment.
- Backup Designated Router (BDR): The standby for the DR. It participates in adjacencies and can take over if the DR fails, but it does not normally originate the segment's Type 2 LSA while it is only the BDR.
- Autonomous System Boundary Router (ASBR): A router that injects routes from another routing source into OSPF. It originates Type 5 LSAs for external routes, or Type 7 LSAs when the ASBR is inside an NSSA.
Intra-area, interarea, and external information
- Intra-area: Information about links and networks inside the same area. Types 1 and 2 provide the core topology model.
- Interarea: Reachability to prefixes in another OSPF area. Type 3 LSAs carry this prefix information, while Type 4 LSAs help locate an ASBR in another area.
- External: Routes learned from outside the OSPF routing domain, such as static routes, connected routes, or another routing protocol redistributed into OSPF. Type 5 LSAs normally carry this information.
OSPF LSA type reference
| LSA type | Common name | Originating router role | Primary purpose | Key information represented | Flooding scope |
|---|---|---|---|---|---|
| Type 1 | Router-LSA | Every OSPF router | Describe the router's links in an area | Router ID, interfaces or links, link types, metrics, neighbor relationships, and interface state | Originating area only |
| Type 2 | Network-LSA | DR | Represent a transit multiaccess network | Network identifier and attached OSPF routers | Originating area only |
| Type 3 | Summary-LSA | ABR | Advertise prefixes between areas | Prefix, mask, metric, and advertising ABR | Advertised into connected areas |
| Type 4 | ASBR-Summary-LSA | ABR | Advertise reachability to an ASBR in another area | ASBR router ID and cost to reach it | Other areas that need ASBR reachability |
| Type 5 | AS-External-LSA | ASBR | Advertise external routes | External prefix, mask, metric, forwarding address, tag, and E1/E2 type | Normal OSPF areas throughout the domain; blocked by stub designs |
| Type 7 | NSSA External LSA | ASBR inside an NSSA | Carry external routes inside an NSSA | External route information in NSSA format | NSSA only until an ABR translates it to Type 5 |
Type 1 LSA: Router-LSA
Every OSPF router originates one Type 1 Router-LSA for each area to which it belongs. A router attached to Area 0 and Area 1 therefore creates a distinct Type 1 LSA in Area 0 and another distinct Type 1 LSA in Area 1.
A Router-LSA describes the router's local view of topology. Its contents can include:
- The advertising router's router ID (RID).
- Links or interfaces participating in the area.
- Link type, such as a point-to-point connection, transit network, or stub network.
- OSPF cost or metric for each link.
- Neighboring router relationships.
- Interface and link-state information used to model connectivity.
Type 1 LSAs are flooded only inside their originating area. An ABR does not forward an Area 1 Router-LSA into Area 0. Instead, the ABR uses the area information to originate appropriate Type 3 LSAs for reachable prefixes.
Example: single-area OSPF
Suppose routers R1, R2, and R3 all belong to Area 0 and use point-to-point links. Each router originates a Type 1 LSA. The LSDB contains the area's topology, and SPF can calculate paths between the routers. If all routes are internal to this one area, Type 3, Type 4, and Type 5 LSAs are not required.
Type 2 LSA: Network-LSA
A Type 2 Network-LSA represents a transit multiaccess network, such as a broadcast Ethernet segment or an applicable NBMA segment. The DR originates one Type 2 LSA for that segment and lists the OSPF routers attached to it.
Without a Type 2 LSA, a shared segment with many routers could require every router to describe every other router relationship individually. The Network-LSA provides a common representation of the transit network.
- Type 2 LSAs identify the shared network and the attached routers.
- They are flooded only within the area containing the network.
- They are not normally generated for point-to-point links.
- All routers on the segment still originate their own Type 1 LSAs.
On a broadcast Ethernet segment with three OSPF routers, all three routers originate Type 1 LSAs, while the elected DR originates one Type 2 LSA. A segment with only one OSPF router may not need a transit-network representation.
Type 3 LSA: Summary-LSA
An ABR originates Type 3 Summary-LSAs to advertise network prefixes from one area into another. The name “summary” can be misleading: a Type 3 LSA is not necessarily a summarized prefix. It can describe an individual interarea prefix or an aggregated range.
A Type 3 LSA provides prefix reachability, not the source area's complete internal topology. It normally includes:
- The advertised network prefix and mask.
- An OSPF metric for reaching the prefix.
- The advertising ABR context.
For example, if Area 1 contains 10.1.0.0/16 and connects to Area 0 through an ABR, the ABR can advertise that prefix into Area 0 with a Type 3 LSA. Routers in Area 0 learn how to reach the prefix without receiving every Area 1 Router-LSA.
Interarea summarization
An ABR can summarize several more-specific prefixes into a larger range. For example, 10.1.0.0/24 through 10.1.3.0/24 could be advertised as 10.1.0.0/22. This reduces the number of Type 3 LSAs and limits the amount of routing information that changes when an individual subnet changes. Summarization can also hide a more-specific prefix when that prefix is not represented by the summary or when the summary is configured incorrectly.
Type 3 LSAs are advertised across area boundaries as needed, including toward the backbone. They do not carry the detailed link relationships from the source area.
Type 4 LSA: ASBR-Summary-LSA
A Type 4 ASBR-Summary-LSA is originated by an ABR to advertise reachability to an ASBR located in another area. The link-state ID identifies the ASBR's router ID.
This information is needed because a Type 5 LSA identifies an external route, but the router still needs a path to the ASBR that originated that external route. A Type 4 LSA supplies the interarea reachability information required to find that ASBR.
Type 4 LSAs are not needed in the ASBR's own area because routers there can learn the ASBR's connectivity from its Type 1 LSA. A Type 4 LSA also does not describe the external prefix itself. There is no “Type 1 external route”; Type 1 is the intra-area Router-LSA, while the external prefix is carried by Type 5 or Type 7.
Example: ASBR in a non-backbone area
Assume an ASBR in Area 1 redistributes a route learned from another routing source. The ASBR originates a Type 5 LSA for the external prefix. The ABR connecting Area 1 to Area 0 originates a Type 4 LSA that identifies how routers in Area 0 can reach the ASBR. A router in Area 0 uses both the Type 4 information and the Type 5 external information when evaluating the route.
Type 5 LSA: AS-External-LSA
An ASBR originates a Type 5 AS-External-LSA when it redistributes a route from another source into OSPF. Common sources include static routes, connected routes, and another routing protocol. An ASBR can also originate a Type 5 LSA for an external default route.
Type 5 information can include:
- The external destination prefix and mask.
- The external metric.
- The external metric type, E1 or E2.
- A forwarding address, which may allow traffic to use a next hop other than the advertising ASBR.
- A route tag used to mark or control redistributed routes. The tag is not normally used in SPF cost calculation.
E1 and E2 external metrics
| Metric type | How it is compared | Practical meaning |
|---|---|---|
| E1 | External cost plus the internal OSPF cost to reach the ASBR | Internal distance to the ASBR affects the total route metric. |
| E2 | The external metric is the primary comparison; internal cost is considered only as a tie-breaker in common OSPF behavior | The redistributed route's external cost dominates. |
Type 5 LSAs normally flood throughout the OSPF domain. However, stub-area designs block external Type 5 LSAs. Routers inside such an area commonly use a default route injected by the ABR instead of carrying every external prefix.
Flooding scope comparison
| LSA types | Typical scope | What the scope means |
|---|---|---|
| Types 1 and 2 | Area-local | They describe topology inside one area and are not forwarded across ABRs. |
| Types 3 and 4 | Interarea | ABRs create information that allows routers in other areas to reach prefixes or an ASBR. |
| Type 5 | Normal OSPF domain-wide external flooding | External information can cross normal areas but is blocked by stub and totally stubby area designs. |
| Type 7 | NSSA-local external flooding | External information remains in the NSSA until an ABR translates eligible LSAs to Type 5. |
LSA types and OSPF area designs
| Area type | Type 1 | Type 2 | Type 3 | Type 4 | Type 5 | Type 7 | External route behavior |
|---|---|---|---|---|---|---|---|
| Normal area | Yes | When a DR represents a multiaccess segment | Interarea prefixes | When an ASBR is in another area | Allowed | Not normally used | External routes can be learned directly. |
| Stub area | Yes | When applicable | Interarea prefixes and commonly a default route | External ASBR reachability is not normally needed inside the stub | Blocked | Blocked | The ABR commonly supplies a default route instead of Type 5 LSAs. |
| Totally stubby area | Yes | When applicable | Generally a default route only from the ABR | Blocked or unnecessary for external reachability | Blocked | Blocked | Most interarea and external details are replaced by a default route. |
| NSSA | Yes | When applicable | Interarea prefixes | For ASBRs outside the NSSA when needed | Not flooded into the NSSA | Allowed | An internal NSSA ASBR uses Type 7 for redistributed routes. |
| Totally NSSA | Yes | When applicable | Generally a default route only from the ABR | Restricted as with the area design | Not flooded into the NSSA | Allowed for local external redistribution | Local external routes use Type 7; most other interarea details are reduced. |
Type 7 LSAs and NSSAs
An NSSA permits external redistribution inside an area that otherwise restricts Type 5 LSAs. An ASBR inside the NSSA originates a Type 7 NSSA External LSA for the redistributed route.
When the route needs to be advertised beyond the NSSA, an ABR translates an eligible Type 7 LSA into a Type 5 LSA. The rest of the OSPF domain can then learn the route as a normal external route.
If the Type 7 LSA exists inside the NSSA but no corresponding Type 5 LSA appears outside it, check NSSA configuration, translation behavior, and reachability to any forwarding address.
OSPF also defines opaque LSAs and later extensions. Those are important for features such as traffic engineering and other extensions, but the foundational Type 1 through Type 5 types are the essential starting point for CCNA-level LSDB analysis.
Reading LSA database information
Common LSA database output contains fields that identify freshness, origin, and scope:
| Field | What it tells you |
|---|---|
| LSA type | Which kind of topology or reachability record you are viewing. |
| Link-state ID | The type-dependent identifier. For Type 4, it identifies the ASBR router ID; for other types, its meaning depends on the LSA. |
| Advertising router | The router ID of the device that originated the LSA. |
| Age | How long the LSA has existed since its origination or refresh, subject to OSPF aging rules. |
| Sequence number | Version information used to determine which copy is newer. |
| Checksum | Integrity value used to detect corruption in the LSA contents. |
| Metric-related contents | Costs, external metrics, forwarding addresses, masks, and other values used to calculate reachability. |
Cisco IOS verification commands
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 ospf neighbor
show ip route ospf
show ip ospf
show ip ospf databasedisplays the complete OSPF LSDB view.router,network,summary,asbr-summary, andexternalfilter the output by LSA type.show ip ospf neighborverifies adjacency state and identifies DR and BDR roles.show ip route ospfshows OSPF routes that were actually installed, which may be a smaller set than the LSDB suggests.show ip ospfhelps verify process information, area membership, interfaces, and redistribution.
Expected LSAs in common topologies
| Topology scenario | Expected LSA types | Originators | Reason |
|---|---|---|---|
| Single-area point-to-point | Type 1 | Every router | Each router describes its links; point-to-point links normally do not require Type 2. |
| Single-area broadcast network | Types 1 and 2 | Every router and the DR | Router-LSAs describe router links, and the DR represents the shared transit network. |
| Multi-area internal routing | Types 1, 2, and 3; Type 4 if an external ASBR is in another area | Area routers, DRs, and ABRs | Area-local topology stays local while ABRs advertise interarea prefixes. |
| External redistribution in a normal area | Types 1, 2 as applicable, 3 and 4 as needed, plus Type 5 | Routers, DR, ABRs, and ASBR | The ASBR injects an external prefix and other areas need paths to the ASBR. |
| External redistribution in an NSSA | Types 1, 2, 3, and 7; Type 5 beyond the translating ABR | Routers, DR, ABRs, and NSSA ASBR | The route uses Type 7 inside the NSSA and may become Type 5 outside it. |
Practical topology walkthroughs
Broadcast segment with a DR
On an Ethernet segment containing R1, R2, and R3, each router originates a Type 1 LSA. After DR election, the DR originates a Type 2 LSA listing the routers attached to the segment. If the interface is configured as point-to-point instead of broadcast, a Type 2 LSA is not normally expected.
Area 1 connected to Area 0
An ABR has one interface in Area 1 and another in Area 0. It keeps separate LSDB information for each area. Area 1 routers retain Type 1 and applicable Type 2 LSAs for Area 1, while the ABR originates Type 3 LSAs into Area 0 for Area 1 prefixes. Area 0 routers learn reachability to those prefixes, not Area 1's complete internal topology.
External redistribution by an ASBR
An ASBR in a non-backbone area redistributes an external prefix. The ASBR originates a Type 5 LSA. The ABR originates a Type 4 LSA into other areas so those routers can reach the ASBR. If a router sees the Type 5 LSA but cannot install the route, verify that the ASBR itself is reachable and that route selection does not favor another path.
Normal area versus stub area
A normal area can receive Type 5 LSAs. A stub area blocks Type 5 LSAs and commonly receives a default route through an ABR using a Type 3 advertisement. Therefore, an external prefix can be absent from the stub area's LSDB while traffic still reaches that destination through the default route.
Troubleshooting LSA problems
No Type 2 LSA on a broadcast segment
- Check whether a DR has been elected with
show ip ospf neighbor. - Verify that neighbor adjacencies have progressed far enough to exchange database information.
- Check the interface network type. A point-to-point network normally does not generate a Type 2 LSA.
- Consider whether the segment has only one OSPF router.
- Inspect
show ip ospf database network.
An interarea prefix is missing
- Inspect Type 3 LSAs on both sides of the ABR.
- Verify that the ABR has the expected area membership and neighbor adjacencies.
- Check whether an area range, filtering policy, or summarization configuration suppresses the prefix.
- Confirm that the area is properly connected to Area 0 according to the OSPF design.
A Type 5 LSA exists but no external route is installed
- Identify the advertising router or ASBR in the Type 5 output.
- Verify reachability to the ASBR. If it is in another area, inspect the corresponding Type 4 LSA.
- Check whether the forwarding address is reachable.
- Compare the route with other candidates and check administrative distance and route selection.
External routes are missing in a stub area
This can be expected: stub and totally stubby designs block Type 5 LSAs. Check that every router in the area has matching area-type configuration, and verify that the ABR injects the expected default route.
An NSSA route does not appear outside the NSSA
- Confirm that the NSSA ASBR originated a Type 7 LSA.
- Check whether the ABR translated the eligible Type 7 LSA into a Type 5 LSA.
- Verify forwarding-address reachability and NSSA configuration consistency.
- Compare
show ip ospf databaseinside the NSSA with Type 5 output beyond the ABR.
Exam-focused summary
- Type 1: Every router, one per area, describes links and stays inside the area.
- Type 2: The DR describes a broadcast or NBMA transit network and stays inside the area.
- Type 3: An ABR advertises prefixes between areas; summarization changes the prefixes represented by these LSAs.
- Type 4: An ABR advertises how to reach an ASBR in another area; the link-state ID is the ASBR router ID.
- Type 5: An ASBR advertises external routes throughout normal OSPF areas; E1 includes internal ASBR cost, while E2 primarily uses the external metric.
- Type 7: An NSSA ASBR advertises external routes inside an NSSA; an ABR can translate them to Type 5 outside the NSSA.
- LSDB versus routing table: The LSDB stores OSPF information, SPF calculates paths, and only selected paths become routing-table entries.
For related study, review Link State Advertisement (LSA) and OSPF Route Summarization.