Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

OSPF Fundamentals

Direct answer

OSPF fundamentals: every router in an area holds the same link-state database, runs the SPF algorithm on it, and installs the shortest paths. Adjacencies carry the database; areas limit how far detail spreads.

When to use this

Use it to understand how OSPF works before configuring or troubleshooting it.

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

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS XE · IOS/IOS XE
Key commandshow ip ospf
Scope / prerequisiteUse it to understand how OSPF works before configuring or troubleshooting it.
Show · 5
What next?3 suggested next steps
Child topics (this level)12
Catalog command links5
Evidence0
On this pageJump to a specific section
Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

How to read the output

show ip ospf neighbor

Look first: neighbor ID, state, dead timer, address, interface

Healthy: Expected neighbor reaches FULL where the network type requires it.

Warning: INIT/EXSTART/EXCHANGE or repeated resets indicate a boundary before route installation.

Does not prove: FULL does not prove expected LSAs/routes are installed.

show ip ospf database

Look first: LSA type, link-state ID, advertising router, sequence/age

Healthy: Expected LSAs are present and consistent with topology.

Warning: Missing/stale/unexpected LSAs or differing topology view.

Does not prove: LSDB presence does not prove route wins in RIB.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification and output interpretation Verify boundary

Use show ip ospf interface brief to map interfaces to areas/state, show ip ospf neighbor for peer/adjacency state, show ip ospf database for the LSDB and show ip route ospf for installed routes. A useful reference chain is interface participation → neighbor compatibility → required adjacency → expected LSA → SPF result → RIB → CEF. On broadcast networks, DROTHER-to-DROTHER neighbors can correctly remain 2-Way while each forms Full adjacency with DR/BDR. For a missing route, identify which exact LSA should represent the prefix before assuming the neighbor relationship is the problem.

Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic Link-State Protocol

OSPF is a link-state IGP. Each router describes relevant local state in LSAs, floods those advertisements within their defined scope, and builds an LSDB that should become logically consistent with peers in the same area.

Subtopic Router ID

The OSPF Router ID is a 32-bit identifier, written in dotted-decimal form, that identifies the OSPF speaker independently of the interface address carrying a particular adjacency.

Subtopic Neighbor

An OSPF neighbor exists when routers can exchange and accept Hello packets on an OSPF-enabled link.

Subtopic Adjacency

OSPF adjacency is stronger than simple neighbor discovery. After compatible Hellos establish neighbor awareness, routers that must synchronize databases move through ExStart, Exchange and Loading before Full.

Subtopic LSDB

The OSPF LSDB is the protocol database of LSAs known in the relevant area or flooding scope.

Subtopic SPF

OSPF runs Dijkstra SPF over the link-state topology to compute shortest paths from the local router as the root.

Subtopic Cost

OSPF cost is the metric accumulated along a path and consumed by SPF.

Subtopic Areas

OSPF areas partition the link-state domain so detailed Type 1/2 topology is scoped within an area while ABRs exchange summarized inter-area reachability using the backbone architecture.

Subtopic Backbone Area 0

Area 0 is the OSPF backbone. In a normal multi-area design, non-backbone areas connect to the backbone through ABRs so inter-area reachability can be propagated consistently.

Subtopic DR

On OSPF broadcast and NBMA multiaccess networks, the Designated Router reduces adjacency scale by becoming the central synchronization peer for DROTHER routers and, when appropriate, originating the Type 2 Network LSA that represents the shared segment.

Subtopic BDR

The Backup Designated Router is elected with the DR on OSPF multiaccess segments and maintains Full adjacency with the other segment participants so it can take over when the DR disappears.

Subtopic LSA concepts

OSPF communicates topology through Link-State Advertisements rather than by sending a final routing table to neighbors.

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.
ReferenceImportant terms & boundaries5 sections · depth on demand

Key points

  • Neighbor is not always the same as FULL adjacency

- Every router has a 32-bit Router ID

- LSDBs should be consistent within the same area

- SPF works from link-state information, not hop count

- DR/BDR roles reduce adjacency/flooding overhead on broadcast multiaccess networks.

In depth

OSPF fundamentals: neighbours, adjacencies, the LSDB and SPF

RFC 2328 defines OSPF version 2. Router IDs are 32-bit numbers that identify each router uniquely in the autonomous system. Routers exchange Hellos to find neighbours, form adjacencies with some of them, flood link-state advertisements (LSAs), and each computes its own shortest-path tree.

Building blocks

ElementRole
Router ID32-bit identifier, often a loopback address
Hello protocolFinds neighbours and checks parameters; elects DR and BDR on multi-access networks
AdjacencyA neighbour relationship where databases are synchronised
LSAA description of a router, network, or external destination
LSDBAll LSAs for an area; identical on every router in the area
SPFDijkstra's algorithm, run separately per area

Parameters that must match (RFC 2328, Section 10.5)

