Projects
Writings
Log
Knowledge
Contact

Cisco IOS Field Notes: OSPFv2

February 14, 2026

Single and multi-area OSPFv2 design, adjacency mechanics, cost modeling and real-world Cisco IOS troubleshooting.

This article is being continuously updated - consider it a work in progress! [2026-03-03]

//
OSPF is defined in RFC 2328 (STD 54). Numerous later RFCs extend or update specific behaviors, including authentication, LLS, and security considerations.

ACT I — Control Plane Model

OSPF as a Distributed Graph Computation System

OSPF (Open Shortest Path First) is an Interior Gateway Protocol (IGP) that builds a synchronized network graph and derives forwarding decisions by computing a shortest-path tree using Dijkstra’s SPF algorithm.

Unlike distance-vector protocols (such as RIP), OSPF does not exchange routes. It exchanges topology information and derives routes from a synchronized graph model; it is hence more like a distributed network synchronization system.

OSPF is a link-state protocol - and that classification is fundamental since that OSPF is event-driven, dynamic, and autonomously convergent:

  • Event-driven because topology changes trigger incremental LSA flooding and SPF recalculation.
  • Dynamic because neighbor and database state continuously adapt to link and node conditions (hence link-state).
  • Autonomously convergent because each router independently recomputes shortest paths from the synchronized LSDB until the network reaches a stable equilibrium (and it does this pretty fast!).

OSPF is an eventually consistent topology replication system with bounded failure domains (areas).

TAKEAWAY

OSPF does not exchange routes — it exchanges topology information through adjacencies (neighbors) by the usage of LSAs. Each LSA updates the LSDB and once the LSDB changes, SPF is triggered locally, and the routing table (RIB) is recomputed.

The LSDB — What Actually Gets Replicated

The Link-State Database (LSDB) is the replicated state of OSPF. It is not a routing table and it is not “routes.” It's a topology model encoded as Link-State Advertisements (LSAs).

Each router maintains an LSDB per area (even in single-area designs, that still means “Area 0”). In steady state, all routers inside the same area converge to the same LSDB content.

At minimum in a clean single-area Ethernet design you will primarily see:

  • Type 1 (Router LSA): originated by every router; describes that router’s links and costs inside the area.
  • Type 2 (Network LSA): originated by the DR on broadcast/NBMA segments; describes the shared multi-access network and attached routers.

That’s the key mental model:

  • Adjacency exists to establish a trusted replication channel.
  • LSAs are the replication payload.
  • LSDB is the synchronized dataset.
  • SPF converts the dataset into best paths.
  • RIB/FIB are derived consequences.

Control Plane Mechanics and Derived State

OSPF operates entirely in the control plane; it does not forward any data traffic (forwarding plane). Its packets (IP protocol 89) are control traffic and are punted to the CPU — never CEF-switched.

Through neighbor discovery and reliable LSA flooding, routers construct a synchronized Link-State Database (LSDB) that represents the network as a graph. Each router then runs SPF locally against that database and installs the resulting best paths into its routing table (RIB -> FIB).

