Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

OSPF (Open Shortest Path First)

Direct answer

OSPF is a link-state routing protocol: routers form adjacencies, exchange a description of every link in their area, and each computes the shortest paths itself. Large networks are split into areas joined through area 0.

At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol reference · IPv4 · Command examples · Cisco IOS / IOS XE
Key commanddefault-information originate [always]
VerificationDestination / VRF → route source → next-hop forwarding → original traffic and return path
Scope / prerequisiteKeep destination, address family and VRF fixed; confirm the owning protocol or forwarding device.
Reference · 1
What next?3 suggested next steps
Child topics (this level)3
Catalog command links1
Documented command examples10
Evidence1
On this pageJump to a specific section
Choose the next check

Separate neighbors, routes and delivery

Route missing or unexpected

Fix destination, address family and VRF. Read the installed route, then inspect the originating protocol, advertisement and policy. An OSPF neighbor alone does not prove the prefix was learned or selected.

Route present, traffic fails

Continue to RIB / FIB / CEF, recursive next-hop resolution and adjacency. Compare policy, the downstream path and the return route using the original source and destination.

Documented examples · Cisco IOS / IOS XE

Commands for this reference

10 unique read-only examples; catalog links are counted separately. Replace placeholders and confirm syntax, VRF and version on the actual device. The OSPF examples here are for OSPFv2; use the OSPFv3 subtopic for its commands.

CommandRead this / proof limit
show ip ospf interface <interface>

Catalog reference
Inspect area, network type, interface cost, DR/BDR role, timers and participation.
show ip ospf neighbor

Catalog reference
Read peer Router ID, state, dead timer and interface. Interpret state against network type and DR/BDR roles.
show ip ospf neighbor detail
Inspect adjacency transitions and per-neighbor detail before changing or resetting a process.
show ip ospf database

Catalog reference
Locate the relevant LSA and area; database presence is separate from route installation.
show ip ospf database router

Catalog reference
Inspect Type 1 router LSAs within their area.
show ip ospf database network

Catalog reference
Inspect Type 2 network LSAs originated by a DR on a transit multiaccess network.
show ip ospf database summary

Catalog reference
Inspect Type 3 inter-area network information originated by an ABR.
show ip route <destination>
Find the longest matching installed prefix, its source, next hop and interface. Use the matching VRF/address-family syntax on the device.
show ip cef <prefix> detail
Compare local forwarding with the selected route and resolved next hop. This does not prove hardware forwarding or delivery.
show ip protocols

Catalog reference
Inspect active IPv4 routing processes and their advertised networks, filters and routing sources.

Wireshark display filter: ip.proto == 89 selects IPv4 OSPF packets in a capture. This is a packet filter, not an IOS command; absence in one capture does not prove that the peer sent no packets.

OSPFv2 neighbor state

Expected transitions and stuck states

Use network type and intended adjacency to interpret the state. Check both ends before changing configuration.

StateMeaningNext check
DownNo recent Hello received.Check interface participation, passive state, reachability and protocol 89 filtering.
AttemptNBMA: trying to contact a configured neighbor.Check configured neighbor identity and NBMA reachability.
InitHello received; the peer has not listed our Router ID.Check the reverse Hello path and both peers; suspect one-way communication.
2-WayBidirectional Hello communication.Normal between broadcast DROTHERs. If adjacency is expected, inspect DR/BDR election and network type.
ExStartNegotiating database exchange roles and sequence.Compare MTU, Router IDs, network type and packet exchange; state alone does not prove an MTU fault.
ExchangeExchanging database descriptions.Inspect negotiation, DBD retransmissions and consistent parameters on both ends.
LoadingRequesting missing LSAs.Inspect outstanding requests, retransmissions and loss; identify the missing LSA.
FullThe intended adjacency has synchronized its database.Continue to the required LSA, route installation and traffic test. Full does not prove delivery.
Illustrative output · not captured Evidence

Read the neighbor output

Synthetic rows from two interfaces, used to explain three cases. Assume R1 is a DROTHER on GigabitEthernet0/0. These are not a capture from Pcornel or a verified device.

