If you've ever wondered how OSPF routers really know the full topology of an area — not just the next hop — the answer lies in Link-State Advertisements (LSAs). Understanding LSA types is critical for the 200-301 exam (objective 3.4) and for real-world OSPF troubleshooting, because each type carries specific routing information and misinterpreting them leads to network outages. This chapter breaks down all common OSPF LSA types, from Type 1 to Type 5, with exact packet contents, generation rules, and Cisco IOS verification commands.
Jump to a section
Imagine a city planning office that maintains a map of all roads and buildings. Each neighborhood has a local planner (a router) who knows every street and house in their area. The local planner creates a detailed map of just their neighborhood — that's a Type 1 LSA (Router LSA). If a neighborhood has a special transit hub (like a train station connecting to another city), the local planner advertises that hub's location — that's a Type 2 LSA (Network LSA). Now, the city also has a central planning department (Area 0) that collects maps from all neighborhoods. The central planner doesn't redraw every detail; instead, they create a summary map showing only the major roads leading into each neighborhood — that's a Type 3 LSA (Summary LSA). For routes that come from outside the city (like a highway from another state), the central planner posts a notice at city hall — that's a Type 5 LSA (External LSA). And if the city wants to pretend an external route is actually a local road (maybe for simpler routing), they create a fake neighborhood map — that's a Type 4 LSA (ASBR Summary LSA). Each LSA type has a specific format, lifetime, and flooding scope, just like different city documents have different circulation rules. Misplacing a Type 5 as a Type 3 would be like posting a state highway notice in a neighborhood newsletter — it causes confusion.
OSPF (Open Shortest Path First) is a link-state routing protocol. Instead of exchanging routing tables, OSPF routers exchange link-state advertisements (LSAs) that describe the state of their directly connected links. Each router builds a Link-State Database (LSDB) from received LSAs and runs the SPF algorithm to compute the shortest path to every destination.
There are multiple LSA types because different types of routing information require different handling. For example, a router's own interfaces (Type 1) are flooded only within an area, while external routes (Type 5) are flooded throughout the entire OSPF domain. The CCNA 200-301 exam expects you to know the following LSA types: Type 1 (Router LSA), Type 2 (Network LSA), Type 3 (Summary LSA), Type 4 (ASBR Summary LSA), and Type 5 (External LSA). Type 7 (NSSA External LSA) is also important for special area types.
Type 1 – Router LSA
Every OSPF router generates a Type 1 LSA for each area it belongs to. It describes the router's directly connected links (interfaces) and their state (up/down), the cost of each link, and the neighbor routers attached to each link. The Type 1 LSA is flooded only within the area where it originated. The LSA contains a list of link descriptors, each with a link type (stub, transit, point-to-point, virtual link), link ID, and metric.
Key fields in a Type 1 LSA:
Router ID (the originating router)
Area ID
Link count and link data
Options (e.g., E-bit for external routing capability)
Type 2 – Network LSA
A Type 2 LSA is generated by the Designated Router (DR) on a multi-access network (e.g., Ethernet). It describes all routers attached to that network segment, including the DR itself. The Type 2 LSA contains a list of Router IDs of all routers that have formed full adjacency with the DR on that segment. It is flooded only within the area.
Key fields:
Link State ID (IP address of the DR's interface on the network)
Network Mask (subnet mask of the segment)
Attached Router list
Type 3 – Summary LSA
Type 3 LSAs are generated by Area Border Routers (ABRs) to advertise networks from one area to another. They represent inter-area routes. The ABR takes Type 1 and Type 2 LSAs from its connected areas and creates Type 3 LSAs that summarize the prefix and metric. Type 3 LSAs are flooded across area boundaries but not beyond the backbone (Area 0) unless further summarized.
Key fields:
Link State ID (the destination network number)
Network Mask
Metric (cost from the ABR to the destination)
Type 4 – ASBR Summary LSA
Type 4 LSAs are also generated by ABRs. They advertise the location of an Autonomous System Boundary Router (ASBR) to other areas. The ASBR is a router that redistributes external routes into OSPF. Type 4 LSAs tell routers in other areas how to reach the ASBR. The Link State ID is the Router ID of the ASBR, and the metric is the cost from the ABR to the ASBR.
Type 5 – External LSA
Type 5 LSAs are generated by ASBRs to advertise routes from outside the OSPF domain (e.g., redistributed static routes, connected routes, or routes from other routing protocols). They are flooded throughout the entire OSPF domain (except stub areas and NSSAs). Type 5 LSAs have two metric types: E1 (external cost + internal cost) and E2 (external cost only, default).
Key fields:
Link State ID (the external network number)
Network Mask
Forwarding Address (can be 0.0.0.0)
External Route Tag
E-bit (metric type)
Type 7 – NSSA External LSA
Type 7 LSAs are used in Not-So-Stubby Areas (NSSA). An NSSA can import external routes as Type 7 LSAs, which are then translated by the ABR into Type 5 LSAs for the rest of the OSPF domain. Type 7 LSAs are similar to Type 5 but are flooded only within the NSSA.
LSA Header and Aging
All LSAs share a common 20-byte header that includes:
LS age (seconds, max 3600, default refresh every 1800 seconds)
Options
LS type (1-5, 7)
Link State ID
Advertising Router
LS sequence number (used to detect newer instances)
LS checksum
Length
LSAs are refreshed every 30 minutes (1800 seconds) by the originating router. If an LSA is not refreshed before its MaxAge (3600 seconds), it is removed from the LSDB. This aging mechanism ensures stale information is purged.
Flooding and Database Exchange
When an OSPF router receives a new LSA, it floods it out all OSPF-enabled interfaces except the one it was received on. The LSA is acknowledged (via explicit or implicit acknowledgment). Routers maintain a Link-State Database (LSDB) that must be identical within an area. The SPF algorithm is run whenever the LSDB changes.
IOS Verification Commands
To see LSAs in the database:
show ip ospf databaseExample output:
Router# show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 123 0x80000002 0x00A5B3 2
1.1.1.1 1.1.1.1 100 0x80000003 0x00B2C1 3
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.0.0.1 1.1.1.1 150 0x80000001 0x00D4E2
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.1.0 2.2.2.2 200 0x80000001 0x009F12
Summary ASB Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
3.3.3.3 2.2.2.2 180 0x80000001 0x00B3F4
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 3.3.3.3 300 0x80000001 0x00C5A6 0To filter by LSA type:
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 database nssa-externalTo see detailed LSA information:
show ip ospf database router 2.2.2.2Interaction with SPF
The SPF algorithm uses the LSDB to build a shortest-path tree. Type 1 and Type 2 LSAs are used to compute intra-area routes. Type 3 LSAs are used for inter-area routes. Type 5 LSAs are used for external routes. The ABR injects Type 3/4 LSAs, and the ASBR injects Type 5 LSAs. Understanding which LSA type contributes to which route type is crucial for troubleshooting and design.
Identify the LSA Types
First, understand that OSPF has multiple LSA types, each serving a specific purpose. On the CCNA exam, you must recognize Type 1 (Router LSA) – generated by every router; Type 2 (Network LSA) – generated by the DR on multi-access networks; Type 3 (Summary LSA) – generated by ABRs for inter-area routes; Type 4 (ASBR Summary LSA) – also generated by ABRs to advertise ASBR location; Type 5 (External LSA) – generated by ASBRs for external routes; and Type 7 (NSSA External LSA) – used in NSSAs. Each LSA has a unique Link State ID format. For example, Type 1 uses the originating router's Router ID, Type 2 uses the DR's interface IP, Type 3 uses the destination network, Type 4 uses the ASBR's Router ID, and Type 5 uses the external network.
Examine LSA Generation Rules
Know which router generates each LSA type and the flooding scope. Type 1 and 2 are intra-area (flooded only within the area). Type 3 and 4 are generated by ABRs and flooded into other areas (but not back into the originating area). Type 5 is generated by ASBRs and flooded throughout the entire OSPF domain (except stub/NSSA). Type 7 is generated by ASBRs in an NSSA and flooded only within that NSSA. The ABR then translates Type 7 to Type 5 for the rest of the domain. On the exam, you might be asked: 'Which router generates Type 4 LSAs?' The answer is the ABR, not the ASBR.
Use show Commands to Verify
Practice using `show ip ospf database` to see all LSA types in the LSDB. Use type-specific commands like `show ip ospf database router` to see only Type 1 LSAs. Pay attention to the 'Link count' field in Type 1, which tells how many interfaces the router has in that area. For Type 2, the 'Attached Router' list shows all routers on the segment. For Type 3, the 'Link ID' is the network prefix. For Type 4, the 'Link ID' is the ASBR's Router ID. For Type 5, note the 'Tag' field (route tag). The exam may show partial output and ask you to identify the LSA type or the advertising router.
Understand LSA Aging and Refresh
LSAs have an age field that starts at 0 and increments. The default refresh interval is 1800 seconds (30 minutes). When an LSA reaches 1800 seconds, the originating router sends a new instance. MaxAge is 3600 seconds (1 hour); if an LSA reaches 3600 without refresh, it is removed from the LSDB. The sequence number is used to determine which LSA is newer (higher number = newer). On the exam, you may be asked: 'What happens when an LSA reaches MaxAge?' The answer: It is removed from the LSDB and flooded with age 3600 to inform other routers.
Troubleshoot Missing Routes
If a route is missing, check the LSDB for the corresponding LSA. For example, if an inter-area route (Type 3) is missing, verify that the ABR is generating it. Use `show ip ospf database summary` to see if the prefix exists. If an external route (Type 5) is missing, check the ASBR and ensure redistribution is configured. Also, verify area types: stub areas block Type 5, totally stubby areas block Type 3 and Type 5. NSSA allows Type 7. A common exam scenario: 'A router in a stub area cannot reach an external network. Why?' Because stub areas block Type 5 LSAs.
Analyze LSA Forwarding Address
Type 5 LSAs have a Forwarding Address field. If set to 0.0.0.0, routers forward traffic to the ASBR. If non-zero, traffic is forwarded directly to that address (which must be reachable via OSPF). This is used for optimal routing, e.g., when multiple ASBRs exist. On the exam, you might see a Type 5 LSA with a forwarding address of, say, 10.1.1.1. You need to know that the router must have a route to 10.1.1.1 in its routing table; otherwise, the external route is not installed.
In a large enterprise network, OSPF is often deployed with multiple areas to reduce the size of the LSDB and speed up SPF calculations. For example, a company with headquarters (Area 0) and remote branches (each in a separate area) uses Type 3 LSAs to propagate routes from the branches to the core and vice versa. The ABR at headquarters summarizes the branch networks, reducing the number of LSAs. A common design mistake is to place all routers in Area 0, which defeats the purpose of hierarchical OSPF and can lead to excessive SPF runs.
Another scenario involves external route redistribution. Suppose the company acquires a smaller network that runs EIGRP. The ASBR redistributes these EIGRP routes into OSPF as Type 5 LSAs. If the network uses stub areas at the branches to reduce LSA flooding, those branches cannot receive Type 5 LSAs. The solution is to use NSSA areas, which allow Type 7 LSAs. The ABR translates them to Type 5 for the rest of the network.
Performance considerations: Each LSA type consumes memory and CPU. A router with thousands of Type 5 LSAs may experience high memory usage. Network engineers use summary routes (Type 3) and route aggregation to minimize the database. Also, the SPF algorithm runs whenever a Type 1 or Type 2 LSA changes; changes to Type 3/5 do not trigger SPF in all routers (only those that need to recompute inter-area/external routes). Misconfiguration, such as incorrect area type or missing redistribution, can cause black holes or suboptimal routing. For example, if an ABR fails to generate a Type 4 LSA, routers in other areas won't know how to reach the ASBR, making external routes unreachable.
The CCNA 200-301 exam objective 3.4 (Configure and verify OSPF) includes understanding LSA types. You will not be asked to configure LSA types directly, but you must interpret show command output and understand how different LSA types affect routing. The most common exam traps are:
Confusing Type 4 with Type 5: Type 4 advertises the ASBR, not external routes. Many candidates think Type 4 carries external networks. Remember: Type 4 is about how to reach the ASBR; Type 5 carries the actual external prefixes.
Assuming Type 3 LSAs contain the cost from the ABR to the destination: They do, but the cost is the ABR's cost, not the total cost from the local router. The local router adds its cost to the ABR to compute the total metric.
Misidentifying the advertising router: For Type 2 LSAs, the advertising router is the DR, not the router that generated the LSA. For Type 3, the advertising router is the ABR. For Type 5, it's the ASBR.
Forgetting area restrictions: Stub areas block Type 5, totally stubby block Type 3 and Type 5, NSSA allows Type 7. The exam may ask which LSA types are allowed in a given area.
Key values to memorize: MaxAge = 3600 seconds, refresh = 1800 seconds. The default metric for Type 5 E2 is 20 (unless changed). The sequence number is a 32-bit signed integer starting at 0x80000001.
Decision rule: When you see a question about 'which LSA type is used to advertise an external route?' The answer is Type 5 (or Type 7 in NSSA). For 'which LSA type advertises the DR?' It's Type 2. For 'which LSA type is generated by every router?' Type 1.
Type 1 (Router LSA) is generated by every router and lists all directly connected links within an area.
Type 2 (Network LSA) is generated by the DR on a multi-access network and lists all routers attached to that segment.
Type 3 (Summary LSA) is generated by ABRs to advertise inter-area networks.
Type 4 (ASBR Summary LSA) is generated by ABRs to advertise the location of an ASBR.
Type 5 (External LSA) is generated by ASBRs to advertise external routes; flooded throughout the domain except stub/NSSA.
Type 7 (NSSA External LSA) is used in NSSA areas and translated to Type 5 by the ABR.
LSA MaxAge is 3600 seconds; refresh interval is 1800 seconds.
The command 'show ip ospf database' displays all LSAs; type-specific filters exist (e.g., 'show ip ospf database router').
These come up on the exam all the time. Here's how to tell them apart.
Type 1 (Router LSA)
Generated by every OSPF router
Describes the router's own links
Flooded only within the area
Link State ID is the router's Router ID
Contains link types and metrics
Type 2 (Network LSA)
Generated only by the DR on a multi-access network
Describes all routers attached to a network segment
Flooded only within the area
Link State ID is the DR's interface IP on that segment
Contains a list of attached Router IDs
Mistake
Type 4 LSAs carry external network prefixes.
Correct
Type 4 LSAs advertise the Router ID of the ASBR and the cost to reach it, not external networks. External networks are carried in Type 5 LSAs.
Candidates confuse the role of the ASBR (external route source) with the LSA that advertises the ASBR itself.
Mistake
Type 2 LSAs are generated by every router on a multi-access network.
Correct
Only the Designated Router (DR) generates the Type 2 LSA for a multi-access network. Other routers do not generate Type 2 LSAs.
Many assume all routers generate Type 2, but only the DR has that responsibility.
Mistake
Type 3 LSAs contain the complete metric from the local router to the destination.
Correct
Type 3 LSAs contain the metric from the ABR to the destination. The local router adds its cost to the ABR to get the total cost.
Candidates think the metric in the LSA is the end-to-end cost, but it's only the ABR's cost.
Mistake
Stub areas allow Type 5 LSAs.
Correct
Stub areas block Type 5 LSAs. They also block Type 4 LSAs. Only default route (Type 3) is injected.
The term 'stub' is misinterpreted as 'small' rather than 'restricted from external routes'.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Type 3 LSAs (Summary LSAs) advertise inter-area networks (prefixes) from one area to another. They are generated by ABRs and contain the network prefix and mask, plus the cost from the ABR to that network. Type 4 LSAs (ASBR Summary LSAs) advertise the location of an ASBR (Autonomous System Boundary Router) to other areas. They contain the Router ID of the ASBR and the cost from the ABR to that ASBR. In short, Type 3 is for networks, Type 4 is for the router that knows about external networks. On the exam, if you see a Link State ID that looks like a network (e.g., 10.1.1.0), it's Type 3; if it looks like a router ID (e.g., 3.3.3.3), it's Type 4.
LSAs are flooded within an area. ABRs connect areas and are responsible for generating Type 3 and Type 4 LSAs to advertise routes between areas. Type 1 and Type 2 LSAs stay within the area; they are not flooded across area boundaries. Type 5 LSAs are flooded throughout the entire OSPF domain (except stub/NSSA). The ABR does not flood Type 5 LSAs from one area to another; Type 5 LSAs are flooded by the ASBR and propagate via normal flooding across all areas. However, in stub areas, Type 5 LSAs are blocked, so the ABR injects a default route instead.
The Link State ID uniquely identifies the LSA within the OSPF domain. Its format depends on the LSA type: For Type 1, it's the originating router's Router ID. For Type 2, it's the IP address of the DR's interface on the segment. For Type 3, it's the destination network number. For Type 4, it's the ASBR's Router ID. For Type 5, it's the external network number. The Link State ID along with the Advertising Router and LS type uniquely identify an LSA.
Several reasons: (1) The router does not have a route to the forwarding address (if non-zero) or to the ASBR (if forwarding address is 0.0.0.0). (2) The router is in a stub area or NSSA that blocks Type 5 LSAs. (3) The LSA is older than another LSA for the same prefix (lower sequence number). (4) The metric is higher than an existing route from another source. (5) The router's SPF calculation determines that the path is not optimal. Always check the LSDB first to see if the LSA exists, then check the routing table for a route to the ASBR or forwarding address.
The default metric for Type 5 E2 external routes is 20. This is the seed metric used by the ASBR when redistributing routes unless overridden with the 'metric' keyword. For Type 5 E1 routes, the metric includes the internal cost to the ASBR plus the external cost. The default metric type is E2. On the exam, you may be asked to compute the total cost of an E1 route: it's the external cost plus the OSPF cost from the router to the ASBR.
Use the command 'show ip ospf database database-summary' (or 'show ip ospf database' and count entries). The output shows counts for each LSA type per area. For example: Router# show ip ospf database database-summary OSPF Router with ID (1.1.1.1) (Process ID 1) Area 0 database summary LSA Type Count Router 3 Network 2 Summary Net 5 Summary ASBR 1 Type-7 Ext 0 (etc.) This is useful for troubleshooting LSDB size and verifying that expected LSAs are present.
Type 5 LSAs are used in standard areas to advertise external routes. They are flooded throughout the OSPF domain. Type 7 LSAs are used only in NSSA (Not-So-Stubby Area) to advertise external routes within that area. The ABR in an NSSA translates Type 7 LSAs into Type 5 LSAs and floods them into the backbone area. Type 7 LSAs have a different format (they include a 'Propagate' bit) and are not allowed in standard areas. On the exam, if you see an OSPF database with Type-7 Ext entries, the area is an NSSA.
You've just covered OSPF LSA Types Explained — now see how well it sticks with free CCNA 200-301 practice questions. Full explanations included, no account needed.
Done with this chapter?