CiscoCCNPEnterprise NetworkingIntermediate25 min read

What Is OSPF LSA Types in Networking?

Also known as: OSPF LSA types, LSA Type 1, LSA Type 2, LSA Type 3, LSA Type 4

Reviewed byJohnson Ajibi· Senior Network & Security Engineer · MSc IT Security
On This Page

Quick Definition

OSPF LSA types are like different kinds of letters that routers send to each other to build a complete map of the network. Each type carries a specific piece of information, such as a router's own connections, the network's structure, or routes from outside the OSPF area. By exchanging these LSA types, routers can calculate the best paths for data to travel.

Must Know for Exams

OSPF LSA types are a core topic in the Cisco CCNP ENCOR exam (350-401). The exam objectives explicitly include 'Describe OSPF features and characteristics' and 'Configure and verify OSPF operations', which includes understanding LSA types. ENCOR typically tests candidates on the function of each LSA type, which routers generate them, and where they are flooded. Candidates must know the differences between Type 1, Type 2, Type 3, Type 4, Type 5, and Type 7 LSAs, and how they interact with OSPF area types such as standard areas, stub areas, totally stubby areas, and Not-So-Stubby Areas (NSSA).

The exam often presents multiple-choice questions that ask for the correct LSA type for a given scenario. For instance, a question might state: 'Which LSA type is generated by an ASBR to advertise external routes?' The correct answer is Type 5. Another common question pattern is to list OSPF area types and ask which LSA types are allowed. For a stub area, Type 5 LSAs are blocked, but Type 3 LSAs are allowed. For a totally stubby area, both Type 3 and Type 5 LSAs are blocked except a default route.

More advanced questions may require candidates to interpret outputs from 'show ip ospf database' and identify which router generated a given LSA based on its type and link-state ID. Troubleshooting scenarios also appear, where a network is not converging properly, and the candidate must deduce that a missing Type 4 LSA is preventing external routes from being installed. ENCOR also tests the differences between OSPFv2 and OSPFv3 LSA types, although the focus is on OSPFv2.

Beyond ENCOR, OSPF LSA types appear in CCNP Enterprise concentration exams like ENARSI (300-410) and in the CCIE lab exams. In those higher-level exams, candidates must configure OSPF with specific LSA filtering, route summarization, and area types. Even for the CCNA exam, a basic understanding of LSA types is sometimes tested, though the depth is less than in CCNP. Overall, a solid grasp of LSA types is essential for passing the ENCOR exam and for any serious career in enterprise networking.

Simple Meaning

Imagine a city with a postal system where each mail carrier needs to know the best routes to deliver packages. The city is divided into neighborhoods, and each neighborhood has its own post office. For a mail carrier to know how to get a package from one neighborhood to another, they need different kinds of maps and information. Some maps show the streets inside a single neighborhood, others show the highways connecting neighborhoods, and some show special routes for packages coming from outside the city entirely.

OSPF LSA types are exactly those different kinds of maps and information sheets. In computer networking, routers act like mail carriers, and the network is the city. OSPF stands for Open Shortest Path First, a routing protocol that helps routers learn about every path in the network. Each LSA type, or Link-State Advertisement, is like a specific type of map or report that routers exchange.

Type 1 LSA is a router's own description of its directly connected links, like a mail carrier listing all the streets on their own route. Type 2 LSA describes a network segment that connects multiple routers, like a map of a central square where several streets meet. Type 3 LSA summarizes routes between different neighborhoods, or OSPF areas. Type 4 LSA points to a special router that knows about routes outside the OSPF domain, like a sign pointing to the city's main post office that handles international mail. Type 5 LSA carries those outside routes themselves, like a catalog of international shipping destinations. Finally, Type 7 LSA is a special type used in certain neighborhoods to carry outside route information in a more efficient way.

Full Technical Definition

OSPF (Open Shortest Path First) is a link-state routing protocol that uses Dijkstra's Shortest Path First (SPF) algorithm to compute the best paths in an IP network. Routers running OSPF exchange Link-State Advertisements (LSAs) to build a complete topological database, known as the Link-State Database (LSDB). Each LSA type serves a distinct purpose and is defined in RFC 2328 (OSPFv2) and RFC 5340 (OSPFv3).

