Cisco IOS Multi-area OSPF
Multi-area OSPF configuration with route summarization, stub/NSSA areas, redistribution, and passive interfaces for Cisco IOS/IOS-XE routers.
What is it?
OSPF (Open Shortest Path First) is a link-state routing protocol that uses Dijkstra's algorithm to calculate the shortest path to each destination in the network. It's an open standard (RFC 2328), which means it works across routers from different vendors — Cisco, Juniper, Arista, Palo Alto, and others all speak OSPF. Each router builds a complete map of the network (the LSDB — Link State Database) and independently calculates its best paths. When a link fails, OSPF reconverges typically in under 5 seconds.
When to use
- ·Medium to large enterprise networks with multiple routers (5+)
- ·Multi-vendor environments where EIGRP is not an option
- ·When you need fast convergence after a link failure (sub-5 seconds with BFD)
- ·Internal routing within your organization (IGP) — between your own routers
- ·Data center fabrics and campus networks with redundant paths
- ·When you need to segment the network into areas to reduce LSA flooding
When NOT to use
- ·Connecting to your ISP — use BGP instead (OSPF is for internal routing only)
- ·Very small networks with 1–3 routers — static routes are simpler and sufficient
- ·Cisco-only environments where EIGRP is already running — no reason to migrate
- ·When you need routing policies between organizations — BGP is designed for that
How it compares
Prerequisites
- →All interfaces must have IP addresses configured before adding OSPF network statements
- →Router IDs must be unique across all OSPF routers in the same domain
- →Area 0 (backbone area) must exist — all other areas must connect to Area 0 directly or via a virtual link
- →MTU must match on connected interfaces (mismatch causes EXSTART/EXCHANGE stuck state)
- →Hello and Dead timers must match between neighbors (default: 10/40 on Ethernet, 30/120 on serial)
- →Minimum IOS version: 12.0 for basic OSPF; IOS-XE 3.x for BFD integration
Config Generator
Recommended for spoke routers — suppresses Hello on all interfaces then re-enables per active link.
Verification commands
show ip ospf neighborVerify neighbor adjacency is FULL
ExpectedState should show FULL/DR, FULL/BDR, or FULL/ - (for point-to-point). Any other state means adjacency is not complete.
show ip ospf interface briefVerify which interfaces are running OSPF and their state
ExpectedShows area assignment, cost, and neighbor count per interface. Passive interfaces show as Passive.
show ip route ospfVerify OSPF routes are being installed in the routing table
ExpectedRoutes marked with O (intra-area) or O IA (inter-area). If empty, check adjacency and network statements.
show ip ospf databaseView the LSDB — the complete network map OSPF has built
ExpectedShould show Router LSAs from all routers in the area. Missing entries indicate flooding or adjacency issues.
show ip ospfShow OSPF process summary — Router ID, area count, SPF runs
ExpectedVerify Router ID is correct and matches what you configured. High SPF run count may indicate instability.
Debug commands
debug ip ospf adjDebug adjacency formation — shows Hello exchange and state transitions
WarningUse with caution in production. Always run 'undebug all' immediately after. On a busy router this can generate heavy output.
debug ip ospf eventsShows all OSPF events including SPF triggers and LSA flooding
WarningVery verbose. Use only on a quiet router or in a maintenance window. Always 'undebug all' after.
Common mistakes & fixes
Further learning
Recommended books to go deeper on this topic.
OSPF: Anatomy of an Internet Routing Protocol
John T. Moy · Addison-Wesley · The protocol from its author: LSA types, flooding, SPF and the design reasoning behind them
Routing TCP/IP, Volume 1
Jeff Doyle & Jennifer Carroll · Cisco Press · The definitive OSPF and IS-IS reference — essential for CCNP/CCIE
CCNP Enterprise Core ENCOR 350-401 Official Cert Guide
Brad Edgeworth et al. · Cisco Press · OSPF single-area, multi-area, LSA types, route summarization