Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Link-State Protocol

Direct answer

OSPF is a link-state routing protocol: each router describes its links in LSAs, floods them to all routers in the area, and every router builds the same topology database (LSDB). Each router then runs SPF to calculate its own best paths.

When to use this

Use it when the design or fault is specifically about the link-state operating model in which routers flood LSAs, build a topology database and independently calculate shortest paths. Stay on that boundary until configuration intent, live control/security state and the adjacent dependency agree.

First 30 seconds

1. A link-state protocol floods topology so each router computes paths with SPF.

2. Every router in an area has the same map.

3. Converges fast but needs consistent design.

4. Areas limit scope.

5. Check neighbours, LSDB and routes in that order.

Operational verification

adjacencies → LSA flooding → LSDB → SPF → routes

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 · IOS/IOS XE · Cisco IOS XE
Key commandshow ip ospf neighbor
Scope / prerequisiteUse it when the design or fault is specifically about the link-state operating model in which routers flood LSAs, build…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

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

5 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 Operational verification and known-good state Verify boundary
show ip ospf neighbor
show ip ospf database
show ip ospf database database-summary
show ip route ospf

The four commands follow the protocol's own order: who are my neighbours and in what state, what is in the database, how many LSAs of each type (to compare with another router in the same area), and which routes came out of the calculation.

Known-good: all expected adjacencies are Full, the database lists a Router LSA for every router in the area and the counts match between routers, and the expected prefixes appear as O or O IA routes.

Step 2 Verification and output interpretation Verify boundary

Verify link-state behavior in layers: neighbor/adjacency state shows who can exchange information; the LSDB shows which LSAs are actually known; SPF/route views show what paths were calculated; the RIB shows what routes were installed; CEF shows forwarding programming. Use LSA sequence, age and advertising-router identity to distinguish current information from stale assumptions. When two routers disagree, compare LSDB scope before comparing RIBs because different area membership can legitimately produce different databases. Time-correlate topology changes with SPF and route updates. For Link-State Protocol, capture the exact Router ID, interface, area and timestamp with the output, then compare the next evidence layer rather than stopping at the first healthy line. A useful verification chain is interface/role → neighbor or LSDB object → OSPF calculation → RIB → CEF, with each transition independently confirmed.

Step 3 Verification & troubleshooting Narrow the fault

1. show ip ospf neighbor → adjacencies are FULL (or 2WAY between two non-designated routers).

2. show ip ospf database → the LSAs of the area; show ip ospf database database-summary gives counts to compare between routers.

3. show ip route ospf → the routes that result.

4. For a missing route, ask first whether its LSA is in the database. If not, the originating router is not advertising it or flooding is broken. If it is, look at the SPF result, cost, or a competing route source.

Step 4 Failure signatures and troubleshooting branches Narrow the fault
  • A route is missing on every router. The originating router does not advertise it: the interface is not in OSPF there.
  • A route is missing on one router only. That router has an adjacency that is not Full, is in a different area, or filters the route on its way into its own routing table.
  • Databases differ between two routers of the same area. An adjacency is stuck before Full; MTU is the usual suspect.
  • The route exists but takes an unexpected path. Add up the interface costs along both paths.
  • SPF runs constantly. A link somewhere in the area is flapping.
  • Someone tries to filter a route inside an area. That cannot be done; filtering belongs on the area border.
Step 5 When the problem is really fixed Narrow the fault
  • All intended adjacencies are Full and stable.
  • Routers in the same area report the same number of LSAs.
  • The expected prefixes are in the routing table with the expected cost.
  • The SPF run counter is not climbing.
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.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

Do not infer service health from one command. For Link-State Protocol, distinguish configured intent, protocol/security state, installed forwarding state and the original workload result.

Key checks
  • show ip ospf — process, router ID, areas
  • show ip ospf neighbor — adjacencies
  • show ip route ospf — routes learned
ReferenceWhat it is1 section · depth on demand

What it is

OSPF is a link-state routing protocol. Every router describes its own links, that description is flooded to all routers in the area, and each router builds the same map of the area from those descriptions and calculates its own shortest paths on it.

ReferenceWhy it matters1 section · depth on demand

Why it matters

This is different from a distance-vector protocol, where a router knows only the distances its neighbours report. The difference shapes how you troubleshoot. All routers in an area must hold identical information, so a routing problem is one of two kinds: the map is incomplete (a flooding or adjacency problem), or the map is right and the calculation gives a result you did not expect (a cost problem). It is also why routes cannot be filtered inside an area — everyone needs the same map.

ReferenceImportant terms & boundaries6 sections · depth on demand

Key points

  • Three tables: neighbours, the link-state database (LSDB) and the routing table.
  • Information travels as LSAs, flooded reliably (each is acknowledged), refreshed every 30 minutes and discarded after 60 if not refreshed.
  • Every router in an area holds the same LSDB.
  • Each router runs the SPF calculation with itself as the root.
  • The metric is cost: the sum of the outgoing interface costs along the path.
  • Areas limit how far the detail is flooded; between areas only summaries are passed.
  • Administrative distance 110, IP protocol 89, multicast addresses 224.0.0.5 and 224.0.0.6.

In depth

Link-state protocol: every router builds the map itself

In a link-state protocol, each router describes its own links and neighbours in an advertisement, floods it to every router in the area, and collects everyone else's. The result is a complete map of the area. RFC 2328 states that each router runs the shortest-path calculation separately for each area it belongs to.

Link state versus distance vector

