Open Shortest Path First is the dominant interior gateway protocol in large enterprise networks. Unlike distance-vector protocols, OSPF routers within an area maintain a synchronized link-state database describing every router, link, and network segment. Each router runs Dijkstra's shortest-path-first algorithm against this database to compute a local routing table. The approach provides fast convergence and loop-free routing, but the LSDB grows with topology size — making hierarchical area design essential for networks beyond a few dozen routers.
OSPF divides an autonomous system into areas connected through a mandatory backbone, area 0. All inter-area traffic must traverse area 0, either directly or through virtual links in exceptional cases. This two-level hierarchy limits LSA flooding scope and reduces memory and CPU demands on individual routers. Poor area design is one of the most common causes of OSPF instability in enterprise environments that have grown through acquisition without revisiting routing architecture.
Area Types and LSA Behavior
Standard areas accept type 1 router LSAs, type 2 network LSAs, type 3 summary LSAs from ABRs, type 4 ASBR summary LSAs, and type 5 external LSAs. Stub areas block type 5 LSAs and instead receive a default route from the ABR, reducing database size in areas that need only reach external destinations through the backbone. Totally stubby areas go further by blocking type 3 LSAs except the default summary, keeping the LSDB minimal at the cost of visibility into specific inter-area routes.
Not-so-stubby areas allow limited external redistribution. An ASBR within an NSSA generates type 7 LSAs that the ABR converts to type 5 when advertising into the backbone. NSSA is useful when a remote site connects to a partner network or runs a local static redistribution without flooding type 5 LSAs throughout the entire standard area. Choose NSSA deliberately — mixing stub types within the same OSPF domain without documentation creates confusion during troubleshooting when expected routes are absent from the LSDB.
ABR Placement and Summarization
Area border routers sit at the boundary between areas and originate type 3 summary LSAs for reachable prefixes. Summarization at ABRs is the primary tool for scaling OSPF. Without summarization, every intra-area prefix propagates as an individual type 3 LSA into adjacent areas, bloating databases and increasing SPF calculation frequency. Configure summary-address statements on ABRs to advertise aggregated blocks rather than individual subnets.
Place ABRs on routers with sufficient CPU and memory — typically distribution-layer devices in a campus design or regional hub routers in a WAN. An ABR participates in SPF for every area it connects to, multiplying computational load. Avoid making heavily loaded WAN edge routers ABRs unless necessary. In data center designs, consider running OSPF entirely within area 0 for the fabric while using separate areas only for campus or WAN attachments.
Designing Area Boundaries
Align area boundaries with natural administrative and geographic divisions. A common campus design places the core in area 0 with each building or floor as a separate area connected through distribution switches acting as ABRs. WAN designs assign each major region its own area, with hub sites providing ABR connectivity to area 0. The goal is to keep any single area below fifty routers when possible and ensure no area spans a high-latency WAN link that could partition frequently.
Virtual links are a last resort for connecting areas that cannot reach area 0 directly. They tunnel area 0 connectivity through a transit area and add complexity to troubleshooting. If your design requires virtual links, reconsider whether the area assignment is correct. Networks that rely on multiple virtual links often indicate a fundamental topology mismatch with OSPF's hierarchical model.
Router Roles and LSA Generation
Internal routers participate in a single area and maintain one LSDB. Backbone routers have interfaces in area 0. Area border routers connect multiple areas. Autonomous system boundary routers inject external routes learned from other protocols or static configuration as type 5 or type 7 LSAs. Understanding which routers generate which LSA types is essential when debugging missing routes — a missing type 3 summary indicates an ABR problem, while a missing type 5 points to ASBR redistribution.
Designated router election on multi-access segments reduces LSA flooding by having one router generate the type 2 network LSA on behalf of the segment. Set router priority explicitly on interfaces where you want a specific device to become DR. In modern point-to-point WAN links configured as OSPF point-to-point networks, DR election is eliminated entirely, simplifying convergence behavior.
Tuning and Stability
OSPF timers affect convergence speed and stability. The default hello interval of ten seconds and dead interval of forty seconds suit most LAN environments. WAN links with occasional packet loss may benefit from longer timers to prevent false neighbor loss detection. BFD can provide sub-second failure detection without aggressive OSPF timer tuning, though both ends must support and enable it consistently.
Reference bandwidth determines how OSPF calculates interface costs. The default reference of 100 Mbps makes modern gigabit and ten-gigabit links appear equally cheap. Raise reference bandwidth to 100000 or higher so OSPF differentiates between link speeds in path selection. Failing to adjust reference bandwidth is a frequent oversight that causes suboptimal routing in networks with mixed interface speeds.
Documentation and Lifecycle
Maintain an area map showing every area ID, ABR placement, stub type, and summarization boundaries. Update it during every acquisition, data center migration, or major WAN redesign. Run periodic LSDB audits comparing LSA counts per area against baselines — sudden growth often indicates a summarization failure or a misconfigured redistribution. OSPF area design is not a one-time exercise; it is a living architecture that must evolve with the network it supports.
OSPF and BGP Interaction
When OSPF carries external routes from BGP redistribution, stub area design affects how external reachability propagates. Totally stubby areas depend entirely on default route from ABR for external and inter-area destinations — verify the default originates correctly and carries appropriate forwarding metric. NSSA areas with multiple ASBRs require careful default originate coordination to avoid asymmetric routing between ASBRs.
OSPF sham links connect VPN sites over MPLS backbone through virtual links appearing as intra-area paths, preventing suboptimal routing through backdoor links. Sham links are niche solutions for MPLS VPN integration that most modern designs replace with proper BGP VPN route exchange. Understand sham link existence in legacy designs during troubleshooting when VPN site routing behaves unexpectedly compared to pure OSPF expectations.
OSPFv3 for IPv6 can run in single-address-family mode or dual-address-family mode sharing a single SPF calculation. Modern deployments increasingly use OSPFv3 for both IPv4 and IPv6 rather than maintaining separate OSPFv2 and OSPFv3 processes. Verify platform support and migration procedures before consolidating protocols during dual-stack rollout.