What Does an OSPF Area Contain: LSAs and Router Roles

An OSPF area contains a logical collection of routers, network links, and interfaces that share the same area identifier and maintain an identical link-state database. Every router inside the area builds a complete topological map of that area, and all routers must keep their copies of this database perfectly synchronized. Understanding what lives inside an area, and what stays out, is key to understanding how OSPF scales.

The Link-State Database

The most important thing an OSPF area contains is its link-state database (LSDB). This database is a complete map of every router and every link within the area. Each router in the area holds its own copy, and every copy must be exactly the same. If two routers in the same area have different versions of the LSDB, routing loops or black holes can result.

Synchronization happens in two phases. When a router first joins the area, it performs an initial database exchange with its neighbors, downloading the full LSDB. After that, any topology change (a link going down, a new router appearing) triggers asynchronous flooding, where the affected router sends an update that propagates to every other router in the area. This continuous process keeps all copies of the LSDB identical.

Because every router must store and process the full area topology, large areas with hundreds of routers create heavier memory and CPU demands. This is the primary reason OSPF uses areas in the first place: splitting a big network into smaller areas limits the size of each LSDB.

LSA Types That Stay Inside the Area

The link-state database is built from individual records called Link-State Advertisements (LSAs). Two LSA types are strictly contained within an area and never leave it:

  • Type 1 (Router LSA): Every router in the area generates one of these. It describes all of the router’s interfaces within that area, including their IP addresses, link costs, and the neighbors reachable on each link. Type 1 LSAs always stay within the area.
  • Type 2 (Network LSA): On multi-access network segments (like Ethernet), one router is elected as the Designated Router. That router generates a Type 2 LSA listing all the routers connected to the segment. Like Type 1s, these never flood beyond the area boundary.

Together, these two LSA types give every router in the area enough information to calculate the shortest path to every destination within that area.

LSA Types That Cross Area Boundaries

An area also receives LSAs that originate from outside it. These carry information about destinations in other areas or entirely outside the OSPF domain:

  • Type 3 (Summary LSA): Generated by Area Border Routers, these advertise routes from one area into another. Each ABR regenerates the Type 3 LSA rather than simply forwarding it, which is how route summarization between areas works.
  • Type 4 (Summary ASBR LSA): Also generated by ABRs, these tell routers how to reach an Autonomous System Boundary Router (ASBR) that sits in a different area. Routers in the same area as the ASBR don’t need Type 4 LSAs because they already know where it is from the Type 1 LSAs.
  • Type 5 (External LSA): Generated by ASBRs, these represent routes redistributed into OSPF from other routing protocols. Unlike Types 3 and 4, Type 5 LSAs are not regenerated at area boundaries. They flood across the entire OSPF domain unchanged.

Routers and Their Roles

An area contains routers that fall into distinct roles based on their connections:

An internal router has all of its OSPF neighbor relationships within a single area. It maintains one LSDB and runs one set of shortest-path calculations. This is the simplest and most common role.

An Area Border Router (ABR) has interfaces in two or more areas. It maintains a separate LSDB for each area it touches and is responsible for generating Type 3 summary LSAs to pass routing information between areas. Both sides of any given link always belong to the same area, so the boundary between areas runs through the ABR itself, not across a link.

An ASBR sits at the edge of the OSPF domain and redistributes routes from external sources. An ASBR can exist in any area, and it generates the Type 5 external LSAs that propagate throughout the domain.

The Backbone Area (Area 0)

Area 0, also written as 0.0.0.0, is a special area that every other area must connect to. It serves as the transit hub for all inter-area traffic. When a packet needs to travel from one non-backbone area to another, it must pass through Area 0.

The backbone is the only area that can generate and distribute the summary topology information used by other areas. ABRs attached to Area 0 gather routing data from their connected areas and inject it into the backbone, which then advertises those routes to all remaining areas. In practical terms, Area 0 “knows everything” about the OSPF domain at a summary level, even though it doesn’t hold the detailed Type 1 and Type 2 LSAs from other areas.

If a non-backbone area cannot physically connect to Area 0, a virtual link can be configured through an intermediate area to maintain logical connectivity. This is a workaround, not a best practice, and it adds complexity.

How Stub and NSSA Areas Restrict Content

Not every area contains the same mix of LSAs. OSPF defines several area types that deliberately block certain LSA types to reduce database size in areas that don’t need full external routing knowledge.

A stub area blocks all Type 5 external LSAs. Routers in a stub area don’t learn individual external routes. Instead, the ABR injects a default route so traffic destined outside the OSPF domain still has a path out. Redistribution from other routing protocols is not allowed inside a stub area.

A totally stubby area goes further, blocking Type 3 and Type 4 summary LSAs in addition to Type 5s. Routers in a totally stubby area see only routes within their own area plus a single default route. This drastically shrinks the LSDB.

A Not-So-Stubby Area (NSSA) is an extension of the stub concept. It still blocks Type 5 LSAs but introduces a Type 7 LSA that allows limited external route redistribution within the area. At the ABR, Type 7 LSAs are converted into Type 5s before being flooded into the rest of the OSPF domain. A totally stubby NSSA combines both restrictions: it blocks Types 3, 4, and 5 while still permitting Type 7 for local redistribution.

Route Summarization at Area Boundaries

Each area can contain many individual IP prefixes, but those prefixes don’t have to be advertised individually to the rest of the network. ABRs can use the “area range” command to consolidate multiple routes from an area into a single summary route before advertising it into another area. This reduces the number of Type 3 LSAs that other areas must store and process.

Summarization only works at the point where an LSA is generated. For inter-area routes, that means the ABR. For external routes, only the ASBR that originally created the Type 5 LSA can summarize those prefixes. A router further downstream cannot re-summarize someone else’s LSAs because every router in the area must hold the same LSDB. Summarizing at an intermediate point would create a mismatch.

This is why careful IP address planning matters when designing OSPF areas. If the subnets within an area share a common prefix, the ABR can advertise a single summary. If the addressing is scattered, each prefix must be advertised individually, which erodes the scaling benefits of using areas in the first place.