Pcornel
Networking · Routing › OSPF

OSPFv2

Cheat sheet · https://pcornel.dk/topic.php?topic=628

Back to the Topic

Answer

OSPFv2 is OSPF for IPv4. It is configured with a process ID (local only), a router ID (unique 32-bit value), and interfaces placed in areas — with network statements or ip ospf <process> area <area> on the interface.

Remember

The process ID need not match between routers; the area, timers and subnet must. The router ID must be unique in the domain — set it explicitly. Interfaces facing hosts should be passive.

First checks

  • show ip ospf neighbor — neighbours with state and DR/BDR role.
  • show ip ospf interface brief — OSPF interfaces, area, cost, state.
  • show ip ospf interface <interface> — timers, network type, priority, authentication.
  • show ip ospf database — the LSAs per area.
  • show ip route ospf — the routes OSPF installed.
  • show ip protocols — router ID, areas, passive interfaces.

Commands

ip ospf cost
ip ospf priority 0–255
ip ospf hello-interval
ip ospf message-digest-key <id> md5 <key>
ip ospf <pid> area <id>
ip ospf authentication-key
show ip ospf interface
show ip ospf neighbor
show ip ospf database
show ip route ospf

Verify in this order

interface in OSPF and not passive → hellos match → 2WAY → DR/BDR elected on broadcast links → database exchange → FULL → LSAs in the database → SPF → routes installed

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

OSPFv2 · operational reference

OSPFv2 layerCanonical evidenceWhat it proves
Interfaceshow ip ospf interfaceArea/type/timers/cost/local state
Neighborshow ip ospf neighborAdjacency/FSM state
LSDBshow ip ospf databaseLSA presence and ownership
RIBshow ip route ospfInstalled OSPF routes

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=628

Confirmation

Confirm action

Continue?