free lab · CertCrack Packet Tracer Labs · All labs

Lab 6: Single-Area OSPFv2

CCNA domain: Domain 3 · IP Connectivity (OSPFv2)  ·  Difficulty: Intermediate  ·  Time: ~35 minutes  ·  Devices: 3 routers (2911), 3 PCs

Lab 5 worked, but every route was typed by hand — add one LAN and you would be editing three routers. This lab rebuilds the same three-router chain with single-area OSPFv2 doing the teaching automatically. You will set stable router IDs, advertise each network with a network statement and its wildcard mask, quiet the LAN interfaces with passive-interface, and watch adjacencies form and routes appear on their own.

Your progress on this lab

0 of 5 tasks done — tick tasks off as you finish them; progress is saved in this browser.

What you need

Topology

R1RID 1.1.1.1R2RID 2.2.2.2R3RID 3.3.3.3PC0192.168.1.10/24PC1192.168.2.10/24PC2192.168.3.10/24S0/0/0 · 10.0.0.1/30 — 10.0.0.2 · S0/0/0S0/0/1 · 10.0.0.5/30 — 10.0.0.6 · S0/0/0G0/0 · 192.168.1.1G0/0 · 192.168.2.1G0/0 · 192.168.3.1Single-area OSPFv2 — every interface in Area 0

Same addressing as Lab 5 so the comparison is honest: LANs 192.168.1.0/24, 192.168.2.0/24 and 192.168.3.0/24, joined by /30 serial links 10.0.0.0/30 (R1–R2) and 10.0.0.4/30 (R2–R3). Everything sits in OSPF Area 0 — with a single area there is no backbone design to worry about, and every router ends up with the full map.

DeviceInterfaceIP addressNotes
R1GigabitEthernet 0/0192.168.1.1 /24LAN A — advertised, then made passive
R1Serial 0/0/010.0.0.1 /30To R2 — DCE end, clock rate here
R2Serial 0/0/010.0.0.2 /30To R1
R2GigabitEthernet 0/0192.168.2.1 /24LAN B — advertised, then made passive
R2Serial 0/0/110.0.0.5 /30To R3 — DCE end, clock rate here
R3Serial 0/0/010.0.0.6 /30To R2
R3GigabitEthernet 0/0192.168.3.1 /24LAN C — advertised, then made passive
R1 / R2 / R3OSPF router ID1.1.1.1 / 2.2.2.2 / 3.3.3.3Set manually under router ospf 1
PC0 / PC1 / PC2FastEthernet 0192.168.1.10 / .2.10 / .3.10Gateways: the local router's G0/0 address

Tasks

Build the topology first, then work through the tasks in order. Try each task from memory before you open the commands — that is how the skill sticks. Click Show commands only when you are stuck or to check your work.

Task 1 — Address all interfaces (no routes this time)

Configure the LAN and serial addresses exactly as in Lab 5 — LAN gateways on each G0/0, the /30 serial pairs with clock rate 64000 on R1's S0/0/0 and R2's S0/0/1, no shutdown everywhere, and the three PCs with static addresses and local gateways. Then check show ip route: each router knows only its connected networks. Everything beyond that is OSPF's job now.

On R1:
interface gigabitEthernet 0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
interface serial 0/0/0
ip address 10.0.0.1 255.255.255.252
clock rate 64000
no shutdown
exit

On R2:
interface gigabitEthernet 0/0
ip address 192.168.2.1 255.255.255.0
no shutdown
interface serial 0/0/0
ip address 10.0.0.2 255.255.255.252
no shutdown
interface serial 0/0/1
ip address 10.0.0.5 255.255.255.252
clock rate 64000
no shutdown
exit

On R3:
interface gigabitEthernet 0/0
ip address 192.168.3.1 255.255.255.0
no shutdown
interface serial 0/0/0
ip address 10.0.0.6 255.255.255.252
no shutdown
exit

PCs: PC0 192.168.1.10 gw 192.168.1.1 - PC1 192.168.2.10 gw 192.168.2.1
PC2 192.168.3.10 gw 192.168.3.1 (all masks 255.255.255.0)

Task 2 — Start OSPF on R1 with a fixed router ID

OSPF configuration lives under router ospf 1 — the 1 is a local process ID, only significant on this router. Set the router ID explicitly so it never changes when interfaces flap. Then one network statement per R1 network: the statement does not advertise the prefix itself, it selects which interfaces run OSPF — and the real prefix each interface carries is what gets advertised. Note the wildcard mask: for a /24 it is 0.0.0.255, for a /30 it is 0.0.0.3 (each octet is 255 minus the subnet mask octet).