The most common LSA types in OSPFv2 are Type 1 through Type 7. Type 1 (Router LSA) is generated by every router and describes its active interfaces and neighbors within its own area. It includes link IDs, link data, and metric information for each interface. Type 2 (Network LSA) is generated by the Designated Router (DR) on a multi-access network, such as Ethernet, and lists all routers attached to that segment. Type 3 (Summary LSA) is generated by Area Border Routers (ABRs) to advertise routes from one area to another. These are used for inter-area routing and can be default routes as well.

Type 4 (ASBR Summary LSA) is also generated by ABRs but specifically advertises the location of an Autonomous System Border Router (ASBR). This enables routers in other areas to know how to reach the ASBR to access external routes. Type 5 (AS External LSA) is generated by ASBRs and describes routes external to the OSPF domain, such as routes redistributed from another routing protocol like EIGRP or BGP. Type 5 LSAs are flooded throughout the entire OSPF domain, except for stub areas and NSSAs. Type 7 (NSSA External LSA) is used in Not-So-Stubby Areas (NSSAs). It allows external routes to be injected into an NSSA without requiring a full Type 5 flood. The ABR then translates Type 7 LSAs into Type 5 LSAs for the rest of the OSPF domain.

In OSPFv3, which supports IPv6, the LSA types are expanded with additional types like Link LSA (Type 8), Intra-Area Prefix LSA (Type 9), and others. Understanding LSA types is critical for designing scalable OSPF networks, configuring route summarization, and troubleshooting routing issues. Each LSA type has a specific format and aging mechanism, and the LSDB must be synchronized across all routers in an area for the SPF algorithm to produce correct results.

Real-Life Example

Think of a large university campus with multiple buildings, each building representing a router, and the hallways and outdoor pathways representing network links. The university has a central administration office that handles external visitors and deliveries. Now, imagine the campus is divided into zones, like the Science Zone, Arts Zone, and Administration Zone. Each zone has its own security office.

Type 1 LSA is like each building's floor plan that shows all its doors and corridors connecting to other buildings. Every building sends its floor plan to the security office in its zone. Type 2 LSA is like a map of a central plaza where multiple buildings open onto the same square. The security office for that plaza creates a list of all buildings that have doors to the square.

Type 3 LSA is like a summary map that the Science Zone security office sends to the Arts Zone security office, showing the main pathways between the zones without listing every single door in the Science Zone. This helps the Arts Zone know how to reach buildings in the Science Zone without needing all the detail. Type 4 LSA is like a sign pointing to the central administration office. A security office in the Arts Zone might not know where the administration building is, so the Science Zone security office sends a Type 4 LSA that says 'the administration building is located at the main gate.'

Type 5 LSA is like a list of external destinations, such as the city bus routes, courier services, and off-campus locations that the administration office handles. This list is shared across the whole campus. Type 7 LSA is like a limited version of that list used in a special zone, like a research lab that does not want to see the full external list but still needs information about a few off-campus suppliers. The lab's security office sends a Type 7 LSA, and the zone's main security office translates it into a Type 5 for the rest of the campus.

Why This Term Matters

Understanding OSPF LSA types is fundamental for any network engineer working with enterprise networks that use OSPF. OSPF is one of the most widely deployed interior gateway protocols, especially in large and complex networks. Each LSA type directly impacts how routing information flows and how routers build their routing tables. Misconfiguring LSA types or misunderstanding their propagation can lead to routing loops, black holes, or suboptimal routing.

For example, in a multi-area OSPF design, Type 3 LSAs are used to summarize routes. If an network engineer does not configure proper summarization on an ABR, the network may suffer from excessive route entries, leading to higher CPU and memory usage on routers. Similarly, if a network engineer accidentally configures an area as a stub area but expect external routes to be present, they will fail because stub areas block Type 5 LSAs. Knowing that Type 4 LSAs are needed to reach an ASBR helps in troubleshooting scenarios where external routes are missing in certain areas.

In real IT work, OSPF LSA types are also critical for security. By controlling which LSA types are allowed in different areas, an engineer can create a more secure and stable network. For instance, using a totally stubby area reduces the number of routing updates and isolates the area from external route flapping. Additionally, understanding LSA types helps in troubleshooting using commands like 'show ip ospf database', which displays every LSA in the database. Without knowing what each LSA type represents, diagnosing a routing issue would be nearly impossible.