Link state (OSPF, IS-IS)Distance vector (RIP, EIGRP's base)
Routers learnThe topologyNeighbours' best routes
Path computationEach router runs SPF on the mapEach router trusts neighbours' metrics
UpdatesTriggered by change, floodedPeriodic or triggered, neighbour to neighbour
Loop preventionInherent in the shared mapSplit horizon, hold-down, feasibility (EIGRP)
Resource useMore memory and CPULess

What a router advertises (RFC 2328 LSA types)

TypeLSAOriginated byScope
1Router LSAEvery routerOne area
2Network LSADR of a broadcast or NBMA segmentOne area
3Summary LSA (networks)ABRInto an area
4Summary LSA (ASBR)ABRInto an area
5AS-external LSAASBRWhole AS except stub areas
R1# show ip ospf database router 10.0.0.2
  LS age: 388
  Link State ID: 10.0.0.2
  Advertising Router: 10.0.0.2
  LS Seq Number: 8000001C
   Number of Links: 4
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 10.0.0.1
      TOS 0 Metrics: 10
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.0.0.2
     (Link Data) Network Mask: 255.255.255.255
      TOS 0 Metrics: 1

Consequences

PropertyEffect
Fast, loop-free convergenceEach router recomputes from the same data
Flooding scales with area sizeAreas limit how far LSAs travel
Consistent view requiredAll routers in an area must have the same LSDB

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 protocol: instead of passing routing tables between neighbors (distance-vector), every router floods descriptions of its own links, so all routers in an area build the same map of the network and calculate routes from it independently.

Link-stateDistance-vector
Full topology per areaOnly neighbors' best routes
SPF calculationBellman-Ford style updates
Fast, loop-free convergenceLoop-prevention rules needed
More memory/CPULighter

IS-IS is the other widely used link-state protocol, common in service-provider and fabric underlays.

Mechanics and state ownership

The protocol works in a fixed sequence. Hello packets discover the neighbours on each link. Neighbours that become adjacent synchronise their databases. Each router originates a Router LSA listing its links, their costs and the neighbours reached over them; on a multi-access segment the designated router adds a Network LSA for the segment.

When something changes — a link goes down, a cost is altered — the affected router issues a new version of its LSA with a higher sequence number. Each router that receives it acknowledges it, stores it and passes it on, so the change reaches the whole area within moments. Every router then reruns SPF on the updated database.

Because all routers in the area work from the same data with the same algorithm, their results fit together, and that consistency is what keeps the paths loop-free. It is also the weak point: if two routers hold different databases, their results no longer fit.

State model and technical mechanics

A link-state protocol distributes topology descriptions rather than simply advertising a hop-by-hop distance vector. In OSPF, routers originate LSAs describing links, prefixes or other topology information; those LSAs are flooded within defined scope and stored in the LSDB. Routers in the same area aim to have a consistent view of the area LSDB, then independently run SPF and related route calculations to derive candidate paths. Route installation is a later step in the local RIB and can be affected by route type, preference and competing protocols. This separation between topology database and route table is central to interpreting OSPF correctly. For Link-State Protocol, keep the local interface and area context attached to every state observation, because the same label can have different meaning on point-to-point versus multiaccess links or on an ABR versus an internal router. The authoritative interpretation is the combination of role, scope and object identity at that moment, not the label in isolation.

Limits and common misconceptions

“Link-state” does not mean every router knows the entire autonomous system topology; OSPF area boundaries limit detailed topology scope. Identical LSDBs also do not require identical RIBs if local interface state, policy, route preference or connected routes differ. A recent LSA is not automatically evidence of a fault, and frequent SPF runs are symptoms of topology change rather than evidence of the root cause. Keep flooding, database, calculation, installation and forwarding as distinct evidence stages. For Link-State Protocol, avoid turning one control-plane state into a universal root-cause statement.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration model

Design link-state domains with stable area boundaries, Router IDs and interface costs so topology changes have predictable scope. Avoid unnecessary adjacency churn because a link-state event can trigger flooding and path recalculation beyond the local interface. Use summarization and area design to control the amount of topology/reachability information crossing boundaries where appropriate. Keep redistribution deliberate because external information enters OSPF with different semantics from native intra-area topology. Configuration should express topology truth rather than attempting to tune every path with arbitrary costs without documenting the intent. For Link-State Protocol, record the intended area, network type, peer/role expectation and route-design consequence before changing knobs. This makes a later Round-trip update able to distinguish a design choice from accidental drift and prevents a local OSPF setting from being treated as an unrelated application or transport fix.

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

Basis: https://www.rfc-editor.org/rfc/rfc2328.html · confidence 94%
Embedded reference data

Quick lookup tables

Link-State Protocol operational reference

Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.

BoundaryKnown-good for Link-State ProtocolSuspicious signatureNext proof
IntentMatches the link-state operating model in which routers flood LSAs, build a topology database and independently calculate shortest paths designConfiguration differs from design/peerCompare effective configuration
Control/security stateStable expected neighbor/database/binding/election stateneighbors reaching Full while the expected LSA is missing, LSDB divergence inside an area, repeated topology/SPF churn, or a valid LSA that never becomes the expected RIB/FIB routeInspect protocol/security detail and adjacent state
ForwardingExpected Layer-2 or RIB/FIB/gateway pathControl state exists but traffic path disagreesMAC/ARP/RIB/FIB/CEF proof
ClosureOriginal test passes for explained reasonSymptom moved, was bypassed or protection disabledRegression test
Confirmation

Confirm action

Continue?