router ospf 1
router-id 1.1.1.1
network 192.168.1.0 0.0.0.255 area 0
network 10.0.0.0 0.0.0.3 area 0
exit

Task 3 — Start OSPF on R2 and R3

Same pattern on the other two routers, with their own router IDs. R2 has three networks to select — its LAN and both serial links. Watch the console after each router is configured: IOS logs %OSPF-5-ADJCHG messages as adjacencies come up, which is your first sign the design is working.

On R2:
router ospf 1
router-id 2.2.2.2
network 192.168.2.0 0.0.0.255 area 0
network 10.0.0.0 0.0.0.3 area 0
network 10.0.0.4 0.0.0.3 area 0
exit

On R3:
router ospf 1
router-id 3.3.3.3
network 192.168.3.0 0.0.0.255 area 0
network 10.0.0.4 0.0.0.3 area 0
exit

Task 4 — Make the LAN interfaces passive

Right now each router is shouting OSPF hellos into its LAN, hunting for neighbors that will never exist there — wasted traffic and a needless security surface. passive-interface stops hellos on G0/0 while still advertising the LAN network into OSPF. This is the standard production pattern: advertise the subnet, silence the port. Apply it on all three routers:

On R1:
router ospf 1
passive-interface gigabitEthernet 0/0
exit

On R2:
router ospf 1
passive-interface gigabitEthernet 0/0
exit

On R3:
router ospf 1
passive-interface gigabitEthernet 0/0
exit

Task 5 — Prove it end to end

From PC0, ping PC1 and PC2. Neither path was configured by hand — every hop was learned. If a ping fails, do not touch the PCs: go to the routers and work the verification list below in order (neighbors first, then routes, then protocols). That sequence is the professional OSPF troubleshooting order.

PC0 > Desktop > Command Prompt:
ping 192.168.2.10
ping 192.168.3.10
tracert 192.168.3.10

Verification

Run these checks from the device CLI (or a PC command prompt where noted). Your output should match the description — wording may vary slightly by Packet Tracer version.

Exam connection

OSPFv2 is the one routing protocol the CCNA still examines in depth, all inside Domain 3. The exam's favorite materials are exactly this lab's: wildcard masks in network statements, router-ID selection order, neighbor states, and what passive-interface does and does not stop. Expect to be shown a show ip ospf neighbor or show ip route output and asked what is missing. Rebuild this lab from memory once and those questions become free marks — then confirm with the free 30-question CCNA practice sample and the CCNA 200-301 guidebook.

Turn lab skills into exam marks

You replaced five hand-typed routes with a protocol that maintains itself. The free sample tests the OSPF theory — wildcard masks, router IDs, neighbor states — behind the commands.

Free CCNA SampleCCNA Guidebook

FAQ

How is a wildcard mask worked out?

Octet by octet, it is 255 minus the subnet mask: a /24 mask 255.255.255.0 becomes wildcard 0.0.0.255, and a /30 mask 255.255.255.252 becomes 0.0.0.3. In a wildcard, 0 means 'this bit must match' and 1 means 'don't care' — which is why the network statement 10.0.0.0 0.0.0.3 selects exactly the four addresses of the /30, and the router picks the interface whose IP falls inside.

If I don't set a router ID, where does OSPF get one?

IOS chooses for you: the highest IP address of any loopback interface wins; with no loopbacks, the highest IP of any active physical interface. The choice is made when the OSPF process starts and stays until the process restarts — which is why setting router-id explicitly is best practice. If you change one later, run clear ip ospf process (and confirm) to apply it.

Does passive-interface stop the network from being advertised?

No — and that is the point that trips people up. Passive interface stops OSPF hello packets (and therefore neighbor formation) on that interface, but the interface's network is still advertised into OSPF by the matching network statement. The LAN stays reachable; the router just stops chatting on a port where no router will ever answer.

← Previous labLab 5: Static Routing & Default Route Next lab →Lab 7: DHCPv4 Server & Relay

More free tools

Packet Tracer LabsAll 10 free CCNA hands-on labs Subnet CalculatorNetwork, broadcast & host ranges from any IP/CIDR Subnetting PracticeTimed subnet drills with worked solutions OSI Model QuizLearn the 7 layers and test yourself All Free ToolsThe CertCrack tools hub