Finally, OSPF LSA types are essential for scalability. Large service providers and enterprises rely on OSPF area design and LSA filtering to manage thousands of routes. Engineers who master LSA types can design networks that converge faster, use less bandwidth for routing updates, and remain stable even during major topological changes.

How It Appears in Exam Questions

In the ENCOR exam and other Cisco certifications, OSPF LSA types appear in several distinct question formats. The most common is the direct knowledge question where the candidate must recall the purpose of a specific LSA type. For example: 'Which OSPF LSA type describes the links attached to a router within its own area?' The answer is Type 1 (Router LSA). Another variant asks: 'Which router generates Type 3 LSAs?' The answer is the Area Border Router (ABR).

Scenario-based questions are also frequent. A typical scenario might describe a network with three areas: Area 0, Area 1, and Area 2. An ASBR is located in Area 1. The candidate is asked which LSA type allows routers in Area 2 to reach the ASBR. The answer is Type 4 (ASBR Summary LSA), generated by the ABR connecting Area 1 and Area 2. Another scenario might involve a stub area where external routes are not being learned, and the candidate must identify that Type 5 LSAs are blocked in stub areas.

Configuration-based questions require understanding of how LSA types interact with area types. For instance: 'You are configuring OSPF and want to create an area that does not accept external routes but still accepts inter-area routes. Which area type should you configure?' The answer is a stub area. The candidate must also know that Type 5 LSAs are blocked, but Type 3 LSAs are allowed. A more specific question might ask about NSSA: 'Which LSA type is used to inject external routes into a Not-So-Stubby Area?' The answer is Type 7.

Troubleshooting questions present an output from 'show ip ospf database' or 'show ip route' and ask why a particular route is missing. For example, the output shows Type 5 LSAs in Area 0 but no external routes in a router in Area 1. The candidate might need to check if there is a Type 4 LSA pointing to the ASBR. If the Type 4 is missing, the router does not know how to reach the ASBR and will not install the Type 5 routes. Another troubleshooting pattern involves a network where OSPF neighbors are up but routes are absent, and the candidate must realize that the area is configured as a stub area but the remote router is flooding Type 5 LSAs, causing compatibility issues.

Finally, some questions test the LSA flooding scope. For instance: 'Which LSAs are flooded throughout the entire OSPF domain?' The answer includes Type 1, Type 2, Type 3, Type 4, and Type 5 (except in stub areas). Type 7 LSAs are flooded only within the NSSA. Understanding the flooding boundaries for each LSA type is crucial for network design questions.

Study encor

Test your understanding with exam-style practice questions.

Practise

Example Scenario

A medium-sized company named TechFlow has two main offices: a headquarters in Chicago and a branch office in Denver. The network engineer configures OSPF with two areas. Chicago is Area 0 (the backbone), and Denver is Area 1. The router in Chicago, RouterA, has a connection to the internet via a separate router, RouterB, which redistributes a default route into OSPF. RouterB is an ASBR.

RouterA, acting as an ABR, generates Type 3 LSAs to advertise routes from Area 0 to Area 1. For example, it summarizes the Chicago subnets and sends them to Denver as Type 3 LSAs. Now, the Denver router, RouterC, learns about the Chicago subnets but does not know about the default route from RouterB. This is because RouterB is in Area 0, and RouterC is in Area 1. For RouterC to use the default route to reach the internet, it needs to know how to get to RouterB, the ASBR. RouterA as the ABR generates a Type 4 LSA that advertises RouterB's router ID. This Type 4 LSA is sent to Area 1. RouterC receives the Type 4 LSA and now knows the path to RouterB. Finally, RouterB's Type 5 LSA (the default route) is already in Area 0. RouterC, having learned the path to RouterB via the Type 4 LSA, can now install the default route learned from the Type 5 LSA into its routing table. This enables Denver to reach the internet through Chicago.

Common Mistakes

Thinking Type 5 LSAs are flooded into all OSPF areas without exception.

Type 5 LSAs are blocked in stub areas, totally stubby areas, and NSSAs. They are only flooded into standard areas and the backbone area. Stub areas are designed to prevent external routes from entering to reduce the routing table size.

