OSPF single-area configuration
Configure single-area OSPFv2: process ID, router ID, network statements or interface OSPF, passive interfaces, and adjacency verification.
OSPFv2 is a link-state IGP: routers flood link-state advertisements inside an area, build an identical topology map, and each computes shortest paths independently. Single-area OSPF commonly uses area 0 in examples, though any single area number is valid. The process ID is locally significant — it need not match between routers.
The router ID is a 32-bit dotted identifier — it may happen to equal a reachable interface address, but the identifier itself does not imply reachability. Selection order: explicit router-id → highest loopback IPv4 → highest up physical interface IPv4. The RID must be unique in the domain; change it and OSPF re-converges.
Enable OSPF on the LAN and WAN interfaces — Privileged EXEC → Router + interface configuration
Cisco IOS / IOS XE
- Know which interfaces should form adjacencies versus advertise their subnets passively.
configure terminal router ospf 1 router-id 1.1.1.1 network 10.0.0.0 0.0.0.3 area 0 network 192.168.10.0 0.0.0.255 area 0 passive-interface gigabitethernet0/2 end
show ip ospf neighbor show ip protocols show ip ospf interface brief show ip route ospf
- Neighbors reach FULL state.
- Only intended interfaces are enabled for OSPF; passive ones are marked passive.
- OSPF (O) routes install in the table.
- Alternative:
ip ospf 1 area 0under each interface — simpler and more precise. - Wildcard masks on network statements are inverse masks (like ACLs), not subnet masks.
Changes device configuration.
Adjacency requirements
| Must match | If mismatched |
|---|---|
| Hello and dead intervals | Neighbors never form — a fixed mismatch prevents adjacency, it does not create stable flapping |
| Area ID | No adjacency |
| Subnet/mask (broadcast) | Stuck — masks must agree |
| Authentication | Packets rejected |
| MTU | Adjacency stalls in ExStart/Exchange |
| Area type flags (stub/NSSA) | No adjacency |
Network type doesn't have to match for adjacency to form — but mismatched DR expectations break the database.
Neighbor ID Pri State Dead Time Address InterfaceRID, DR priority, state, timer, neighbor IP.2.2.2.2 1 FULL/BDR 00:00:38 10.0.0.2 Gi0/1FULL = synchronized; BDR is its role on this segment.3.3.3.3 1 FULL/DR 00:00:33 10.0.0.3 Gi0/1DR role belongs to the neighbor.Related resources
Sources
- Cisco CCNA 200-301 v1.1 Exam Topics (official PDF) — reviewed 2026-11-02
- RFC 2328 — OSPF Version 2 — reviewed 2026-11-02
- Cisco — IP Routing: OSPF Command Reference — reviewed 2026-11-02
Targets CCNA 200-301 v1.1 objectives. Supplemental blocks are labeled beyond exam scope.