Loading learning content...
A single OSPF network with 50 routers works beautifully. Every router maintains a synchronized LSDB, runs SPF when topology changes, and converges quickly. But what happens at 500 routers? Or 5,000?
The challenges multiply exponentially:
OSPF's answer to this scalability challenge is its hierarchical area design—a partitioning mechanism that divides large networks into manageable domains, containing flooding scope and reducing the computational burden on individual routers.
By the end of this page, you will understand OSPF's area concept and its hierarchical two-level structure, the critical role of Area 0 (backbone), how Area Border Routers (ABRs) connect areas and summarize routes, the various area types (standard, stub, totally stubby, NSSA), and best practices for designing scalable OSPF deployments. You'll grasp why hierarchy is essential for enterprise-scale OSPF.
An OSPF area is a logical grouping of routers and networks that share a common Link-State Database. Routers within an area have identical knowledge of that area's topology, but they don't need detailed knowledge of other areas—they only need summary information to reach destinations in remote areas.
The Fundamental Principle:
Areas create flooding boundaries. LSAs that describe internal topology (Types 1 and 2) flood only within their originating area. This means:
Area Identification:
Areas are identified by a 32-bit Area ID, traditionally expressed in dotted-decimal notation (like an IP address). Common practices include:
Despite using dotted-decimal notation, the Area ID is simply an identifier—not an IP address or network number. Area 0 is special by convention, but Area 10 has no relation to the 10.0.0.0/8 network. However, many organizations intentionally align Area IDs with their address allocation for documentation convenience.
What Areas Provide:
Area 0 holds a privileged position in OSPF's hierarchy—it is the backbone through which all inter-area traffic must transit. This isn't an optional design recommendation; it's a fundamental protocol requirement.
The Two-Level Hierarchy:
OSPF implements a strict two-level hierarchy:
Every non-backbone area must connect directly to Area 0 through at least one Area Border Router. This creates a hub-and-spoke topology at the routing level:
In this topology:
Why This Requirement Exists:
The backbone requirement ensures loop-free inter-area routing. Without a single transit area:
By forcing all inter-area traffic through Area 0, OSPF creates a predictable routing topology where paths between areas always traverse the backbone.
If a non-backbone area cannot physically connect to Area 0, OSPF provides virtual links—logical tunnels through a transit area that extend the backbone. Virtual links are configured between two ABRs and create a logical backbone connection. However, they add complexity and should be considered a workaround, not a design feature. Proper network design should provide physical backbone connectivity.
Backbone Design Considerations:
Area Border Routers (ABRs) are the gatekeepers between OSPF areas. They maintain connections to multiple areas (always including Area 0) and are responsible for:
ABR Definition Subtleties:
The RFC 2328 definition of an ABR is a router with interfaces in multiple areas, one of which is Area 0. However, Cisco's implementation traditionally classified any router with interfaces in multiple areas as an ABR—even without Area 0 connectivity. This matters for:
| ABR Function | Description | LSA Types Involved |
|---|---|---|
| LSDB Maintenance | Maintain complete, separate LSDB for each attached area | Types 1, 2 per area |
| Inter-Area Advertisement | Advertise reachable networks from one area into other areas | Type 3 (Summary LSA) |
| ASBR Location | Advertise ASBRs reachable through this ABR | Type 4 (ASBR Summary) |
| Route Summarization | Combine multiple routes into aggregate prefixes | Type 3 (summarized) |
| Area Filtering | Control which routes are advertised between areas | Affects Type 3 generation |
How ABRs Advertise Routes:
When an ABR learns about a network in one area (via Type 1 and 2 LSAs), it can advertise reachability to that network in other areas using Type 3 Summary LSAs. Critically:
This abstraction is what enables OSPF scaling—routers don't need thousands of LSAs describing remote area topologies, just a handful of Type 3 LSAs summarizing reachable prefixes.
When multiple ABRs connect an area to the backbone, routers within the area receive Type 3 LSAs from each ABR. SPF calculates the total path cost (intra-area cost to ABR + advertised inter-area cost) and selects the lowest. If costs tie, traffic may be load-balanced across multiple ABRs—a feature, not a bug.
Route summarization (also called route aggregation) is the process of combining multiple specific routes into a single, less-specific route. Performed at ABRs, summarization dramatically reduces routing table size and LSA count in the OSPF domain.
Example:
Area 1 contains these networks:
Without summarization, the ABR generates four Type 3 LSAs—one for each prefix. With summarization, the ABR can advertise a single 10.1.0.0/22 summary, covering all four networks with one LSA.
Summarization Benefits:
Summarization Configuration:
Summarization is configured on ABRs using commands like (example syntax):
router ospf 1
area 1 range 10.1.0.0 255.255.252.0
This command tells the ABR: 'When advertising routes from Area 1 to other areas, if routes fall within 10.1.0.0/22, advertise only the aggregate instead of individual routes.'
Critical Consideration: Null Route (Discard Route)
When you configure summarization, the ABR automatically installs a Null0 route (discard route) for the summary prefix. This prevents routing loops if traffic arrives for an address within the summary range that doesn't actually exist. Without this, packets for nonexistent addresses would bounce between routers.
Summarization hides details—which is both its power and its risk. If you summarize 10.1.0.0/22 but only 10.1.0.0/24 and 10.1.1.0/24 actually exist, traffic to 10.1.2.0/24 will reach the ABR and be discarded (Null0 route). This is correct behavior, but it can mask configuration issues. Also, sub-optimal routing can occur if the summary doesn't accurately reflect network topology. Plan summarization carefully with contiguous address allocation.
Designing for Summarization:
Effective summarization requires hierarchical IP addressing:
Beyond standard areas and the backbone, OSPF defines special area types that further reduce LSDB size by limiting which LSAs are allowed. These area types are particularly useful for branch offices and remote sites with limited router resources.
The Problem with External Routes:
In networks connected to the Internet or other external routing domains, OSPF may carry thousands of external routes (via Type 5 LSAs). Every router in the domain stores these LSAs—even branch office routers that only need default routes to reach external destinations.
Area Types Overview:
| Area Type | Type 5 LSAs | Type 3 LSAs | Type 7 LSAs | Default Route | Use Case |
|---|---|---|---|---|---|
| Normal | Allowed | Allowed | N/A | Optional | Standard operation |
| Stub | Blocked | Allowed | Blocked | Injected by ABR | No external routes needed |
| Totally Stubby | Blocked | Blocked* | Blocked | Injected by ABR | Only need default route |
| NSSA | Blocked | Allowed | Allowed | Optional | Has local redistribution |
| Totally NSSA | Blocked | Blocked* | Allowed | Injected by ABR | Local redistribution, minimal LSDB |
Totally stubby areas block Type 3 except the default route (0.0.0.0/0)
Stub Areas:
A stub area filters out all Type 5 (AS External) LSAs. Instead, the ABR injects a default route (0.0.0.0/0) as a Type 3 LSA. Routers within the stub area use this default for all external destinations.
Requirements:
Totally Stubby Areas (Cisco Proprietary):
A totally stubby area takes filtering further—blocking both Type 5 and Type 3 LSAs (except the default). Routers only receive:
This minimizes LSDB to the extreme—perfect for resource-constrained branch routers.
NSSAs solve a specific problem: What if you need stub area LSA filtering, but you also have an ASBR within the area that must redistribute external routes? NSSAs allow local redistribution using Type 7 LSAs (which stay within the NSSA), while still blocking Type 5 LSAs from entering. At the ABR, Type 7 LSAs are converted to Type 5 for propagation to other areas.
Designing OSPF areas requires balancing multiple considerations: scalability, convergence speed, administrative boundaries, and addressing constraints. These best practices emerge from decades of enterprise deployment experience.
Sizing Guidelines:
| Metric | Guideline | Rationale |
|---|---|---|
| Routers per area | 50-200 | Balances LSDB size with area management overhead |
| ABRs per area | 2-4 | Redundancy without excessive Type 3 LSAs |
| Maximum areas | 3-4 per ABR | ABR CPU/memory for multiple LSDBs |
| LSAs per area | <10,000 | Practical LSDB management limit |
| Backbone routers | Minimize | Backbone stability is paramount |
Design Principles:
Never compromise Area 0 stability. If you must perform maintenance on backbone routers, ensure redundant paths exist. A partitioned backbone doesn't just slow convergence—it can completely break inter-area routing. Consider the backbone as your routing system's spine; protect it accordingly.
Common Design Patterns:
1. Hub-and-Spoke (Classic Enterprise)
2. Multi-Campus (Large Enterprise)
3. Data Center (Modern)
Virtual links are OSPF's mechanism for extending Area 0 across a non-backbone transit area. They're a workaround for situations where physical backbone connectivity isn't possible—and should be understood as exactly that: a workaround, not a design feature.
When Virtual Links Are Used:
How Virtual Links Work:
A virtual link is configured between two ABRs across a transit area. The transit area must be a regular area (not stub/NSSA). The virtual link creates a logical point-to-point connection belonging to Area 0, making both endpoints backbone routers.
Configuration Example:
! On ABR1 (Router ID 1.1.1.1)
router ospf 1
area 1 virtual-link 2.2.2.2
! On ABR2 (Router ID 2.2.2.2)
router ospf 1
area 1 virtual-link 1.1.1.1
The virtual link is identified by the remote ABR's Router ID and the transit area number.
Virtual links add complexity and potential failure points. Issues include: (1) If the transit area has problems, the virtual link fails, (2) Hello timers and authentication must match across the virtual link, (3) Troubleshooting becomes harder as the logical topology differs from physical, (4) Some features (GR, BFD) may not work across virtual links. Always prefer physical backbone redesign over virtual links when possible.
OSPF's hierarchical area design is what transforms a protocol that could struggle at 100 routers into one that scales to thousands. We've explored the complete area architecture—from fundamental concepts to advanced area types. Let's consolidate the key knowledge:
What's Next:
With area hierarchy understood, we'll dive into the specifics of LSA types—the data structures that carry topology information within OSPF. You'll learn the seven primary LSA types, what each describes, where each floods, and how they work together to enable both intra-area and inter-area routing.
You now understand OSPF's hierarchical area design—the architecture that enables OSPF to scale from small networks to enterprise giants. This foundation is essential for understanding LSA types, OSPF troubleshooting, and designing production OSPF deployments. Next, we explore LSA types in comprehensive detail.