R1# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         00:00:32    192.0.2.2       GigabitEthernet0/0
3.3.3.3           1   2WAY/DROTHER    00:00:36    192.0.2.3       GigabitEthernet0/0
4.4.4.4           1   EXSTART/BDR     00:00:35    198.51.100.2    GigabitEthernet0/1

FULL/DR: database synchronization with the elected DR. 2WAY/DROTHER: can be healthy between two DROTHERs on the broadcast segment. EXSTART/BDR: exchange negotiation has not completed; compare MTU and other parameters rather than declaring MTU the cause.

Neighbor ID identifies the peer Router ID; Address is the neighbor interface address. State combines synchronization state and DR role. Dead Time counts down toward neighbor expiry. None of these columns proves the destination route or application path.

Technical depth

Mechanisms behind the checks

Network type and DR/BDR

Broadcast and NBMA networks elect a DR and BDR. DROTHERs form full adjacencies with these roles; two DROTHERs may remain 2-Way. Point-to-point networks do not elect a DR/BDR. Compare network type on both ends.

LSAs and areas

Type 1 describes a router inside an area; Type 2 describes a multiaccess transit network; Type 3 carries inter-area networks; Type 4 identifies an ASBR; Type 5 carries external routes. Stub areas exclude external Type 5 information; NSSA uses Type 7 external LSAs with translation at its boundary. Inspect area type and LSA scope before expecting a prefix.

Cost and reference bandwidth

Cisco automatic interface cost uses reference bandwidth divided by interface bandwidth, with a minimum cost of 1. Interface cost overrides automatic calculation. Use consistent reference bandwidth across routers; cost selects paths within OSPF, while administrative distance compares route sources.

Participation, security and timers

A passive OSPF interface sends no Hellos and forms no neighbors while its attached network can still be advertised. Compare Hello/Dead timers, area settings and compatible authentication on both ends. Verify the actual interface and IOS release rather than assuming one set of defaults.

Documentation basis

Technical sources

Documentation reviewed 12 October 2026 (a documentation check, not a device test). Confirm release and platform support on your own device.

Linked catalog commands
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Troubleshooting trees

Start from the symptom

Prove the nearest boundary, branch on the observation, and repeat the original test after the minimum controlled change.

Symptom-first flow OSPF route is missing 7 decision steps

First proof

Separate adjacency, LSDB, SPF/RIB and forwarding; a FULL neighbor does not prove route installation.

Useful read-only checks: show ip ospf neighbor · show ip ospf database · show ip route · show ip cef

Step 1 Adjacency boundary Observe → decide

Confirm the expected neighbor state on the expected interface.

If healthy: Required neighbors are stable at the proper state.

If broken: Resolve Hello/area/auth/network-type/MTU adjacency problems first.

Step 2 LSA exists Observe → decide

Search the LSDB for the expected prefix/topology information.

If healthy: The necessary LSA is present and current.

If broken: Trace origination, area or filtering before RIB analysis.

Step 3 LSDB is plausible Observe → decide

Compare advertising router, LSA type, sequence and topology context.

If healthy: The LSDB view matches the intended topology.

If broken: Resolve stale/wrong topology information before SPF/RIB.

Step 4 Route wins RIB selection Observe → decide

Check whether the prefix is installed and why another route may win.

If healthy: The expected route is in the RIB.

If broken: Investigate AD, route type, filtering or competing sources.

Step 5 CEF resolves forwarding Observe → decide

Confirm the installed prefix resolves to the intended adjacency.

If healthy: FIB/CEF points toward the expected next hop.

If broken: Stop at unresolved/drop/punt adjacency.

Step 6 Return path exists Observe → decide

Prove the reverse direction for the original traffic.

If healthy: Forward and return paths are plausible.

If broken: Fix asymmetry or downstream routing rather than OSPF blindly.

Step 7 Repeat the original traffic test Observe → decide

Use the same destination/prefix that exposed the problem.

If healthy: The original flow succeeds.