Always check the area type first. If the area is a stub, totally stubby, or NSSA, Type 5 LSAs are not present. Only Type 1, Type 2, and Type 3 LSAs (and Type 4 in some cases) are allowed in stub areas.

Confusing Type 3 and Type 4 LSAs. Both are generated by ABRs, but for different purposes.

Type 3 LSAs advertise network routes (prefixes) from one area to another. Type 4 LSAs advertise the location of an ASBR, not the routes themselves. A router needs a Type 4 LSA to know how to reach the ASBR before it can use the external routes advertised by Type 5 LSAs.

Remember: Type 3 = route advertisement; Type 4 = ASBR location advertisement. If a route is missing and you suspect an external route, check for the presence of a Type 4 LSA pointing to the ASBR.

Believing that Type 7 LSAs are translated into Type 5 LSAs at the ABR only in NSSAs.

This is actually correct for NSSAs, but some learners mistakenly think Type 7 LSAs remain as Type 7 throughout the network. In reality, the ABR in an NSSA translates Type 7 LSAs into Type 5 LSAs before flooding them into the backbone area. The Type 5 LSAs then propagate to other standard areas.

Learn the translation rule: Type 7 LSAs are used inside the NSSA. The ABR converts them to Type 5 LSAs for the rest of the OSPF domain. The Type 5 LSAs are then subject to the same area type restrictions.

Assuming that a single router can generate Type 2 LSAs on any network type.

Type 2 LSAs are generated only by the Designated Router (DR) on broadcast and non-broadcast multi-access (NBMA) networks. On point-to-point links or point-to-multipoint links, there is no DR, so no Type 2 LSAs are generated. Type 2 LSAs describe the multi-access network segment and list all attached routers.

Only consider Type 2 LSAs in network types that require a DR election, such as Ethernet interfaces. For point-to-point links, the router uses Type 1 LSAs to describe the link directly to the neighbor.

Thinking that Type 1 LSAs are flooded beyond the area in which they are generated.

Type 1 LSAs (Router LSAs) are area-scoped. They are only flooded within the area that the router belongs to. The ABR does not propagate Type 1 LSAs from one area to another. Instead, the ABR summarizes the information into Type 3 LSAs for inter-area communication.

Always remember that Type 1 and Type 2 LSAs exist only within a single OSPF area. Type 3 and Type 4 LSAs are used for inter-area communication. This is a fundamental principle of OSPF's hierarchical design.

Exam Trap — Don't Get Fooled

The exam asks: 'An OSPF router in Area 0 receives a Type 5 LSA from an ASBR in Area 0. Another router in Area 1 (a standard area) should also receive this Type 5 LSA. What must also be present for the Area 1 router to install the external route?'

The trap answer is that the Type 5 LSA itself is sufficient. The correct answer is that a Type 4 LSA must also be present. Always remember the two-step process for external routes in OSPF.

First, the ASBR generates Type 5 LSAs that contain the external routes. Second, the ABR generates Type 4 LSAs that provide the next-hop information to reach the ASBR. Both LSAs must be present for a router in a non-backbone area to install the external route.

A router in the same area as the ASBR does not need a Type 4 LSA because it already has a Type 1 or Type 2 LSA describing the ASBR's location. But routers in other areas need the ABR's Type 4 LSA.

Commonly Confused With

OSPF LSA TypesvsEIGRP Route Types

EIGRP uses a different set of route types: Internal, External, and Summary. These are conceptually similar to OSPF LSA types but are less granular. EIGRP has only three route types compared to OSPF's seven main types. OSPF LSA types are more detailed and hierarchical, allowing for finer control of routing information between areas.

In OSPF, if you want to advertise a default route into a stub area, you use a Type 3 LSA. In EIGRP, you simply configure a default route using the 'ip default-network' command or a static route redistributed into EIGRP, and it is considered an external route.

OSPF LSA TypesvsIS-IS LSP Types

IS-IS uses Link State PDUs (LSPs) instead of LSAs. IS-IS has Level 1 and Level 2 LSPs, which correspond loosely to intra-area and inter-area routing. OSPF has multiple LSA types for specific purposes, while IS-IS uses two levels and additional TLVs to carry information. OSPF is more complex in terms of LSA types but offers more granular control.

