Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

OSPFv2

Direct answer

OSPFv2 is OSPF for IPv4. It is configured with a process ID (local only), a router ID (unique 32-bit value), and interfaces placed in areas — with network statements or ip ospf <process> area <area> on the interface.

When to use this

Use it to configure IPv4 OSPF or check its basic settings.

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
Scope / prerequisiteUse it to configure IPv4 OSPF or check its basic settings.
What next?3 suggested next steps
Child topics (this level)7
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.

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

Read OSPF in layers. show ip ospf interface shows local area, process, network type, timers, cost and interface-level state. show ip ospf neighbor shows neighbor/FSM state and DR/BDR roles where relevant. show ip ospf database shows LSA presence and advertising-router information. show ip route ospf shows which OSPF candidates were actually installed in the IPv4 RIB. For one prefix, trace it from originating/connected state to LSA representation to SPF result to the installed route. This avoids declaring the protocol healthy solely because a neighbor is FULL or declaring it broken solely because one route is absent.

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
Drill down

Subtopics

Go one level deeper into this subject.

Key points

The process ID need not match between routers; the area, timers and subnet must. The router ID must be unique in the domain — set it explicitly. Interfaces facing hosts should be passive.

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 & boundaries4 sections · depth on demand

In depth

OSPFv2: OSPF for IPv4 on Cisco IOS XE

OSPFv2 is the IPv4 version of OSPF, defined in RFC 2328. The Catalyst 9300 guide configures it with router ospf <process-id> and enables interfaces with network <address> <wildcard> area <area-id>.

R1(config)# router ospf 1
R1(config-router)# router-id 10.0.0.1
R1(config-router)# network 10.0.0.1 0.0.0.0 area 0
R1(config-router)# network 10.255.0.0 0.0.0.3 area 0
R1(config-router)# network 10.20.0.0 0.0.255.255 area 0
R1(config-router)# passive-interface Vlan20
R1(config)# interface TenGigabitEthernet1/1/1
R1(config-if)# ip ospf cost 10
R1(config-if)# ip ospf message-digest-key 1 md5 <key>
R1(config)# router ospf 1
R1(config-router)# area 0 authentication message-digest
R1# show ip ospf
 Routing Process "ospf 1" with ID 10.0.0.1
 Initial SPF schedule delay 50 msecs
 Minimum hold time between two consecutive SPFs 200 msecs
 Reference bandwidth unit is 100 mbps
    Area BACKBONE(0)
        Number of interfaces in this area is 3

Router ID (documented)

The guide states the router ID is the highest interface IP address, with loopback addresses taking precedence (highest loopback wins). An explicit router-id overrides both. Set it explicitly: a router ID that changes after an interface change causes adjacencies to reset.

Key interface settings (from the guide)

CommandPurpose
ip ospf costFixed cost; overrides auto-cost
ip ospf priority 0–255DR election weight (default 1)
ip ospf hello-interval / dead-intervalTimers; must match neighbours
ip ospf message-digest-key <id> md5 <key>MD5 authentication key
passive-interfaceStops Hellos; the subnet is still advertised

Matching interfaces with network

The wildcard mask selects interfaces by address. network 10.0.0.1 0.0.0.0 area 0 matches exactly one interface. A broad network 0.0.0.0 255.255.255.255 area 0 puts every interface in area 0. Precise statements, or ip ospf <pid> area <id> under the interface, make the configuration easier to read.

Authentication

The guide covers plain text (ip ospf authentication-key, up to 8 bytes) and MD5. Plain text offers no real protection; MD5 is the minimum, and newer IOS XE releases also support HMAC-SHA key chains.

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

OSPFv2 is OSPF for IPv4 (RFC 2328). It is enabled per interface with network statements or interface commands, uses router IDs in dotted-decimal form, and supports areas, authentication (MD5 or HMAC-SHA) and route summarisation at ABRs and ASBRs.

router ospf 1
 router-id 10.0.0.1
 auto-cost reference-bandwidth 100000
 passive-interface default
 no passive-interface Gi0/1
interface Gi0/1
 ip ospf 1 area 0
 ip ospf network point-to-point

Documented example, not captured output.

passive-interface default stops Hellos on user-facing interfaces while still advertising their subnets.

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

State model and protocol mechanics

OSPFv2 separates several state machines that are often collapsed into the single phrase “OSPF is up”. Interfaces belong to areas and have network type, cost, timers and authentication context. Hello exchange discovers neighbors; eligible neighbors may form full adjacency; LSAs then synchronize the Link-State Database within their defined flooding scope. Each router runs SPF against the topology it knows and derives candidate routes. Those candidates still need to win the local routing-table decision before they become installed routes, and installed routes still rely on CEF/adjacency state for forwarding. Router ID identifies the OSPF router independently of interface addressing, while area design controls which LSAs and summary information cross ABR boundaries.

Limits and common misconceptions

FULL adjacency does not show that the expected prefix exists in the LSDB, wins SPF or installs in the RIB. An LSA present in the database does not show the resulting route is preferred over another route source. OSPF cost influences OSPF path selection but does not override longest-prefix match or administrative-distance comparison against a different source for the same prefix length. Passive interfaces can advertise connected prefixes without neighbors. DR/BDR roles apply to multi-access network behavior and are not a universal health requirement. Keep neighbor state, LSDB state, SPF choice, RIB installation and forwarding as separate limits of what the checks show.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration model

A stable OSPFv2 design starts with intentional router IDs, unambiguous area membership and consistent interface expectations. Enable OSPF only on the interfaces that should participate, use passive-interface where the connected prefix should be advertised but no neighbor should form, and make network type/timers/authentication match the actual Layer 2 design. Cost should be deliberate when parallel paths or high-speed links make defaults misleading. Multi-area designs must maintain a coherent backbone relationship and place summarization/filtering only at supported boundaries. Redistribution belongs to a separate routing-policy decision and should not be mixed into basic adjacency configuration.

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 → OSPFv2. 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: OSPFv2 operation and verification. 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

OSPFv2 · operational reference

Compact state and interpretation boundaries for fast lookup.

OSPFv2 layerCanonical evidenceWhat it proves
Interfaceshow ip ospf interfaceArea/type/timers/cost/local state
Neighborshow ip ospf neighborAdjacency/FSM state
LSDBshow ip ospf databaseLSA presence and ownership
RIBshow ip route ospfInstalled OSPF routes
Confirmation

Confirm action

Continue?