If broken: Do not equate LSDB/RIB presence with end-to-end delivery.

Proof limit

A passing step proves only that boundary; continue until the original symptom is explained and retested.

Failure signatures

Recognize the symptom, then prove the boundary

Observed symptom → candidate boundary → discriminating check → original-test closure. A signature narrows the search; it never proves root cause by itself.

OSPF neighbor stalls in EXSTART / EXCHANGE
1 · Observe

The adjacency passes Hello discovery but cannot complete database exchange.

2 · Candidate boundaries

MTU mismatch · DBD negotiation · packet loss · duplicate router ID or adjacency instability

3 · Discriminate

compare interface MTU → inspect neighbor resets/events → check packet loss and DBD progression

4 · Proof limit

EXSTART is a state signature, not proof that MTU is the cause.

Repeat the original failing test after the minimum controlled change before calling recovery verified.
OSPF is FULL but expected route is missing
1 · Observe

The neighbor adjacency is complete, yet the expected prefix is absent from the RIB.

2 · Candidate boundaries

LSA origination/area boundary · filtering/summarization · RIB selection/AD · topology/LSDB mismatch

3 · Discriminate

check LSDB for the prefix → compare route candidates/AD → check CEF only after RIB proof

4 · Proof limit

FULL proves adjacency, not LSA presence, route selection or forwarding.

Repeat the original failing test after the minimum controlled change before calling recovery verified.
More reference material · notes and background

Preserved source content, including previous workflows and technical details. The focused reference above is documentation; opening this section does not establish verification.

When to use this

Use it when an OSPF neighbour does not come up, a route is missing, or traffic takes an unexpected path.

First 30 seconds

1. show ip ospf neighbor — is the neighbour there, and FULL (or 2WAY between two DROTHERs)?

2. Missing → show ip ospf interface <interface> on both ends: same area, subnet, timers, network type, authentication? Passive?

3. Stuck in EXSTART/EXCHANGE → MTU mismatch.

4. FULL but route missing → show ip ospf database: is the LSA there? Filtered at an ABR?

5. Unexpected path → compare costs along both paths.

Operational verification

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

Evidence · next step

Test the next-hop/data-plane path and inspect forwarding/interface evidence if traffic still fails.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Treating every non-FULL neighbor as broken.

- Looking only at the route table and skipping the LSDB.

- Assuming matching Cisco process IDs are required between neighbors.

- Confusing OSPF cost with administrative distance.

- Changing timers/MTU/network type before comparing both interfaces.

- Treating FULL adjacency as evidence a specific prefix is advertised and installed.

Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
Subject-specific reference · not observed execution

Verification & Troubleshooting

Focused checks for this Topic. Stored verification and troubleshooting material remains available below.

4 focused checksScope → observe → prove the owning boundary → repeat the original test

Check 1 — Check interface participation

show ip ospf interface <interface>: Read process, area, network type, cost and timers on the interface expected to participate. Compare both ends when participation or parameters disagree.

Check 2 — Interpret the neighbor state

show ip ospf neighbor: Read neighbor ID, state, interface and dead timer. FULL is required for intended adjacencies; 2-WAY can be normal between DROTHERs on a broadcast segment. Investigate the observed state instead of treating every non-FULL neighbor as broken.

Check 3 — Compare LSDB and route installation

show ip ospf database: Find the relevant LSA and its area/type before inspecting the destination route. Use show ip route <destination> separately; a present LSA or FULL neighbor does not prove the desired route wins.

Check 4 — Separate routing from delivery

Keep destination, address family and VRF fixed when comparing RIB, forwarding and traffic. If routing is consistent, continue to next-hop resolution, policy, downstream and return-path checks.

More detailAdditional checks1 sections

Longer notes behind the focused checks above. Start with the checks; use these when you need more detail.

Layered verification

Match neighbor state and timers on both peers, inspect the relevant LSA/prefix, confirm the selected RIB entry and CEF adjacency, then generate the original flow and inspect forward/return behavior.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

command output · 1
Key points