In OSPF, a Type 4 LSA specifically advertises the location of an ASBR. In IS-IS, the same function is achieved by including the IS-IS Router ID TLV within the Level 2 LSP.

OSPF LSA TypesvsBGP Path Attributes

BGP uses path attributes like AS_PATH, NEXT_HOP, and MULTI_EXIT_DISC to describe routes. BGP attributes are per-route and are used for path selection, not for building a topological map like OSPF LSAs. OSPF LSA types are advertisements that build a link-state database, while BGP attributes are carried in update messages to describe route characteristics.

In OSPF, a Type 5 LSA includes an external route and its metric. In BGP, the same route would be advertised with an AS_PATH attribute showing the autonomous systems it traversed and a NEXT_HOP attribute indicating the next router.

Step-by-Step Breakdown

1

Router generates Type 1 LSA

Every OSPF router creates a Type 1 Router LSA that lists all its active OSPF-enabled interfaces, the IP addresses, and the neighbors on each link. This LSA is flooded within the router's own area. It forms the basis for building the link-state database.

2

Designated Router generates Type 2 LSA

On a broadcast network like Ethernet, the DR creates a Type 2 Network LSA. This LSA lists all routers connected to that segment, including the DR itself and the Backup DR. It helps other routers understand that these routers are all on the same multi-access network.

3

ABR generates Type 3 LSAs

An Area Border Router takes Type 1 and Type 2 LSAs from one area and summarizes them into Type 3 Summary LSAs. These Type 3 LSAs advertise network prefixes to other areas. The ABR can also generate a default Type 3 LSA to simplify routing for stub areas.

4

ABR generates Type 4 LSA

If an ABR learns about an ASBR from a Type 1 LSA or Type 2 LSA in its connected area, it creates a Type 4 ASBR Summary LSA. This Type 4 LSA advertises the router ID of the ASBR and is flooded into other areas. Without this step, routers in other areas would not know the path to the ASBR.

5

ASBR generates Type 5 LSA

An Autonomous System Border Router generates Type 5 External LSAs for routes that are redistributed into OSPF from another protocol or a static route. These LSAs are flooded throughout the OSPF domain, except in stub areas and NSSAs. Each Type 5 LSA includes the external route prefix, subnet mask, metric, and forwarding address.

6

ASBR generates Type 7 LSA (in NSSA)

When an ASBR is located inside a Not-So-Stubby Area (NSSA), it generates Type 7 External LSAs instead of Type 5. The Type 7 LSAs are flooded only within the NSSA. When they reach the ABR, the ABR translates them into Type 5 LSAs and floods them into the backbone and other standard areas.

7

All routers run SPF algorithm

Each OSPF router collects all LSAs (Type 1 through Type 5 or Type 7) into its link-state database. The router then runs Dijkstra's SPF algorithm using this database to calculate the shortest path to every destination network. The result populates the routing table.

Practical Mini-Lesson

In a real production network, understanding OSPF LSA types is not just for passing an exam; it is essential for designing, configuring, and troubleshooting OSPF networks. When you sit down to design an OSPF network, you must decide on the area structure. Each area type imposes restrictions on which LSA types can be present. For example, if you want to reduce the routing table size in a remote office, you might configure a totally stubby area. In that area, the only LSA types present are Type 1, Type 2, and a single Type 3 default route. There will be no Type 4 or Type 5 LSAs, and no Type 3 LSAs for specific networks except the default. This drastically reduces the amount of routing information the remote routers need to process.

When configuring OSPF on a router, you need to understand where LSAs are generated. A router generates a Type 1 LSA automatically for each OSPF-enabled interface. If you want to generate a Type 5 LSA for redistributed routes, you will configure redistribution under the OSPF process. For example, 'redistribute static subnets' will make the router an ASBR and generate Type 5 LSAs for the static routes. If that router is inside an NSSA, you must use the 'area X nssa' command and the redistribution will create Type 7 LSAs instead.

