Use it to understand how OSPF works before configuring or troubleshooting it.
OSPF Fundamentals
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.
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.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip ospfShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
show ip ospfShowDisplay OSPF process Router ID, area/process metadata and operational state.
Use when: Establish whether OSPFv2 is running and identify local process/Router ID/areas before deeper checks.
Quick note: Use as process boundary, then move to interface → neighbor → LSDB → RIB.
Cisco IOS XE · mixedshow ip ospf neighborShowDisplay OSPF neighbor adjacencies.
Use when: OSPF adjacency verification.
Quick note: FULL is the expected adjacency state in normal cases.
IOS/IOS XE · mixedshow ip ospf databaseShowOSPF LSDB inventory and LSA visibility.
Use when: Trace whether expected OSPF topology/reachability information exists in the LSDB.
Quick note: A present LSA is control-plane evidence; check route selection/installation separately.
Cisco IOS XE · mixedshow ip ospf interfaceShowDetailed OSPF interface timers, network type, cost and adjacency context.
Use when: Verify the local interface parameters that govern neighbor formation and path cost.
Quick note: This is the primary per-interface OSPF parameter boundary.
Cisco IOS XE · mixedshow ip protocolsShowDisplay active routing protocol parameters.
Use when: Routing protocol sanity check.
Quick note: Useful companion to route and neighbor tables.
IOS/IOS XE · mixedHow to read the output
show ip ospf neighborLook 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 databaseLook 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.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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.
Subtopics
Go one level deeper into this subject.
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 IDThe 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 NeighborAn OSPF neighbor exists when routers can exchange and accept Hello packets on an OSPF-enabled link.
Subtopic AdjacencyOSPF 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 LSDBThe OSPF LSDB is the protocol database of LSAs known in the relevant area or flooding scope.
Subtopic SPFOSPF runs Dijkstra SPF over the link-state topology to compute shortest paths from the local router as the root.
Subtopic CostOSPF cost is the metric accumulated along a path and consumed by SPF.
Subtopic AreasOSPF 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 0Area 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 DROn 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 BDRThe 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 conceptsOSPF communicates topology through Link-State Advertisements rather than by sending a final routing table to neighbors.
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
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
| Element | Role |
|---|---|
| Router ID | 32-bit identifier, often a loopback address |
| Hello protocol | Finds neighbours and checks parameters; elects DR and BDR on multi-access networks |
| Adjacency | A neighbour relationship where databases are synchronised |
| LSA | A description of a router, network, or external destination |
| LSDB | All LSAs for an area; identical on every router in the area |
| SPF | Dijkstra's algorithm, run separately per area |
Parameters that must match (RFC 2328, Section 10.5)
| Parameter | Effect of a mismatch |
|---|---|
| Hello interval and dead interval | Hello dropped |
| Network mask (broadcast and NBMA) | Hello dropped; ignored on point-to-point links |
| Area ID | Packet rejected |
| Stub flag (E-bit) | Hello dropped |
| Authentication | Packet 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)
| Class | Definition |
|---|---|
| Internal router | All interfaces in one area |
| Area border router (ABR) | Interfaces in several areas |
| Backbone router | At 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.
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 / Dead | 10 / 40 s |
| AD | 110 |
| Reference bandwidth | 100 Mbps |
| Multicast addresses | 224.0.0.5 (all), 224.0.0.6 (DR/BDR) |
| Protocol | IP 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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%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%Quick lookup tables
OSPF packet types
The five OSPF packet types used for discovery and database synchronization.
| Type | Name | Role |
|---|---|---|
| 1 | Hello | Neighbor discovery/maintenance and election information |
| 2 | Database Description (DBD) | Summarizes LSDB contents during synchronization |
| 3 | Link-State Request (LSR) | Requests specific LSAs |
| 4 | Link-State Update (LSU) | Carries one or more LSAs |
| 5 | Link-State Acknowledgment (LSAck) | Acknowledges reliable LSA flooding |
OSPF Fundamentals · reference boundaries
Compact technical reference for the most important state and interpretation boundaries.
| OSPF layer | Healthy reference | Canonical command |
|---|---|---|
| Interface/area | Intended interface participates in intended area | show ip ospf interface brief |
| Neighbor/adjacency | State appropriate for network type/role | show ip ospf neighbor |
| LSDB | Expected LSA exists with intended origin/scope | show ip ospf database |
| RIB | Intended OSPF route installed when selected | show ip route ospf |