Neighbours must agree on area, subnet, hello and dead timers, authentication, area type, network type and MTU. FULL is the normal end state (2WAY between two non-DR routers on a LAN). Every area must touch area 0.

Key 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.
ReferenceHow it works1 section · depth on demand

How OSPF converges

OSPF-enabled interfaces send Hellos to discover compatible neighbors. Required adjacencies synchronize topology information using Database Description, Link-State Request, Link-State Update and Link-State Acknowledgment packets. LSAs populate the LSDB; SPF calculates paths; the RIB then selects eligible routes. Forwarding is a separate final boundary.

ReferenceImportant terms & boundaries3 sections · depth on demand

Key points

  • IP protocol: 89 (not TCP/UDP)

- Metric: cost; lower total path cost wins

- Routers build an LSDB per area and run SPF

- Area 0 is the backbone for normal multiarea design

- A FULL neighbor is only one boundary: always verify LSDB and RIB too.

OSPF begins with interface eligibility and IP transport, then Hello parameter compatibility and neighbor discovery.

In depth

OSPF: a link-state IGP built for IP networks

The Catalyst 9300 OSPF guide describes OSPF as an interior gateway protocol designed for IP networks, with support for subnetting, external route tagging, authentication, IP multicast, stub areas, NSSAs and virtual links.

How OSPF works in four steps

StepWhat happens
1Routers discover neighbours with Hello packets
2Neighbours that should be adjacent synchronise their link-state databases
3Every router in an area holds the same LSDB
4Each router runs SPF (Dijkstra) on the LSDB and installs the best paths

Documented defaults on Catalyst 9300

SettingDefault
Hello interval10 s
Dead interval4 × hello
Retransmit interval / transmit delay5 s / 1 s
Router priority1
Reference bandwidth100 Mb/s
Administrative distance110 (intra-area, inter-area and external)
SPF delay / hold time50 ms / 200 ms
Log adjacency changesEnabled
R1(config)# interface Loopback0
R1(config-if)# ip address 10.0.0.1 255.255.255.255
R1(config)# router ospf 1
R1(config-router)# router-id 10.0.0.1
R1(config-router)# auto-cost reference-bandwidth 100000
R1(config-router)# passive-interface default
R1(config-router)# no passive-interface TenGigabitEthernet1/1/1
R1(config-router)# network 10.0.0.0 0.255.255.255 area 0
R1# show ip ospf neighbor
R1# show ip route ospf

Licensing (from the guide)

OSPF for Routed Access on Network Essentials supports one OSPFv2 and one OSPFv3 instance with up to 1000 dynamically learned routes. Full OSPF needs Network Advantage.

First checks by symptom

SymptomCheck first
No neighbourHello/dead timers, area, subnet mask, authentication, passive interface, ACLs
Stuck in EXSTART/EXCHANGEMTU on both sides
Neighbour FULL, route missingIs the LSA in the database? Area type, filtering, summarisation
Suboptimal pathInterface costs (reference bandwidth) and area design
Routes flapshow ip ospf statistics for SPF runs; look for an unstable link
R1# show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Gi0/0/1      1     0               10.0.12.1/31       1     P2P   1/1
Vl110        1     10              10.110.0.1/24      1     DR    0/0

F/C 1/1 means one neighbour, and it is fully adjacent. Vl110 is DR with 0/0: it advertises the user subnet but has no neighbours, which is what a passive user-facing interface should look like.

OSPF topics in brief

TopicKey idea
AreasLimit flooding and SPF scope; all areas attach to area 0
DR/BDRReduce adjacencies on multi-access segments
CostReference bandwidth ÷ interface bandwidth
LSAsRouter, network, summary, external, NSSA
OSPFv3The IPv6 version, which can also carry IPv4

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

OSPF is a link-state routing protocol: every router in an area receives the same description of the topology and calculates the shortest path to every destination itself. Areas keep this database small and stop changes from spreading everywhere, with area 0 as the backbone that all other areas connect to. The cost of each link decides which path wins, so setting a sensible reference bandwidth is essential on networks faster than 100 Mb/s. Most OSPF problems are adjacency problems, and the list of matching requirements at the end of this section is the checklist for those.