Troubleshooting is where LSA types become most critical. Suppose users in a branch office report that they cannot reach a server on the internet. You check the routing table on the branch router and see no default route. You then run 'show ip ospf database' and see a Type 5 LSA for the default route, but the route is not installed. Your next step is to check for a Type 4 LSA. If it is missing, you know the ABR is not generating it. You then check the ABR configuration and find that the area is configured as a stub area, which blocks Type 4 LSAs. The fix is to change the area to a standard area or use an alternative such as generating a default route via Type 3 LSA.

Professionals also need to know about LSA filtering. You can use the 'area X filter-list prefix' command on an ABR to filter which Type 3 LSAs are advertised into an area. This is a powerful tool for security and route control. For example, you might want to block routes from a specific subnet from entering a sensitive area. Additionally, you can use the 'summary-address' command on an ASBR to aggregate Type 5 LSAs, reducing the number of external routes in the database.

Finally, connecting LSA types to broader concepts: OSPF LSA types are the foundation of the link-state database, which is the heart of OSPF. This database is the same on every router in an area, providing a consistent view of the network. This is different from distance-vector protocols like RIP or EIGRP, where each router only knows the direction and distance to a destination. The ability to have a complete network map allows OSPF to converge quickly and avoid routing loops. Understanding LSA types is the key to mastering OSPF and becoming proficient in enterprise networking.

Memory Tip

Remember: 1-Router, 2-Network, 3-Summary, 4-ASBR, 5-External, 7-NSSA External. Think of it as a hierarchy: local (Type 1), team (Type 2), neighborhood (Type 3), pointer (Type 4), outside world (Type 5), and limited outside (Type 7).

Covered in These Exams

Related Glossary Terms

Frequently Asked Questions

What is the difference between Type 3 and Type 4 LSAs?

Type 3 LSAs advertise network prefixes from one area to another, allowing inter-area routing. Type 4 LSAs advertise the location of an Autonomous System Border Router (ASBR) so that routers in other areas know how to reach the ASBR to use external routes.

Why are Type 5 LSAs blocked in stub areas?

Stub areas are designed to reduce the size of the link-state database and routing table by not accepting external routes. This makes the stub area routers more efficient and less memory-intensive. They rely on a default route generated by the ABR to reach external destinations.

Does a Type 5 LSA require a Type 4 LSA to be usable?

Yes, for routers that are not in the same area as the ASBR. The Type 5 LSA contains the external route, but the router needs to know the next hop to reach the ASBR. The Type 4 LSA provides that information. Routers in the same area as the ASBR already have the necessary information from Type 1 or Type 2 LSAs.

Can a router generate both Type 5 and Type 7 LSAs?

A router can generate either Type 5 or Type 7 LSAs, depending on the area type. If the router is in a standard area, it generates Type 5 LSAs for redistributed routes. If it is in an NSSA, it generates Type 7 LSAs. The router does not generate both for the same route.

What happens if an ABR receives a Type 7 LSA?

The ABR translates the Type 7 LSA into a Type 5 LSA and then floods the Type 5 LSA into the backbone area (Area 0) and other standard areas. The Type 7 LSA remains only within the NSSA.

How do I see all LSA types on a Cisco router?

You can use the command 'show ip ospf database' to view all LSAs in the OSPF database. To see a specific type, you can use 'show ip ospf database router' for Type 1, 'show ip ospf database network' for Type 2, and so on.

Are there LSA types beyond Type 7?

Yes, in OSPFv3 (for IPv6) there are additional types like Type 8 (Link LSA) and Type 9 (Intra-Area Prefix LSA). In OSPFv2, only Types 1 through 5 and Type 7 are commonly used, though Type 6 (Multicast LSA) exists but is rarely implemented.

Summary

OSPF LSA types are the building blocks of the OSPF link-state database, each carrying a specific kind of routing information. Type 1 Router LSAs describe a router's own links, Type 2 Network LSAs describe multi-access segments, and Type 3 Summary LSAs carry inter-area routes. Type 4 and Type 5 LSAs work together to bring external routes into the OSPF domain, while Type 7 LSAs serve a similar purpose within NSSAs.

Understanding these types is crucial for designing scalable OSPF networks, configuring area types correctly, and troubleshooting routing issues. For certification exams like CCNP ENCOR, candidates must know not only the function of each LSA type but also which routers generate them and where they are allowed to flood. Mastering LSA types is a significant step toward becoming proficient in enterprise networking and passing advanced Cisco exams.