← all cheat sheets
OPERATOR REFERENCE · OSPFv2

OSPF Field Reference
Cisco IOS-XE & Arista EOS

verify → inspect → configure → tune → troubleshoot — one page, two vendors
Scope note: covers OSPFv2 (IPv4) on Cisco IOS-XE and Arista EOS — both track RFC 2328 closely and their CLI is near-identical for OSPF. OSPFv3 (IPv6) uses the same state machine but different LSA numbering — not covered here. Default timers assume no manual override.
ROUTER-A · Area 0
OSPF
ROUTER-B · Area 0
01 Verify & Inspect

Neighbor Status

Cisco IOS-XE show ip ospf neighbor show ip ospf neighbor detail
Arista EOS show ip ospf neighbor
State column should read FULL (or 2WAY on a broadcast segment for a DROTHER-DROTHER pair, which is normal, not a fault).

Link-State Database

Cisco / Arista show ip ospf database show ip ospf database router
Every router in an area must have an identical LSDB for that area — mismatched sequence numbers point at a stuck adjacency, not just a slow one.

Interface State

Cisco / Arista show ip ospf interface show ip ospf interface brief
  • Area, process ID, cost
  • Network type (broadcast/P2P/NBMA)
  • DR / BDR, priority
  • Hello / dead timers

Routes & Process Summary

Cisco / Arista show ip route ospf show ip protocols
show ip protocols confirms which interfaces are actually participating vs. passive.

Timers Check

show ip ospf interface Gi0/1
Hello/dead intervals must match exactly between neighbors on the same segment — a mismatch prevents adjacency from forming at all.
🔒

Authentication

show ip ospf interface Gi0/1 | include authentication
Verify auth type (null/plaintext/MD5) matches on both ends, not just that a key is configured.

First-Look Diagnostics

  • ping x.x.x.x
  • show ip ospf
  • show ip ospf border-routers
  • debug ip ospf adj (Cisco, use sparingly)
  • debug ip ospf hello

Redistribution Check

  • show ip ospf — look for "Redistributing External Routes"
  • External routes show as O E1 (cost = internal + external) or O E2 (cost = external only, default)
02 Base Configuration
+

Enable Process

Cisco / Arista router ospf 1 router-id 1.1.1.1
Process ID is locally significant only — doesn't need to match between routers.
net

Network Statement (classic)

network 10.0.0.0 0.0.0.255 area 0
Wildcard mask, not a subnet mask — inverse of a normal mask (0.0.0.255 = /24).
if

Interface-Level (modern)

interface Gi0/1 ip ospf 1 area 0
Preferred on current IOS-XE/EOS — avoids wildcard-mask ambiguity, explicit per interface.
🔇

Passive Interface

router ospf 1 passive-interface default no passive-interface Gi0/1
Suppresses hellos everywhere except explicitly excluded links — safer default than opting in per-interface.

Interface Cost

ip ospf cost 10
Overrides the auto-calculated cost (reference-bandwidth ÷ interface bandwidth) — see section 06.
👑

DR Priority

ip ospf priority 100
Default = 1. Priority 0 means "never DR/BDR" on that interface.
🔒

MD5 Authentication

ip ospf authentication message-digest ip ospf message-digest-key 1 md5 MyKey
Key ID and key string must match on both ends of the segment.

Default Route Injection

default-information originate
Add always to advertise 0.0.0.0/0 even without a local default route.

Reference Bandwidth

auto-cost reference-bandwidth 100000
⚠ must be set identically on every router in the domain, or cost comparisons become inconsistent
03 Neighbor Adjacency State Machine
DOWN
no hellos seen
INIT
hello received, own RID not seen yet
2-WAY
bidirectional, DR/BDR elected here
EXSTART
master/slave negotiated
EXCHANGE
DBD packets swapped
LOADING
LSRs sent for missing LSAs
FULL
LSDBs synchronized
On broadcast/NBMA segments, DROTHER-to-DROTHER neighbors intentionally stop at 2-WAY — they don't need full adjacency with each other, only with the DR/BDR. That's expected, not stuck. Attempt (NBMA-only, unicast poll before Init) is omitted above as an edge case.
04 DR / BDR Election
01

Why It Exists

