Use it to configure IPv4 OSPF or check its basic settings.
OSPFv2
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.
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.
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
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 · 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.
Subtopics
Go one level deeper into this subject.
A single-area OSPFv2 design keeps all participating OSPF interfaces in one area, removing inter-area summarization and ABR behavior from the control-plane path.
Subtopic Broadcast NetworkBroadcast Network: DR, BDR, DROTHER.
Subtopic Point-to-PointOSPFv2 point-to-point network type models a link with exactly two OSPF peers.
Subtopic CostOSPF cost reference for interface metric calculation, reference bandwidth, manual overrides, path accumulation and the difference between SPF preference and real throughput.
Subtopic Multi-Area OSPFMulti-area OSPFv2 partitions the link-state domain so each router keeps detailed topology only for its own area or areas, while ABRs connect those scopes and advertise inter-area reachability through the backbone.
Subtopic SummarizationOSPFv2 summarization is performed at specific information boundaries, not arbitrarily on any router.
Subtopic FilteringOSPF filtering must be described by the boundary it actually controls.
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.
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)
| Command | Purpose |
|---|---|
ip ospf cost | Fixed cost; overrides auto-cost |
ip ospf priority 0–255 | DR election weight (default 1) |
ip ospf hello-interval / dead-interval | Timers; must match neighbours |
ip ospf message-digest-key <id> md5 <key> | MD5 authentication key |
passive-interface | Stops 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.
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.
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
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 → OSPFv2. 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: 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%Quick lookup tables
OSPFv2 · operational reference
Compact state and interpretation boundaries for fast lookup.
| OSPFv2 layer | Canonical evidence | What it proves |
|---|---|---|
| Interface | show ip ospf interface | Area/type/timers/cost/local state |
| Neighbor | show ip ospf neighbor | Adjacency/FSM state |
| LSDB | show ip ospf database | LSA presence and ownership |
| RIB | show ip route ospf | Installed OSPF routes |