Lesson 4 — Single-Area OSPFv2 Configuration
Week 5 outline
- Week 5 overview
- Lesson 1Reading show ip route
- Lesson 2Routing Failure Isolation
- QuizReading & Troubleshooting Routes
- Lesson 3OSPF Concepts and Neighbor Formation
- Lesson 4Single-Area OSPFv2 Configuration (current step)
- QuizOSPF Neighbours & Configuration
- Lesson 5OSPF Cost, DR/BDR, and Default Routes
- Lesson 6OSPF Verification and Troubleshooting
- QuizOSPF Tuning & Verification
- Lesson 7First-Hop Redundancy (HSRP)
- CheckpointWeek 5 Checkpoint
Single-Area OSPFv2 Configuration
Configure single-area OSPFv2 two ways — network statements with wildcard masks and interface-level enablement — set a stable router-id, make LAN interfaces passive, and verify the process.
Lesson orientation
What you'll learn (5 objectives)~44 min: video → lesson → check → apply → lab prep
Learning objectives
- Configure OSPF with a process id and enable it per interface using a correct wildcard mask
- Enable OSPF at interface level with ip ospf <pid> area <id> and explain when to prefer it
- Set a deterministic router-id and explain the selection order and how to apply a change
- Apply passive-interface to advertise a LAN without forming adjacencies on it
- Verify with show ip protocols and show ip ospf interface brief, and fix a duplicate-RID fault
Terms you will see
Time breakdown
- Read the notes22 min
- Routing Table Trainer12 min
- Configuration prediction10 min
Assigned video

Free CCNA | OSPF Part 2 | Day 27 | CCNA 200-301 Complete Course
By Jeremy's IT Lab · Opens externally on YouTube
- Assigned watch
- ~8 min
The link opens in a new browser tab. Return here when you finish watching.
Watch for these concepts
- The router ospf process, network statements, and verification on live gear
Go beyond the video
The assigned video introduces the idea. CCNA Practice Labs completes the learning path: clarify core concepts, explore how each device behaves, visualize the communication path, check your understanding, and prepare for hands-on lab work.
Watch the concept → understand it → visualize it → practice it → apply it.
Pick a process, then say which interfaces participate
Enabling OSPF is a two-decision job. The process is created with router ospf <process-id>, and that ID is locally significant — pick any number, it need not match neighbours. The second decision, which interfaces participate, has two valid styles that coexist happily.
R1(config)# router ospf 1
R1(config-router)# network 10.1.1.0 0.0.0.255 area 0
R1(config-router)# network 10.1.12.0 0.0.0.3 area 0The statement does not advertise a subnet directly. It is a match rule: OSPF examines every local interface, and any interface whose address falls within the given address and wildcard is enabled for OSPF in the stated area. So network 10.1.1.0 0.0.0.255 area 0 enables OSPF on whichever local interface sits in 10.1.1.0/24.
R1(config)# interface GigabitEthernet0/1
R1(config-if)# ip ospf 1 area 0This form is unambiguous — you can see OSPF is on this interface without reverse-engineering a wildcard. Prefer it when you want zero doubt about which interfaces run OSPF; prefer network statements when one line cleanly covers a range. Either way, area 0 is the backbone, and every router in a single-area design lives in it.
Pin the Router ID, and quieten the LANs
OSPF chooses its Router ID at process start: a manual router-id first, else the highest loopback address, else the highest active physical address. Letting it default means an interface flap or a new loopback can silently change the router's identity, and duplicate RIDs across routers cause real faults. Set it explicitly with router-id 1.1.1.1 inside the process.
On a LAN facing end hosts there is no OSPF neighbour to talk to, yet sending Hellos out that interface wastes CPU and — worse — invites a rogue router to peer with you. passive-interface GigabitEthernet0/0 stops Hellos on that port while still advertising its connected network into OSPF.
Verify the configuration before the routes
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 10.1.1.0 0.0.0.255 area 0
R1(config-router)# network 10.1.12.0 0.0.0.3 area 0
R1(config-router)# passive-interface GigabitEthernet0/0
R1(config-router)# end
R1# show ip protocols
Routing Protocol is "ospf 1"
Router ID 1.1.1.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Routing for Networks:
10.1.1.0 0.0.0.255 area 0
10.1.12.0 0.0.0.3 area 0
Passive Interface(s):
GigabitEthernet0/0
Routing Information Sources:
Gateway Distance Last Update
2.2.2.2 110 00:03:11show ip protocols is the fastest confirmation that the configuration is right: it echoes the Router ID, the exact network statements with their wildcards, the passive interfaces, and the neighbours it is learning from. Cross-check which interfaces are actually running OSPF with show ip ospf interface brief.
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Gi0/0 1 0 10.1.1.1/24 1 DR 0/0
Gi0/1 1 0 10.1.12.1/30 1 P2P 1/1Gi0/1 shows one neighbour Full over Count — the transit adjacency. Gi0/0 shows 0/0 because it is passive: it is in OSPF and advertised, but forms no adjacency. That 0/0 on a LAN is expected, not a fault, and reading it as one sends people hunting for a problem that does not exist.
What you should retain
- Enable with network <address> <wildcard> area <id>, a match rule, or per interface with ip ospf <pid> area <id>.
- The wildcard is the inverse of the subnet mask: /24 gives 0.0.0.255, /30 gives 0.0.0.3.
- Router ID: manual, then highest loopback, then highest active address. Changes need clear ip ospf process.
- passive-interface stops Hellos on a LAN but still advertises the connected route — never use it on a transit link.
- Verify the configuration with show ip protocols and show ip ospf interface brief before looking at routes.
Before you read on
You configure network 10.1.12.0 0.0.0.255 area 0 — a /24 wildcard — on a router whose only interface in that range is the 10.1.12.1/30 transit link. Does OSPF still come up on that link? What risk did the too-broad wildcard introduce?
See it happen
Routing Table Trainer
Confirm you can pick out O routes and their costs in a table that also contains connected, static, and default entries. Configuration is only half the skill; recognising the result is the other half.
Check this section before moving on
OSPF Neighbours & Configuration
The quiz opens on its own page so you can focus on it. It is a Week 1 milestone, tracked separately from this lesson's own completion.
Topics covered
- • Link-state mechanics and the facts worth memorising
- • What must match for an adjacency, and what need not
- • The neighbour state machine and stuck states
- • Network statements, wildcards, router-id, and passive-interface
Study deeper
Topic guides extend this lesson — they do not replace the first-party walkthrough above.
OSPF
For network-statement versus interface enablement and the complete wildcard rules