On a multi-access segment, every router forming a full mesh of adjacencies would mean N×(N-1)/2 flooding relationships. The DR (and backup BDR) becomes the single point every other router adjacencies with — flooding scales linearly instead.
02

Election Rule

Highest priority wins; tie broken by highest router ID. Priority 0 removes a router from eligibility entirely.
03

Non-Preemptive

⚠ election is non-preemptive — a router with a higher priority joining later does not take over an already-elected DR. It only takes effect after the current DR is removed (or the segment resets), which surprises people expecting live failover on config change.
04

Only on Multi-Access

DR/BDR election happens on broadcast and NBMA network types only. Point-to-point and point-to-multipoint links skip it entirely — see section 06.
05

Confirm Current DR

show ip ospf interface Gi0/1
Shows DR/BDR IP, plus this router's own state relative to them (DR, BDR, or DROTHER).
06

Force Re-Election

clear ip ospf process
⚠ resets every adjacency on the box, not just one interface — disruptive, use in a maintenance window
05 Area Types & LSA Types

Area Types

TypeAllows
Backbone (Area 0)Everything — all other areas must connect through it (or a virtual link)
StandardIntra-area, inter-area, and external (Type 5) routes
StubBlocks Type 5 externals — injects a default route instead
Totally StubbyBlocks Type 5 and Type 3 summaries — default route only (Cisco proprietary term, widely supported)
NSSALike Stub, but allows local Type 7 externals (translated to Type 5 at the ABR)
Totally NSSANSSA + blocks Type 3 summaries too

Common LSA Types

TypeNameOriginated ByScope
1Router LSAEvery routerArea-local
2Network LSADR on multi-access segmentsArea-local
3Summary LSAABRInter-area
4ASBR Summary LSAABRAdvertises reachability to the ASBR
5AS External LSAASBRDomain-wide (not into stub areas)
7NSSA External LSAASBR inside an NSSANSSA-local, translated to Type 5 at ABR
06 Network Types, Cost & Timers

Network Types

TypeDR/BDR?Default Hello / Dead
Broadcast (Ethernet)Yes10s / 40s
Point-to-PointNo10s / 40s
NBMA (e.g. Frame Relay)Yes30s / 120s
Point-to-MultipointNo30s / 120s
Dead interval is 4× hello by default on every type — override one and the other doesn't follow automatically.

Cost Calculation

Cost = reference-bandwidth ÷ interface bandwidth (both in the same units, result truncated to an integer, minimum 1).
Default reference-bandwidth is 100 Mbps (10^8) — a legacy default from when Fast Ethernet was fast. On modern networks with 1G/10G/40G+ links, every interface ≥100 Mbps computes to cost 1, making OSPF unable to distinguish a 1G link from a 40G link by cost alone.
VERIFY — bump auto-cost reference-bandwidth domain-wide (e.g. to 100000 for 100G-normalized costs) on greenfield builds; changing it on a live network requires updating every router or path costs become inconsistent mid-migration.
07 Why Adjacency Won't Form
Stuck inLikely cause
DOWNNo hellos arriving — link down, ACL blocking IP proto 89, wrong interface config
INITOne-way hello — check for asymmetric routing or a unidirectional link fault
2-WAYExpected for DROTHER-DROTHER pairs on multi-access; otherwise check area ID, subnet mask, or MTU mismatch blocking DBD progress
EXSTARTMTU mismatch is the classic cause — DBD packets are sent at interface MTU and silently dropped if they don't match
EXCHANGE / LOADINGLSA request/response not completing — often a flaky link dropping large packets intermittently
FULL but no routesRoute filtering, distribute-list, or the prefix simply isn't in the LSDB — check show ip ospf database

Fast Checklist

  • Area ID matches on both sides of the link
  • Subnet mask matches (or interface-mode config used instead)
  • Hello/dead timers match
  • Authentication type + key match
  • MTU matches — the #1 cause of an EXSTART/EXCHANGE stall
  • Interface not accidentally marked passive
  • No ACL blocking IP protocol 89 (OSPF has no L4 port — it rides directly on IP)
OSPF uses multicast 224.0.0.5 (all OSPF routers) and 224.0.0.6 (all DR routers) — confirm multicast isn't being filtered on the segment.