Pcornel
Networking · Routing › Routing Table

OSPF (Open Shortest Path First)

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

Back to the Topic

Answer

An OSPF RIB entry proves the router selected an OSPF-derived path for that prefix. Route code, administrative distance, metric, next hop and outgoing interface each describe a different part of that decision.

Remember

Adjacency → LSDB → SPF result → RIB selection → FIB/adjacency is a chain. Success at one stage does not prove the next.

First checks

  • show ip route ospf — O, O IA, O E1/E2 routes
  • show ip route <prefix> — [110/cost]

Commands

show ip ospf neighbor
show ip ospf database
show ip route <prefix>

Verify in this order

LSDB → SPF → OSPF routes → RIB

Where it usually breaks

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

OSPF operational reference

CheckKnown-goodFailure signatureNext boundary
NeighborRequired adjacencies FullMissing/unstable adjacencyOSPF neighbor
LSDBPrefix/topology representedLSA absent/wrongOrigination/area
OSPF candidateSPF produces routeNo candidateSPF/policy
RIBOSPF wins when intendedOther source selectedAD/selection
FIBNext hop resolvedUnresolved/dropAdjacency

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

Confirmation

Confirm action

Continue?