Open Shortest Path First (OSPF) scales smoothly in small networks, where every router can share a single Link-State Database (LSDB) and compute the shortest path to every subnet independently. As an enterprise or service provider network expands to hundreds of routers and thousands of prefixes, however, keeping the entire Autonomous System (AS) in one flat flooding domain creates severe control-plane strain: databases bloat, routing tables swell, and a single flapping branch link forces every router in the network to rerun Dijkstra’s Shortest Path First (SPF) algorithm. Hierarchical OSPF—commonly called multi-area OSPF—solves this scalability wall by partitioning the routing domain into a structured two-tier hierarchy of areas anchored around a central transit backbone.
Table of Contents
How Hierarchical OSPF Works: Two-Tier Architecture and Router Roles
Hierarchical OSPF replaces a single flat flooding domain with logical boundaries that contain detailed link-state topology inside smaller routing zones while preserving end-to-end reachability across the AS. Understanding how it operates starts with its physical and logical layout, the specialized router roles that glue areas together, and how those boundaries protect control-plane stability.
1. The Two-Tier Area Topology
Unlike protocols that permit arbitrary chains of areas, OSPF enforces a strict two-tier hub-and-spoke hierarchy:
- Tier 1 — Backbone Area (Area 0 or
0.0.0.0): Serving as the central transit core of the OSPF domain, Area 0 aggregates and distributes routing information between all other areas. Area 0 must remain contiguous. - Tier 2 — Non-Backbone Areas (Regular and Special Areas): Numbered or dotted-decimal zones (such as Area 10, Area 20, or
0.0.0.10) that group localized network segments—such as a campus building, data center pod, or regional WAN hub. Every non-backbone area must connect directly to Area 0, and all inter-area traffic must transit Area 0 to prevent inter-area routing loops.
2. Specialized OSPF Router Roles
In a hierarchical topology, OSPF classifies routers according to where their active interfaces sit across area boundaries:
- Internal Router: Has all OSPF-enabled interfaces assigned to the same single area. It maintains only one LSDB for that area and stays completely unaware of physical link topologies elsewhere.
- Backbone Router: Has at least one interface assigned to Area 0. This category includes routers residing purely inside the core as well as border routers straddling Area 0 and subordinate areas.
- Area Border Router (ABR): Connects Area 0 to one or more non-backbone areas. An ABR maintains a separate LSDB and runs an independent SPF instance for each attached area, hides granular link-by-link topology from neighboring areas, and advertises condensed prefix reachability across the boundary.
- Autonomous System Boundary Router (ASBR): Connects the OSPF domain to external routing protocols (such as BGP, EIGRP, IS-IS, or static routes) and redistributes external prefixes into OSPF. An ASBR can reside in Area 0 or inside a non-backbone area (excluding standard stub areas).
3. Isolating SPF Recalculations
Inside any single area, every router must maintain an identical LSDB and execute a full Dijkstra SPF calculation whenever a link changes state. By placing ABRs between Area 0 and subordinate areas, hierarchical OSPF hides raw link states behind inter-area prefix advertisements. When an access-layer link flaps inside Area 10, only routers inside Area 10 run a full SPF calculation. Routers in Area 0 and Area 20 merely process a lightweight incremental distance-vector-style metric update—or receive zero updates at all when route summarization is configured on the ABR.
Containing full topological graphs behind ABR boundaries relies directly on how OSPF classifies and filters Link-State Advertisements (LSAs).
LSA Flooding Boundaries and Stub Area Filtering
ABRs enforce hierarchy by controlling which LSA types stop at the area border, which ones cross into the backbone, and which ones get blocked altogether in resource-constrained edge areas.
1. Intra-Area Containment (Type 1 and Type 2 LSAs)
Granular topological data stays strictly confined within the originating area and never crosses an ABR:
- Type 1 (Router LSA): Generated by every router to list its active links, neighbor adjacencies, and interface costs within an area. Flooded only inside that area.
- Type 2 (Network LSA): Generated by the Designated Router (DR) on multi-access broadcast or NBMA segments to list all attached routers on the subnet. Flooded only inside that area.
2. Inter-Area and External Propagation (Type 3, 4, 5, and 7 LSAs)
To advertise reachability beyond a single area without leaking raw link-state graphs, OSPF uses summary and external LSAs:
- Type 3 (Summary LSA): Originated by an ABR to advertise intra-area prefixes from one area into Area 0 (and from Area 0 into other areas) along with the cumulative cost to reach them. Appear as
O IAroutes in routing tables. - Type 4 (ASBR Summary LSA): Originated by an ABR when an ASBR sits inside a non-backbone area, advertising the path cost to reach that ASBR’s Router ID so remote areas can resolve external next hops.
- Type 5 (AS External LSA): Originated by an ASBR for redistributed external networks (
O E1orO E2). Floods unaltered across Area 0 and all standard areas. - Type 7 (NSSA External LSA): Originated by an ASBR placed inside a Not-So-Stubby Area (
O N1orO N2). Floods only within that NSSA until the NSSA ABR translates it into a Type 5 LSA for the rest of the domain.
3. Shrinking Edge Routing Tables with Stub Area Types
Non-backbone edge areas that have only one exit path (or dual redundant ABRs leading solely toward the core) rarely need thousands of specific external or inter-area prefixes. Converting standard areas into special stub variants strips unnecessary LSAs and replaces them with a compact default route (0.0.0.0/0). Area 0 itself can never be configured as any stub type.
- Stub Area: Blocks Type 4 and Type 5 external LSAs at the ABR, automatically injecting a single Type 3 default route (
0.0.0.0/0) while still permitting specific Type 3 inter-area routes. Every router inside the area must share thestubflag so OSPF Hello packets match the ExternalRoutingCapability (E) bit. - Totally Stubby Area: Blocks Type 3 inter-area summaries as well as Type 4 and Type 5 external LSAs, injecting only a single Type 3 default route (
0.0.0.0/0). Internal routers keep only local Type 1/2 routes plus one default exit, minimizing memory consumption on small branch routers. - Not-So-Stubby Area (NSSA): Blocks incoming Type 4 and Type 5 external LSAs like a standard stub area, but allows a local ASBR (such as a branch router with a regional partner or DIA circuit) to inject external routes via Type 7 LSAs. Note that in standard NSSA implementations (such as Cisco IOS), the ABR does not inject a default route automatically unless explicitly configured (
default-information-originate). - Totally NSSA (Totally Stubby NSSA): Combines Totally Stubby and NSSA behavior—blocking incoming Type 3, Type 4, and Type 5 LSAs, allowing local Type 7 redistribution, and automatically injecting a single Type 3 default route (
0.0.0.0/0) from the ABR.
Understanding how multi-area boundaries contain LSAs clarifies the operational trade-offs between running a simple flat OSPF domain and introducing hierarchy.
Single-Area vs. Hierarchical OSPF: Key Differences and When to Migrate
Adding area boundaries reduces control-plane churn at the expense of stricter topology planning and suboptimal path risks if ABR metrics are poorly tuned. The comparison below evaluates flat single-area OSPF against multi-area hierarchical OSPF across core engineering criteria.
| Evaluation Criteria | Flat Single-Area OSPF (Area 0 Only) | Multi-Area Hierarchical OSPF |
|---|---|---|
| Topology Structure | Unstructured mesh or hub-and-spoke; all interfaces belong to a single area | Strict two-tier design: central Area 0 backbone with attached subordinate areas |
| Network Scalability | Best suited for small-to-midsize deployments (typically under 50–100 routers) | Scales to hundreds or thousands of routers across global enterprise campuses and WANs |
| LSDB Memory Footprint | High on every router; all nodes store identical Type 1/2 topological entries for the whole AS | Low on internal routers; full LSDBs are scoped strictly per area (only ABRs hold multiple LSDBs) |
| Control-Plane CPU (SPF Load) | High; any physical link flap anywhere in the domain triggers network-wide SPF recalculation | Contained; full Dijkstra SPF calculations remain isolated inside the area where the link changed |
| Topology Fault Isolation | None; unstable access or WAN circuits impact core and remote routers alike | Strong; unstable links in non-backbone areas are masked from the core, especially when summarized |
| Route Summarization | External routes only (at ASBRs); intra-area routes cannot be summarized anywhere | Supported at both ABRs (inter-area Type 3 collapse) and ASBRs (external Type 5/7 collapse) |
| Routing Optimality | Always optimal end-to-end shortest path because every router sees the complete link graph | Potentially suboptimal if ABR summarization hides metric granularity across dual-ABR exits |
| Administrative Complexity | Minimal; simple interface assignment with no Area 0 contiguity rules or virtual links | Moderate to high; requires contiguous IP blocks per area, ABR placement planning, and stub tuning |
| Primary Migration Trigger | Default starting point for single-site campuses or small cores | Migrate when router count exceeds ~50–100, WAN churn degrades CPU, or edge FIB/RIB limits hit capacity |
While hierarchical OSPF solves single-area scaling limits, architects building large enterprise cores or service provider backbones often weigh OSPF’s rigid Area 0 rules against alternative Interior Gateway Protocols (IGPs).
Hierarchical OSPF vs. IS-IS vs. EIGRP for Large-Scale Networks
Hierarchical OSPF is not the only IGP capable of partitioning large routing domains. Multi-level Intermediate System to Intermediate System (IS-IS) and Enhanced Interior Gateway Routing Protocol (EIGRP) take fundamentally different approaches to boundary placement, summarization, and protocol transport.
| Architectural Criteria | Hierarchical OSPF (OSPFv2 / OSPFv3) | Multi-Level IS-IS | EIGRP |
|---|---|---|---|
| Algorithm & Protocol Class | Link-State (Dijkstra SPF within areas; distance-vector behavior across ABRs) | Link-State (Dijkstra SPF within Level 1 areas and across the Level 2 backbone) | Advanced Distance-Vector / Hybrid (DUAL — Diffusing Update Algorithm) |
| Hierarchy Model | Strict two-tier: Backbone Area 0 plus directly attached non-backbone areas | Flexible two-tier: contiguous Level 2 (L2) backbone plus Level 1 (L1) localized areas | Arbitrary hierarchy; no mandatory Area 0 or two-tier structural restriction |
| Boundary Placement | On routers (ABRs): interfaces of one ABR sit in different areas simultaneously | On links: each router belongs wholly to a single area (via its NET); L1/L2 routers bridge levels | On any interface: boundaries exist wherever an engineer applies summarization or stub filtering |
| Route Summarization | Strictly at ABRs (area range) and ASBRs (summary-address) | At L1/L2 boundary routers between Level 1 and Level 2 domains | At any router interface anywhere in the network (ip summary-address eigrp) |
| Transport Encapsulation | Directly over IP (IP Protocol 89) | Directly over Layer 2 Data Link / CLNS (immune to IP transit spoofing attacks) | Directly over IP (IP Protocol 88) |
| IPv4 / IPv6 Handling | Separate OSPFv2 (IPv4) and OSPFv3 (IPv6, or dual-stack via RFC 5838 Address Families) | Single unified routing instance using extensible Type-Length-Value (TLV) attributes | Named-mode EIGRP supports IPv4 and IPv6 address families under one configuration hierarchy |
| Vendor Interoperability | Universal open standard supported by virtually every networking vendor | Universal open standard across core, data center, and service provider hardware | Cisco-dominated ecosystem (published as informational RFC 7868, limited third-party support) |
| Ideal Deployment Fit | Multi-vendor enterprise campuses, WAN cores, and segmented branch networks | Service provider backbones, MPLS/SRv6 cores, and hyperscale leaf-spine data centers | Cisco-standardized enterprise WANs needing arbitrary-point summarization and fast backup paths |
Because IS-IS places area boundaries on links rather than splitting routers across areas, renumbering or merging areas causes less disruption in massive carrier backbones, whereas OSPF remains the enterprise standard due to pervasive multi-vendor operational familiarity. If hierarchical OSPF is your chosen IGP, following disciplined sizing and addressing rules prevents scalability bottlenecks before deployment begins.
Enterprise Design Best Practices and Scalability Limits
Designing a resilient multi-area OSPF network requires balancing area size, ABR processing load, path symmetry, and IP address allocation.
1. Right-Size Routers and Adjacencies per Area
Historically, network design guides capped OSPF areas at roughly 50 routers. Modern control-plane CPUs combined with Incremental SPF (iSPF) and Prefix Suppression can comfortably sustain 100 to 300 routers in a stable area, provided neighbor counts per broadcast segment remain modest. Even so, bounding enterprise areas to 50–100 routers aligned with physical failure domains (such as a campus distribution block or regional WAN hub) remains the gold standard. Pay equally close attention to adjacency density: a single DMVPN or SD-WAN hub maintaining 200 OSPF neighbors in one area generates massive Router LSAs and flooding overhead even if total router count seems moderate.
2. Cap Areas per ABR at Two or Three
Every area attached to an ABR adds another independent LSDB in memory, another set of SPF timers, and extra Type 3 summary generation work. Limit each ABR to 2 or 3 areas maximum (Area 0 plus one or two non-backbone areas). If a campus core aggregates ten separate building areas, distribute those areas across modular distribution ABR pairs rather than terminating all ten areas on a single pair of core switches.
3. Deploy Dual ABRs and Normalize Reference Bandwidth
Never rely on a single ABR for a production area. Deploy redundant pairs of ABRs per non-backbone area so an ABR hardware failure or maintenance reload never isolates downstream subnets. In addition, OSPF’s legacy default reference bandwidth (100 Mbps) assigns an identical cost of 1 to 100M, 1G, 10G, 40G, and 100G interfaces. Configure auto-cost reference-bandwidth identically across every router in the OSPF domain (for example, 100000 for 100 Gbps cores or 1000000 for 1 Tbps cores) so ABRs advertise accurate path metrics.
4. Allocate Contiguous CIDR Blocks per Area
Hierarchical OSPF achieves maximum stability only when ABRs collapse dozens of intra-area subnets into one summary prefix. If Area 10 and Area 20 contain interleaved /24 subnets out of the same /16 block, ABR summarization causes overlapping summary advertisements and blackholed traffic. Assign clean, bit-aligned CIDR supernets to each area—such as 10.10.0.0/16 for Area 10 and 10.20.0.0/16 for Area 20—leaving growth room for future VLANs.
With contiguous CIDR blocks and ABR boundaries planned, configuring multi-area OSPF and inter-area summarization requires just a few deterministic CLI steps.
Step-by-Step Guide: Configuring Hierarchical OSPF and ABR Route Summarization
The walkthrough below configures a three-router Cisco IOS/IOS-XE topology: R1-Core (in Area 0), R2-ABR (straddling Area 0 and Area 10), and R3-Internal (in Area 10 hosting subnets 10.10.1.0/24 through 10.10.3.0/24, with the R2–R3 transit link using 10.10.0.0/30). All Area 10 prefixes fit cleanly inside the contiguous summary block 10.10.0.0/22.
Step 1: Initialize OSPF Processes and Deterministic Router IDs
Assign explicit 32-bit Router IDs and a consistent reference bandwidth (10000 for 10 Gbps links in this example) on all three routers so interface changes never alter router identity or path costing:
! On R1-Core
router ospf 1
router-id 1.1.1.1
auto-cost reference-bandwidth 10000
! On R2-ABR
router ospf 1
router-id 2.2.2.2
auto-cost reference-bandwidth 10000
! On R3-Internal
router ospf 1
router-id 3.3.3.3
auto-cost reference-bandwidth 10000
Step 2: Assign Interfaces to Area 0 and Area 10
Enabling OSPF directly on interfaces (ip ospf <process-id> area <area-id>) avoids wildcard mask mistakes in router-mode network statements. Setting ip ospf network point-to-point on /30 routed links eliminates unnecessary 40-second DR/BDR elections and Type 2 Network LSAs:
! On R1-Core (Area 0 Backbone Only)
interface GigabitEthernet0/0
description Core-Link-to-R2-ABR
ip address 10.0.12.1 255.255.255.252
ip ospf network point-to-point
ip ospf 1 area 0
! On R2-ABR (Bridging Area 0 and Area 10)
interface GigabitEthernet0/0
description Core-Link-to-R1-Core
ip address 10.0.12.2 255.255.255.252
ip ospf network point-to-point
ip ospf 1 area 0
!
interface GigabitEthernet0/1
description Transit-Link-to-R3-Internal
ip address 10.10.0.1 255.255.255.252
ip ospf network point-to-point
ip ospf 1 area 10
! On R3-Internal (Area 10 Internal Subnets)
interface GigabitEthernet0/1
description Transit-Link-to-R2-ABR
ip address 10.10.0.2 255.255.255.252
ip ospf network point-to-point
ip ospf 1 area 10
!
interface GigabitEthernet0/2.10
encapsulation dot1Q 10
ip address 10.10.1.1 255.255.255.0
ip ospf 1 area 10
!
interface GigabitEthernet0/2.20
encapsulation dot1Q 20
ip address 10.10.2.1 255.255.255.0
ip ospf 1 area 10
!
interface GigabitEthernet0/2.30
encapsulation dot1Q 30
ip address 10.10.3.1 255.255.255.0
ip ospf 1 area 10
Step 3: Configure Inter-Area Route Summarization on the ABR
Without summarization, R2-ABR originates four separate Type 3 Summary LSAs into Area 0. Apply area <source-area> range <prefix> <subnet-mask> on R2-ABR to collapse them into one /22 summary:
! On R2-ABR only
router ospf 1
area 10 range 10.10.0.0 255.255.252.0
Keep two operational rules in mind when configuring area range:
* Standard Subnet Mask & Source Area: Unlike network commands, area range requires a standard dotted-decimal subnet mask (255.255.252.0), and the area ID (10) specifies the area containing the component subnets being summarized. (By contrast, summary-address applies solely to external Type 5/7 route summarization on an ASBR.)
* Automatic Loop-Prevention Discard Route: As soon as at least one subordinate subnet inside 10.10.0.0/22 is active in Area 10, R2-ABR automatically installs a local O 10.10.0.0/22 is a summary, Null0 discard route so packets destined for unused addresses inside the /22 range are dropped cleanly instead of looping toward a default route.
Step 4: Verify ABR Status and Summarized Routes
Confirm full neighbor adjacencies and ABR activation on R2-ABR, then inspect the routing table on R1-Core:
R2-ABR# show ip ospf | include Border|Area
It is an area border router
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Area BACKBONE(0)
Area 10
R1-Core# show ip route ospf
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O IA 10.10.0.0/22 [110/30] via 10.0.12.2, 00:02:14, GigabitEthernet0/0
R1-Core installs a single inter-area (O IA) /22 summary route—and if Gi0/2.20 flaps on R3-Internal, R1-Core experiences zero routing table or LSA churn.
Even well-configured multi-area deployments can break during network mergers, fiber cuts, or unplanned expansions that violate OSPF’s Area 0 contiguity rules.
Troubleshooting Discontiguous Area 0 and Missing Inter-Area Routes
When inter-area routes vanish from OSPF routing tables despite healthy FULL neighbor adjacencies on every link, the root cause is almost always a broken hierarchical topology: either a non-backbone area is attached to another non-backbone area instead of Area 0, or Backbone Area 0 itself has split into two disconnected islands.
1. Why Inter-Area Route Propagation Stops
Two protocol mechanisms block inter-area routes when Area 0 continuity breaks:
- Orphaned Non-Backbone Area (No Active Area 0 Interface): Suppose
Area 20connects toR3, which connects only toArea 10(for example, after an acquisition). Even thoughR3touches two areas, major vendor implementations (including Cisco and IBM, documented in RFC 3509 covered below) do not consider a router an active ABR unless it has at least one operational interface in Area 0. Consequently,R3refuses to originate Type 3 Summary LSAs between Area 10 and Area 20. - Partitioned Area 0: Suppose two separate Area 0 islands connect through transit
Area 10. Under OSPF loop-prevention rules, an ABR connected to Area 0 ignores Type 3 Summary LSAs learned over a non-backbone area when calculating inter-area routes—preventing prefixes in one Area 0 island from crossing Area 10 into the other Area 0 island.
2. Diagnosing the Break via CLI
Run three targeted verification commands on the suspected border router:
show ip ospf: Check whether"It is an area border router"appears in the output and confirmArea BACKBONE(0)has at least one active interface. IfArea BACKBONE(0)is absent or inactive, the router will not generate Type 3 LSAs.show ip ospf database summary: Inspect whether Type 3 LSAs exist in the LSDB. If Type 3 LSAs appear in the database on an ABR but never entershow ip route ospf, the ABR is ignoring non-backbone summaries because it already has an active Area 0 connection elsewhere (a classic symptom of partitioned Area 0).show ip ospf border-routers: Verify reachability (iintra-area vsIinter-area) to remote ABRs and ASBRs.
3. Tactical Fix: Configuring an OSPF Virtual Link
An OSPF Virtual Link logically extends Area 0 across a shared non-backbone transit area (Area 10) between two border routers (R2-ABR1 with Router ID 2.2.2.2 in Area 0/Area 10, and R3-ABR2 with Router ID 3.3.3.3 in Area 10/Area 20):
! On R2-ABR1 (Connected to physical Area 0 and Transit Area 10)
router ospf 1
area 10 virtual-link 3.3.3.3
! On R3-ABR2 (Connected to Transit Area 10 and Orphaned Area 20)
router ospf 1
area 10 virtual-link 2.2.2.2
Ensure all three virtual-link prerequisites are satisfied, or the adjacency will stay down:
* Specify the non-zero transit area ID (area 10), never area 0.
* Point to the peer router’s OSPF Router ID (3.3.3.3), never its physical interface IP address.
* Confirm the transit area (Area 10) is a standard area—Stub, Totally Stubby, and NSSA areas cannot carry virtual links because they lack full routing capability.
Verify operation with show ip ospf virtual-links:
R3-ABR2# show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
Run as demand circuit
DoNotAge LSA allowed.
Transit area 10, via interface GigabitEthernet0/1, Cost of using 10
Adjacency State FULL (Hello suppressed)
4. Strategic Fix: GRE Tunneling or Area Redesign
Treat OSPF virtual links strictly as temporary tactical bridges during M&A integrations or extended fiber outages. If the transit area is a Stub/NSSA area or if you need a cleaner overlay while awaiting physical re-cabling, build a GRE tunnel (optionally IPsec-protected) between the two routers and assign the Tunnel interfaces directly to ip ospf 1 area 0 (making sure the tunnel destination IPs resolve via intra-area Area 10 routes, never over Area 0, to avoid recursive routing flaps). Long term, re-home physical circuits to Area 0 or merge the orphaned area into the adjacent area.
To test normal summarization, stub filtering, and virtual links hands-on, use the simulator topology and CLI boilerplate below.
Lab Topology Blueprint and Reusable CLI Configuration Template
Wire the following four-router topology in Cisco Packet Tracer, GNS3, EVE-NG, or Cisco Modeling Labs (CML), then apply the fill-in-the-blank configuration template to deploy or practice hierarchical OSPF:
[R1-HQ-Core] (Area 0: Lo0 10.0.0.1/32)
| \
| \--- Gi0/1 (10.0.13.0/30, Area 0) ---> [R3-ABR2] (RID 3.3.3.3)
| |
Gi0/0 (10.0.12.0/30, Area 0) Gi0/2 (10.20.0.0/30, Area 20 NSSA)
| |
v v
[R2-ABR1] (RID 2.2.2.2) [R4-Branch-ASBR] (RID 4.4.4.4)
| (Area 20 NSSA + Static 198.51.100.0/24)
Gi0/2 (10.10.0.0/24, Area 10 Totally Stubby)
! =====================================================================
! 1. CORE BACKBONE ROUTER TEMPLATE (Area 0 Only)
! =====================================================================
router ospf <PROCESS_ID>
router-id <CORE_ROUTER_ID>
auto-cost reference-bandwidth 100000
passive-interface default
no passive-interface <CORE_UPLINK_INTF>
!
interface Loopback0
ip address <LOOPBACK_IP> 255.255.255.255
ip ospf <PROCESS_ID> area 0
!
interface <CORE_UPLINK_INTF>
description Core-Backbone-P2P
ip address <LINK_IP> 255.255.255.252
ip ospf network point-to-point
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 <AUTH_KEY>
ip ospf <PROCESS_ID> area 0
bfd interval 100 min_rx 100 multiplier 3
ip ospf bfd
! =====================================================================
! 2. AREA BORDER ROUTER (ABR) TEMPLATE (Area 0 + Summarized/Stub Area)
! =====================================================================
router ospf <PROCESS_ID>
router-id <ABR_ROUTER_ID>
auto-cost reference-bandwidth 100000
passive-interface default
no passive-interface <AREA0_INTF>
no passive-interface <SUB_AREA_INTF>
! Collapse intra-area prefixes before flooding into Area 0:
area <AREA_ID> range <SUMMARY_NET> <SUMMARY_SUBNET_MASK>
! Choose ONE special area mode if edge filtering is desired:
! area <AREA_ID> stub no-summary
! area <AREA_ID> nssa no-summary
!
interface <AREA0_INTF>
ip address <AREA0_LINK_IP> 255.255.255.252
ip ospf network point-to-point
ip ospf <PROCESS_ID> area 0
!
interface <SUB_AREA_INTF>
ip address <SUB_AREA_LINK_IP> 255.255.255.252
ip ospf network point-to-point
ip ospf <PROCESS_ID> area <AREA_ID>
! =====================================================================
! 3. INTERNAL / NSSA BRANCH ROUTER TEMPLATE (Subordinate Area Only)
! =====================================================================
router ospf <PROCESS_ID>
router-id <BRANCH_ROUTER_ID>
auto-cost reference-bandwidth 100000
passive-interface default
no passive-interface <UPLINK_TO_ABR_INTF>
! Must match ABR area flag (omit "no-summary" on internal routers):
! area <AREA_ID> stub
! area <AREA_ID> nssa
! Optional ASBR external route redistribution inside standard/NSSA area:
! redistribute static subnets
!
interface <UPLINK_TO_ABR_INTF>
ip address <BRANCH_LINK_IP> 255.255.255.252
ip ospf network point-to-point
ip ospf <PROCESS_ID> area <AREA_ID>
!
interface <LAN_INTF>
ip address <LAN_GATEWAY_IP> <LAN_SUBNET_MASK>
ip ospf <PROCESS_ID> area <AREA_ID>
For protocol developers and architects verifying vendor interoperability or edge-case compliance, the IETF Request for Comments (RFC) documents below serve as the canonical specifications for hierarchical OSPF.
Official IETF RFC Specifications for Hierarchical OSPF
- RFC 2328 — OSPF Version 2 (STD 54): Authoritative base specification for OSPFv2. Section 3 (“Splitting the AS into Areas”) defines the two-level backbone (
0.0.0.0) and area hierarchy, Section 3.3 establishes router classifications (Internal, ABR, Backbone, ASBR), Section 3.6 defines Stub Area constraints, Section 12.4.3 governs Summary-LSA origination, and Section 15 specifies Virtual Link mechanics. Official URI:https://datatracker.ietf.org/doc/html/rfc2328 - RFC 3509 — Alternative Implementations of OSPF Area Border Routers: Informational specification formalizing Cisco Systems and IBM ABR behavior deviations from strict RFC 2328. Under RFC 2328, any router attached to two or more areas qualifies as an ABR; under RFC 3509, a router neither considers itself an active ABR nor originates Type 3/Type 4 Summary LSAs unless it maintains at least one actively attached interface (Cisco) or full adjacency (IBM) in Area 0, preventing blackholes and suboptimal transit across non-backbone areas. Official URI:
https://datatracker.ietf.org/doc/html/rfc3509 - RFC 3101 — The OSPF Not-So-Stubby Area (NSSA) Option: Standards-track specification (obsoleting RFC 1587) defining Type 7 NSSA-LSA encoding, the
P(Propagate) bit, NSSA default route origination, and NSSA ABR election rules for translating Type 7 LSAs into Type 5 AS-External-LSAs. Official URI:https://datatracker.ietf.org/doc/html/rfc3101 - RFC 5340 — OSPF for IPv6 (OSPFv3) & RFC 5838 (Address Families): Standards-track specifications adapting OSPF to IPv6 and dual-stack multi-AF transport while preserving the exact RFC 2328 two-tier Area 0 architecture, ABR boundaries, stub filtering, and virtual link rules, replacing Type 3/Type 4 LSAs with Inter-Area-Prefix-LSAs (
0x2003) and Inter-Area-Router-LSAs (0x2004). Official URIs:https://datatracker.ietf.org/doc/html/rfc5340andhttps://datatracker.ietf.org/doc/html/rfc5838
Conclusion
Hierarchical OSPF transforms a flat link-state flooding domain into a resilient, scalable enterprise routing fabric by anchoring non-backbone areas to a contiguous Area 0 core. When paired with contiguous CIDR address planning, ABR route summarization, dual-ABR redundancy, and stub or NSSA filtering at the network edge, it contains Dijkstra SPF recalculations locally and keeps routing tables compact even across hundreds of routers. Start with flat Area 0 for small deployments, and introduce hierarchical areas along natural failure boundaries with clean supernet boundaries as your topology scales.












Comments