OSPF essentials: link-state protocol with areas (backbone area 0), LSAs flooded within areas, SPF (Dijkstra) computation, cost = reference bandwidth / interface bandwidth.

router ospf 1
 router-id 10.255.0.1
 auto-cost reference-bandwidth 100000     ! 100 Gb/s reference
 passive-interface default
 no passive-interface Te1/1/1
interface Te1/1/1
 ip ospf 1 area 0
 ip ospf network point-to-point
 ip ospf bfd
show ip ospf neighbor
show ip ospf database
show ip ospf interface brief

Adjacency requirements: same area, subnet, timers, authentication, MTU (or ip ospf mtu-ignore), network type compatibility, unique router IDs.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 2328

Authoritative/upstream documentation reviewed for bounded claims in Routing → OSPF. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc2328.html · confidence 94%
Useful command sets

Commands commonly referenced together

Compact reference collections only; they are not a guided troubleshooting workflow.

IOS/IOS XE OSPF health bundle

Adjacency → LSDB → RIB → CEF

Use when OSPF is involved in a reachability or route-installation question.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
Open Shortest Path FirstOSPF neighborOSPF adjacencyFULLINITEXSTARTLOADING
Embedded reference data

Quick lookup tables

OSPF neighbor states

Quick lookup for common OSPF adjacency states.

StateMeaningHigh-value next check
DOWN / no neighborNo usable neighbor relationshipInterface/IP, area, Hello visibility, passive state, authentication
INITHello received, but two-way visibility is missingOne-way path / peer Hello content
2-WAYBidirectional Hello relationshipNormal on some multiaccess DROTHER relationships; check whether FULL is actually expected
EXSTARTDatabase-description negotiation has not completedMTU, Router ID/negotiation, interface stability
EXCHANGEDatabase descriptions are being exchangedMTU/DBD stability and duplicate Router ID evidence
LOADINGMissing LSAs are being requested/receivedLS requests/updates and adjacency stability
FULLExpected database synchronization completedContinue to LSDB → RIB → CEF for reachability questions

OSPF troubleshooting command map

Which Cisco command answers which control-plane question.

QuestionCommand
Is the OSPF process running and which Router ID/areas exist?show ip ospf
Is the interface participating with the expected area/type/timers/cost?show ip ospf interface
Did the expected neighbor/adjacency form?show ip ospf neighbor
Does the required LSA exist?show ip ospf database
Did the route reach the RIB?show ip route ospf / show ip route
Embedded quick reference

Operational notes

Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.

OSPF config skeleton

Minimal single-area reference plus verification

router ospf 1
 router-id 1.1.1.1
 network 10.0.0.0 0.0.0.255 area 0

Or use interface-based OSPF where appropriate on the platform/design. Verify interface participation first, then neighbor state, LSDB, RIB and CEF. Avoid treating config presence as proof that an adjacency formed.

OSPF Fast Check

Neighbor, LSDB and route checks in a compact order.

30-second flow

1. show ip ospf neighbor — adjacency/state

2. show ip ospf interface brief — area, cost, network type

3. show ip ospf database — LSA presence

4. show ip route ospf — RIB install

5. show ip cef <prefix> — forwarding result

Remember

  • FULL proves the adjacency, not that the expected route is installed.
  • EXSTART/EXCHANGE usually points to an MTU or DBD negotiation problem.
  • Match area, timers, authentication, subnet and network type before moving on.

No OSPF neighbor

Compact first-check sequence

1. Confirm interface is up/up and addresses/subnet make sense.

2. Confirm OSPF is active on the intended interface and not passive.

3. Compare area ID, Hello/Dead timers, network type and authentication.

4. Verify bidirectional Hello visibility.

5. If state reaches EXSTART/EXCHANGE, shift focus to MTU/DBD negotiation instead of repeating Hello checks.

Confirmation

Confirm action

Continue?