Routes are therefore locally derived state — not the primary payload (which are the LSA's). OSPF does not transmit user data either; it simply derives best OSPF routes, inserts them into the RIB and the winners of those are inserted into the FIB and used in the forwarding-plane.

Minimal Single-Area Example (Area 0)

Area 0
P2P
Single-area
IOS

A complete mini-run: Hello → FULL → LSAs → SPF → RIB/FIB


The Adjacency State Machine

OSPF is a deterministic state machine. This means that adjacency formation progresses through fixed states in a defined order — and if adjacency fails, it fails at a specific state for a well-defined reason we are simply able to determine.

Adjacency formation is about establishing reliable database replication and avoiding corrupting the LSDB. OSPF does not trust neighbors until database synchronization is proven reliable.

States Explained

OSPF adjacency is not “a connection.” It’s a controlled process for building a trusted replication channel for link-state data. The state machine exists to prevent polluted or partial databases from entering the LSDB.

The first states (Down / Init / 2-Way) are Hello-level liveness and compatibility. The later states (ExStart → Exchange → Loading) are database synchronization. Full simply means: “for this neighbor relationship, the LSDBs are synchronized enough to flood reliably.”

  • Down: No Hellos received yet (or the dead timer expired and the neighbor was declared gone).
  • Init: I received your Hello, but you haven’t acknowledged me (I’m not in your neighbor list).
  • 2-Way: Bidirectional Hellos are confirmed (we see each other in our Hellos).
  • ExStart: We decide who is master/slave and begin DBD negotiation (sequence numbers).
  • Exchange: We swap DBD packets (LSA headers) to summarize our databases.
  • Loading: We request what we’re missing (LSR) and receive it (LSU), acknowledging with LSAck.
  • Full: Databases are synchronized (for this adjacency); the neighbor relationship is stable.

DEBUG

If a neighbor is not FULL stop and fix that first!

OSPF Packet Types

Adjacency fails where packet exchange breaks, OSPF adjacency formation (and maintenance) uses five packet types.

PacketMulticastWhat it doesContainsWhere you see it mostMost Common Break CauseWhat To Check
Hello224.0.0.5 / .6Discovers neighbors, verifies parameters, maintains neighbor livenessTimers, RID, neighbor list, DR/BDRDown → Init → 2-Way, and continues periodically even when FullArea mismatch, auth mismatch, timer mismatch, network typeshow ip ospf interface
DBD (Database Description)Unicast / multicastExchanges summaries of the LSDB (LSA headers, not full LSAs)LSA headers onlyExStart / ExchangeMTU mismatch, RID conflictshow ip ospf neighbor detail
LSR (Link State Request)UnicastRequests specific missing LSAs by type/ID/advertising routerSpecific LSA requestLoadingLSA not deliveredshow ip ospf database
LSU (Link State Update)Multicast / unicastSends the requested LSAs (or floods updates)Full LSAsExchange / LoadingFiltering, CPU overloaddebug ip ospf packet
LSAckMulticast / unicastAcknowledges received LSAs for reliable deliveryLSA header ackExchange / LoadingRetransmit stormshow ip ospf retransmission-list

Control-Plane Exchange Trace

The following sequence shows the actual packet-level exchange that drives the adjacency state transitions shown above.

Think of it as a runtime trace of the OSPF state machine: Hello establishes liveness, DBD negotiates synchronization, and LSR/LSU/LSAck complete database replication.

TAKEAWAY

Adjacency formation is a staged escalation of trust:

  1. Prove liveness.
  2. Negotiate synchronization.
  3. Compare database summaries.
  4. Transfer missing data.
  5. Enter steady-state flooding.

If any phase fails, the state machine rolls back.

The Hello Packet

The Hello packet is what initially transitions the router from DOWN to INIT when it recieves a neighbors Hello.

But for the 2-WAY state transition, the following Hello requirements must match between two neighbors communicating:

  • Area ID
  • Hello timer
  • Dead timer
  • Authentication
  • Router ID uniqueness
  • MTU (mismatch breaks DBD stage (ExStart), not Hello validation)
  • Network type

Mismatch in any of these prevents adjacency formation and result in a transition failure.

INFO

The HELLO packet is exchanged continiously back and forth every time the Hello Timer times out, even when relationship reaches the FULL state. If the router doesn't get a HELLO packet back within the duration of the Dead Timer the adjacency is teared down and the process has to start over from scratch A good rule of thumb is that the Dead Timer should be set to four times the Hello Timer.

The DBD Packet

The (DB) database (D) descriptor is used to exchange summaries (headers) of the neighbor routers LSAs.

MTU size must match for this stage to complete or it will revert back to 2-Way

The LSR Packet

The LSU Packet

The LSAck Packet

ACT II — Design Mechanics

DR / BDR Election (Broadcast Networks)

On broadcast networks (Ethernet), OSPF elects:

  • DR (Designated Router)
  • BDR (Backup Designated Router)

This reduces adjacency count from N² to N.

Election priority:

  1. Highest OSPF interface priority
  2. Highest Router ID

Verify:

show ip ospf neighbor

If no FULL adjacency to DR → topology knowledge incomplete.

To influence:

interface g0/0
ip ospf priority 200

Setting priority 0 → router will not become DR/BDR.

Router ID Determinism

Router-ID selection order:

  1. Manually configured
  2. Highest loopback IP
  3. Highest active interface IP
router ospf 10
router-id 1.1.1.1

Duplicate Router IDs prevent adjacency.

After change:

clear ip ospf process

This resets adjacency and rebuilds LSDB.


Multi-area OSPF

Multi-area OSPF exists to contain state propagation.

Single-area is the optimal solution for smaller networks but starts degrading slowly along very specific control-plane stress vectors as the area grows.

A 100-router backbone with flappy links can become troublesome whereas a stable 250-router backbone won't exhibit the same symptoms.

Single-area OSPF stops scaling when:

  • SPF runs become frequent under normal operation (adjacency teardowns and restablisments from link flaps).
  • LSA flooding causes noticeable CPU spikes.
  • Convergence events affect the entire domain unnecessarily.
  • Troubleshooting becomes cognitively expensive.
  • It is a control-plane saturation problem, not a route-count problem.

Multi-area beats single-area when the cost of global state synchronization exceeds the benefit of simplicity.

Area Types

Multi-area introduces:

  • LSDB scoping
  • Summarization
  • Reduced flooding
  • Reduced SPF scope
  • Failure containment

And it is all about constraining blast radius.

Think of area types as: Policies for LSA admission and flooding scope.

Area types do not change SPF mechanics.

They change which LSAs are allowed to exist inside an area.

That is the entire game; think of it as scaling valves.

Area 0

The central transit area of a multi-area OSPF domain. All other areas must connect to Area 0 (logically or physically). Area 0 is the global transit fabric.

OSPF Synchronization Mechanics

LSA Types and Flooding

OSPF topology is encoded as LSAs as we talked about in the beginning, and LSAs get flooded to synchronize the LSDB.

How, when and why they're flooded matters.

TypeNameGenerated ByFlooding ScopeAppears WhenPurpose
1Router LSAEvery routerArea-localAlwaysDescribes router links + costs inside an area
2Network LSADRArea-localBroadcast / NBMA networksDescribes multi-access segment and attached routers
3Summary LSAABRInter-areaMulti-area designAdvertises networks between areas
4ASBR Summary LSAABRInter-areaWhen ASBR existsAdvertises path to ASBR
5External LSAASBREntire OSPF domain (except stub areas)RedistributionAdvertises external routes (E1/E2)
6MOSPF LSARare (Multicast OSPF)Multicast extensions (almost never used)
7NSSA External LSAASBR inside NSSANSSA area onlyNSSA redistributionExternal routes inside NSSA (converted to Type 5 by ABR)
8Link LSAOSPFv3 onlyLink-localOSPFv3Carries link-local address info
9Opaque LSA (Link scope)RouterLink-localExtensionsUsed for traffic engineering
10Opaque LSA (Area scope)RouterArea-localExtensionsMPLS-TE, Graceful Restart, etc.
11Opaque LSA (AS scope)RouterAS-wideExtensionsDomain-wide opaque info

Area Type Behaviour and LSA Propagation

Area TypeType 1Type 2Type 3Type 4Type 5Type 7Default Route Injected?Use Case
Backbone (Area 0)No (unless configured)Core transit area
Normal AreaNo (unless configured)Standard multi-area design
Stub Area✔ (by ABR)Edge area without redistribution
Totally Stubby Area*✔ (by ABR)Smaller edge area
NSSAOptionalEdge area needing redistribution
Totally NSSA*Controlled redistribution edge

Verify LSDB:

show ip ospf database

All routers in same area must share identical LSDB (but during convergence, transient divergence exists).

If LSDB differs → SPF differs → routing differs.

Network Types

OSPF behavior depends on network type.

TypeDR/BDRMulticastDefault
BroadcastYesYesEthernet
Point-to-PointNoYesSerial
Point-to-MultipointNoYes/VariesManual
NBMAYesOften no (manual neighbors)Frame Relay

Mismatch in network type causes adjacency asymmetry.

Verify:

show ip ospf interface g0/0


SPF Mechanics in OSPF

Cost and Path Selection

Default reference bandwidth = 100 Mbps.

This is obsolete in modern networks.

If not changed, 1G and 10G links share identical cost.

Set globally:

router ospf 10
auto-cost reference-bandwidth 10000

Must match across all routers.

Manual override:

interface g0/1
ip ospf cost 50

ACT III — Failure & Doctrine

Troubleshooting OSPF - Failure Pattern Recognition

OSPF does not fail randomly it fails at a specific layer for a specific reason; we talked briefly about this earlier regarding adjacency-formation:

Adjacency formation progresses through fixed states in a defined order — and if it fails, it fails at a specific state for a specific reason.
This Article
SymptomNeighbor StateInterpretationLikely Root Cause(s)
No adjacencyDown / InitAdjacency never formsArea mismatch, authentication mismatch, hello/dead timer mismatch, ACL blocking multicast (224.0.0.5/6), network type mismatch
INIT onlyInitOne-way Hello seenHello parameter mismatch, duplicate Router ID, unidirectional link, multicast filtering
EXSTART loopExStartDBD negotiation repeatedly restartsMTU mismatch, master/slave negotiation failure, duplicate Router ID
Stuck LOADINGLoadingLSA exchange incompleteLSA request/retransmit failure, filtering, packet loss, CPU overload
Missing routesFull (but wrong SPF)Adjacency up but routing incorrectCost mismatch, reference bandwidth inconsistency, passive interface, filtering, LSDB divergence
Inconsistent routingFull (divergent LSDB)SPF computed on inconsistent databasesLSDB desynchronization, LSA filtering, stub/NSSA misconfiguration, redistribution mismatch

If the neighbor is not FULL, stay in the adjacency layer -- do not inspect routes yet.

If You're Stuck, This Is Where to Look First

StateWhat it meansFastest checks (Cisco IOS)Usual root causes
DownNo Hellos receivedshow ip ospf interface g0/0 / show ip ospf neighborL1/L2 down, wrong VLAN, OSPF not enabled on interface, passive-interface, ACL blocking proto 89/multicast
InitOne-way Hellosshow ip ospf neighbor detail (do you appear in their neighbor list?)Unidirectional link, multicast blocked one direction, hello params mismatch, duplicate RID edge cases
2-WayBidirectional HellosOn broadcast: check DR/BDR; show ip ospf neighborNormal on broadcast for non-DR/BDR peers; otherwise network type mismatch / adjacency expectation wrong
ExStartDBD negotiationshow ip ospf neighbor detail + MTU; consider ip ospf mtu-ignore (temp)MTU mismatch (most common), L2 fragmentation issues, broken negotiation due to flapping
ExchangeDBD summary exchangedebug ip ospf adj (careful), show ip ospf neighbor detailDBD sequence issues, packet loss, CPU spikes, MTU problems still present
LoadingLSR/LSU/LSAck not completingshow ip ospf request-list / retransmissionsPacket loss/filtering, ACL/QoS policing, CPU overload, LSA flooding blocked, interface errors
FullSynchronizedIf routing is wrong: shift to LSDB/SPF/cost checksNot an adjacency problem anymore

Deterministic Troubleshooting

Never jump randomly.

Follow this order:

  1. Interface up?
  2. Hello seen?
  3. Neighbor state?
  4. LSDB identical?
  5. Cost logical?
  6. Route installed?

Do not inspect routing table before verifying adjacency.


Mental Compression

If you remember nothing else:

  • OSPF is distributed topology synchronization.
  • LSA flooding maintains shared state (LSDB).
  • SPF converts shared state into forwarding decisions.
  • The RIB/FIB are derived consequences.

All OSPF failures reduce to one of four categories:

  1. Adjacency failure → no synchronization
  2. Flooding failure → inconsistent databases
  3. Cost model error → incorrect path selection
  4. Instability → constant recomputation (CPU churn)

Convergence is not magic — it is the network reaching equilibrium after state change.

If adjacency is unstable, flooding is unstable.

If flooding is unstable, SPF thrashes.

If SPF thrashes, routing oscillates.

Field doctrine:

  • Stabilize adjacency.
  • Verify LSDB integrity.
  • Normalize cost.
  • Then inspect routes.

And lastly: if adjacency breaks, everything upstream collapses.

Reference Tables

Common Failure Modes

LayerObjectPacketLSAScopeFailure Mode
DiscoveryNeighborHelloLinkINIT
SyncLSDBDBD1/2AreaExStart
ReplicationLSDBLSU1–7Area/ASLoading
ComputationSPFAllLocalWrong path
ForwardingFIBHardwareBlackhole

Appendix

Terminology, Abbreviations & Acronyms

© 2025–2026 manjana/blue-hexagon — all rights reserved.

Connect with me on GitHub or LinkedIn.