ParameterEffect of a mismatch
Hello interval and dead intervalHello dropped
Network mask (broadcast and NBMA)Hello dropped; ignored on point-to-point links
Area IDPacket rejected
Stub flag (E-bit)Hello dropped
AuthenticationPacket rejected
R1# show ip ospf interface TenGigabitEthernet1/1/1
TenGigabitEthernet1/1/1 is up, line protocol is up
  Internet Address 10.255.0.1/30, Area 0, Attached via Network Statement
  Process ID 1, Router ID 10.0.0.1, Network Type POINT_TO_POINT, Cost: 1
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 10.0.0.4

Router classes (from RFC 2328)

ClassDefinition
Internal routerAll interfaces in one area
Area border router (ABR)Interfaces in several areas
Backbone routerAt least one interface in area 0
AS boundary router (ASBR)Injects external routes

Why link state

Every router has the full topology of its area, so it computes loop-free paths itself, without relying on neighbours' conclusions as distance-vector protocols do. The cost is memory and CPU for the LSDB and SPF, which areas keep in check.

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 fundamentals: routers discover neighbors with Hellos, form adjacencies, flood LSAs so all routers in an area share the same LSDB, and each runs SPF to calculate loop-free shortest paths. Cost (based on bandwidth) is the metric, and areas structure larger networks.

Default (broadcast/P2P)Value
Hello / Dead10 / 40 s
AD110
Reference bandwidth100 Mbps
Multicast addresses224.0.0.5 (all), 224.0.0.6 (DR/BDR)
ProtocolIP 89

Neighbors must agree on area, subnet/mask, Hello/Dead timers, authentication, area type and MTU.

Concept and state model

OSPF operates per interface and area. Hello packets establish neighbor compatibility and maintain liveness; adjacency formation then synchronizes the link-state database where the network type and roles require it. LSAs describe routers, shared networks, inter-area information and external reachability according to type and scope. Each router runs SPF against its local LSDB to derive candidate paths, then OSPF route preference and the system RIB decide what becomes installed. Interface cost contributes to SPF path cost and is conceptually separate from administrative distance. Area 0 is the backbone for normal multi-area design, while ABRs connect area LSDB domains and can summarize or filter specific inter-area information according to feature semantics.

Operational boundaries and common misconceptions

FULL adjacency does not show the desired prefix exists in the LSDB, that SPF selects it, that the route wins the RIB or that forwarding works. Conversely, a 2-Way state is not automatically unhealthy on a broadcast segment. Router ID is an OSPF identity and need not be a forwarding address. Cost is an OSPF metric; administrative distance is a later RIB-selection concept. Treat area scope and LSA ownership carefully: the same prefix can be represented differently across intra-area, inter-area and external boundaries.

ReferenceConfiguration & state1 section · depth on demand

Configuration model and design choices

Define a stable Router ID and deliberate interface/area membership. OSPF can be enabled through network statements or interface-oriented configuration depending on the chosen style, but the operational result should be explicit: which interfaces participate, which area each belongs to, what network type applies and which interfaces are passive. Passive interfaces can advertise connected prefixes without forming neighbors and are often appropriate on endpoint-facing networks. Authentication, timers, MTU-related behavior and network type must agree where adjacency requires them. Set cost deliberately when path selection must differ from default reference-bandwidth behavior.

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 → OSPF Fundamentals. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc2328.html · confidence 94%
2026-09-13 · vendor docCisco IOS XE current

Official Cisco vendor documentation reviewed for bounded reference claims: OSPF neighbor, LSDB, SPF and route-installation reference boundaries. This is documentation-based technical verification, not lab or production-runtime proof. Deployment-specific applicability and runtime outcome remain separate evidence.

Basis: https://www.cisco.com/c/en/us/td/docs/switches/lan/c9000/lyr3-fwd/ospf/ospf-configuration-guide/ospf.html · confidence 94%
Embedded reference data

Quick lookup tables

OSPF packet types

The five OSPF packet types used for discovery and database synchronization.

TypeNameRole
1HelloNeighbor discovery/maintenance and election information
2Database Description (DBD)Summarizes LSDB contents during synchronization
3Link-State Request (LSR)Requests specific LSAs
4Link-State Update (LSU)Carries one or more LSAs
5Link-State Acknowledgment (LSAck)Acknowledges reliable LSA flooding

OSPF Fundamentals · reference boundaries

Compact technical reference for the most important state and interpretation boundaries.

OSPF layerHealthy referenceCanonical command
Interface/areaIntended interface participates in intended areashow ip ospf interface brief
Neighbor/adjacencyState appropriate for network type/roleshow ip ospf neighbor
LSDBExpected LSA exists with intended origin/scopeshow ip ospf database
RIBIntended OSPF route installed when selectedshow ip route ospf
Confirmation

Confirm action

Continue?