No history yet

Advanced Interior Routing

The Language of OSPF: LSAs

Open Shortest Path First (OSPF) relies on a shared understanding of the network map. This map, known as the Link-State Database (LSDB), is built from individual pieces of information called Link-State Advertisements (LSAs). Each router generates LSAs to describe its local connections, and these are flooded throughout an OSPF area.

Think of LSAs as a router's way of saying, "Here's who I am, here are my links, and here's who I know." By collecting all these advertisements, every router in an area can construct an identical, complete picture of the network topology. The type of LSA determines what information is being shared and how far that information travels across the network.

The power of a link-state protocol like OSPF comes from this shared, complete view. Every router makes its routing decisions based on the same comprehensive map, which helps prevent routing loops.

There are several types of LSAs, each with a specific purpose. Understanding their roles is key to mastering OSPF.

LSA TypeNameOriginated ByScope
1Router LSAAll routersWithin the area
2Network LSADesignated Router (DR)Within the area
3Summary LSAArea Border Router (ABR)Between areas
4ASBR Summary LSAArea Border Router (ABR)Between areas
5AS External LSAAutonomous System Boundary Router (ASBR)Entire AS (except stub areas)
7NSSA External LSAASBR in an NSSAWithin the NSSA, translated to Type 5 by ABR

A Type 1 (Router) LSA is the most basic. Every router generates one to describe its active links and their costs within its own area. It's the router's personal business card, and it never leaves the area where it was created.

A Type 2 (Network) LSA is only generated by the Designated Router (DR) on multi-access segments like Ethernet. It lists all the routers connected to that segment, creating a central point of information instead of having every router form adjacencies with every other router.

When you need to share routing information between areas, the Area Border Router (ABR) steps in. It generates a Type 3 (Summary) LSA to advertise routes from one area to the rest of the network. This is how a router in Area 1 learns about a network in Area 0.

If there's a gateway to another routing domain (an ASBR), the ABR needs to tell other areas how to reach it. It does this with a Type 4 (ASBR Summary) LSA. This LSA essentially says, "To get to the external network, go through this ASBR."

The actual routes from outside the OSPF domain are injected as Type 5 (AS External) LSAs by the ASBR. These are flooded to all standard areas in the Autonomous System.

Finally, the Type 7 (NSSA External) LSA is a special type used within a Not-So-Stubby Area (which we'll cover next) to carry external route information. It's later translated into a Type 5 LSA by the ABR to be advertised to the rest of the OSPF domain.

Designing Efficient OSPF Areas

In a large network, flooding every LSA to every router is inefficient. It wastes CPU cycles, consumes memory, and makes the network slower to converge. To solve this, OSPF uses the concept of areas. By creating special area types, you can filter which LSAs are allowed to propagate, creating smaller, more stable routing domains.

The most common special area types are Stub, Totally Stubby, and Not-So-Stubby Areas (NSSA).

Stub Area: This is the simplest type of special area. It does not accept information about external routes (Type 4 and 5 LSAs). Instead, to reach external destinations, routers in a stub area use a default route automatically injected by the ABR. This significantly reduces the size of their LSDBs.

Totally Stubby Area: This is a Cisco proprietary enhancement that goes a step further. It blocks external routes (Type 4 and 5 LSAs) and inter-area summary routes (Type 3 LSAs) from other areas. The only way out of the area is via a single default route provided by the ABR. This creates a very small routing table for routers within the area.

Not-So-Stubby Area (NSSA): What if you have a stub area that also needs to connect to an external routing domain? A standard stub area can't do that, as it blocks external LSAs. An NSSA solves this. It blocks incoming Type 4 and 5 LSAs like a stub area but allows an ASBR within it to import external routes as special Type 7 LSAs. The ABR for the NSSA then translates these Type 7 LSAs into standard Type 5 LSAs to flood them to the rest of the OSPF network.

Calculating Paths and Summarizing Routes

Once a router has its complete LSDB for an area, it runs the Shortest Path First (SPF) algorithm, also known as Dijkstra's algorithm, to calculate the best, loop-free path to every other router. The 'best' path is determined by the lowest total cost. The cost of a link is a metric calculated based on its bandwidth.

Cost=Reference BandwidthInterface BandwidthCost = \frac{\text{Reference Bandwidth}}{\text{Interface Bandwidth}}

While SPF is efficient, running it frequently can tax a router's CPU. Every time a link flaps, new LSAs are flooded, and all routers in the area must rerun SPF. To improve stability and reduce the LSDB size, we use route summarization.

Summarization is the process of combining multiple specific routes into a single, less-specific summary route. This is done on ABRs (summarizing routes between areas) and ASBRs (summarizing external routes). A well-summarized network prevents link instability in one area from causing SPF recalculations in another, leading to a more stable and scalable network.

! On an Area Border Router (ABR)
router ospf 1
 ! This command summarizes networks from 10.1.0.0 to 10.1.3.0
 ! within Area 1 and advertises a single 10.1.0.0/22 route
 ! into the backbone (Area 0).
 area 1 range 10.1.0.0 255.255.252.0

! On an Autonomous System Boundary Router (ASBR)
router ospf 1
 ! This command summarizes the external routes being redistributed
 ! into a single 172.16.0.0/21 prefix.
 summary-address 172.16.0.0 255.255.248.0

Tuning for Fast Convergence

Convergence is the time it takes for all routers in a network to agree on the current topology after a change. Fast convergence is critical for modern networks. By default, OSPF can be a bit slow, but you can tune its timers to speed things up. However, be cautious: aggressive timers can increase CPU load and cause instability if set too low.

Another key feature for stability is OSPF Graceful Restart. Imagine a router's control plane (the software running OSPF) needs to restart, but its forwarding plane (the hardware that actually forwards packets) is still working fine. Without Graceful Restart, neighboring routers would see it as 'down' and recalculate all routes around it, causing a network disruption.

With Graceful Restart, the restarting router tells its neighbors, "Hold on, I'm restarting my brain but my arms still work. Keep forwarding traffic to me based on the old information for a short period." This allows for a seamless restart of the OSPF process without impacting data traffic, a feature often called Non-Stop Forwarding (NSF).

Now, let's test your understanding of these advanced OSPF topics.

Quiz Questions 1/6

Which LSA type is generated by a Designated Router (DR) on a multi-access segment to list all connected routers?

Quiz Questions 2/6

A network administrator wants to configure an OSPF area that blocks external routes (Type 5 LSAs) but still receives summary routes from other areas (Type 3 LSAs). Which area type should be used?

By mastering LSAs, area types, summarization, and convergence tuning, you gain precise control over how OSPF operates, allowing you to build large, scalable, and resilient networks.