Week 6 · Lab

LAB: OSPF Single Area

Three routers, three LANs, and a triangle of links — all in one OSPF area 0. When OSPF is configured correctly, every router automatically learns every network, and when you disconnect a link, OSPF reconverges and traffic takes the remaining path. That last part is what makes dynamic routing worth the configuration effort.

CCNA 200-301 Domain 3.0 · IP Connectivity Verified 2026-10-11
Learning objectives
Part 1

Overview and goal

This lab uses three routers connected in a loop: R1–R2, R2–R3, and R1–R3. Each router also has one LAN. The goal is that every router automatically learns all LANs by running OSPF in a single area, and — the part worth watching — that a failed link causes traffic to reroute automatically instead of failing.

Definition — single-area OSPF Every router belongs to the same area 0 (the backbone), so all of them share one link-state database. There are no area borders to configure — just one network ... area 0 statement per advertised network.

The commands work in Packet Tracer, GNS3, EVE-NG, and on real IOS routers. Prompts such as R1(config-router)# match what you will see on a real console.

In this lesson · select a part to jump

Key ideas & exam traps · select one

Part 2

Topology

R1 (1.1.1.1) R2 (2.2.2.2) R3 (3.3.3.3) G0/0: 10.0.0.0/30 R1 .1 — R2 .2 G0/1: 10.0.2.0/30 R1 .1 — R3 .2 G0/1: 10.0.1.0/30 — R2 .1 — R3 .2 LAN 192.168.1.0/24 LAN 192.168.2.0/24 LAN 192.168.3.0/24
Every router is directly connected to two others, so any LAN has at least two paths in the routing table. OSPF will pick the shortest cost; when one link fails, the alternate path takes over without any manual change.
Part 3

Addressing plan

DeviceInterfaceIP address / maskOSPF network statement
R1GigabitEthernet 0/010.0.0.1 /30network 10.0.0.0 0.0.0.3 area 0
R1GigabitEthernet 0/110.0.2.1 /30network 10.0.2.0 0.0.0.3 area 0
R1GigabitEthernet 2/0192.168.1.1 /24network 192.168.1.0 0.0.0.255 area 0
R2GigabitEthernet 0/010.0.0.2 /30network 10.0.0.0 0.0.0.3 area 0
R2GigabitEthernet 0/110.0.1.1 /30network 10.0.1.0 0.0.0.3 area 0
R2GigabitEthernet 2/0192.168.2.1 /24network 192.168.2.0 0.0.0.255 area 0
R3GigabitEthernet 0/010.0.1.2 /30network 10.0.1.0 0.0.0.3 area 0
R3GigabitEthernet 0/110.0.2.2 /30network 10.0.2.0 0.0.0.3 area 0
R3GigabitEthernet 2/0192.168.3.1 /24network 192.168.3.0 0.0.0.255 area 0
Exam tip — /30 wildcard The /30 mask is 255.255.255.252, whose wildcard is 0.0.0.3. A common error is writing 0.0.0.255 for a point-to-point link, which would match four times as much address space and can drag unintended interfaces into OSPF.
Reference table · select a row

Part 4

Step 1 — Build the topology

  1. Add 3 routers (4321 or 2911 in Packet Tracer).
  2. Connect R1 G0/0 → R2 G0/0, R2 G0/1 → R3 G0/0, and R1 G0/1 → R3 G0/1 using cross-over cables, fibre, or serial links. Routers are end devices on these links, so straight-through copper will not come up reliably.
  3. Leave one GigabitEthernet 2/0 free on each router for its LAN interface.
Serial note If you use serial interfaces, put addresses on Serial0/0/0 instead, and set clock rate on the DCE side. The hello/dead timers are still 10 s / 40 s when the network type is point-to-point.
Part 5

Step 2 — Address the routers

Give every connection its address and bring the interfaces up. R1 first:

Router> enable
Router# configure terminal
Router(config)# hostname R1
R1(config)# interface gigabitEthernet 0/0
R1(config-if)# ip address 10.0.0.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# interface gigabitEthernet 0/1
R1(config-if)# ip address 10.0.2.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# interface gigabitEthernet 2/0
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# end

Repeat the pattern on R2 (10.0.0.2, 10.0.1.1, 192.168.2.1) and R3 (10.0.1.2, 10.0.2.2, 192.168.3.1). Verify all nine interfaces are up/up:

R3# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     10.0.1.2        YES manual up                    up
GigabitEthernet0/1     10.0.2.2        YES manual up                    up
GigabitEthernet2/0     192.168.3.1     YES manual up                    up
Part 6

Step 3 — Enable OSPF on R1, R2, R3

Each router runs OSPF process 1, sets its router ID, advertises its three networks into area 0, and makes the LAN interface passive so no Hellos go toward hosts:

! R1
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 10.0.0.0 0.0.0.3 area 0
R1(config-router)# network 10.0.2.0 0.0.0.3 area 0
R1(config-router)# network 192.168.1.0 0.0.0.255 area 0
R1(config-router)# passive-interface GigabitEthernet2/0
R1(config-router)# end
! R2 — mirror for its own links
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 10.0.0.0 0.0.0.3 area 0
R2(config-router)# network 10.0.1.0 0.0.0.3 area 0
R2(config-router)# network 192.168.2.0 0.0.0.255 area 0
R2(config-router)# passive-interface GigabitEthernet2/0
R2(config-router)# end
! R3
R3(config)# router ospf 1
R3(config-router)# router-id 3.3.3.3
R3(config-router)# network 10.0.1.0 0.0.0.3 area 0
R3(config-router)# network 10.0.2.0 0.0.0.3 area 0
R3(config-router)# network 192.168.3.0 0.0.0.255 area 0
R3(config-router)# passive-interface GigabitEthernet2/0
R3(config-router)# end
Why passive on the LAN side Nothing on 192.168.x.0/24 runs OSPF. Without the passive interface, R1 would keep sending Hellos out toward the LAN and form no adjacency — pure wasted traffic. The command keeps the network advertised while silencing the chatter.
Part 7

Step 4 — Verify neighbours

Give OSPF a few seconds, then ask R1 who it found:

R1# show ip ospf neighbor
Neighbor ID     Pri   State      Dead Time   Address     Interface
2.2.2.2           1   FULL/DR    00:00:34    10.0.0.2    GigabitEthernet0/0
3.3.3.3           1   FULL/BDR   00:00:31    10.0.2.2    GigabitEthernet0/1

Each row shows the neighbour's router ID (which proves the router IDs were applied), the state, the address, and the interface. FULL means the databases are synchronised. On a broadcast Ethernet link you will also see DR/BDR roles; on a strictly point-to-point pair you would see FULL/—.

Exam tip — reading the output Neighbor ID 2.2.2.2 FULL/DR tells you the neighbour chose R2 as its DR for that segment and R1 is fully adjacent to it. A state stuck at INIT or EXSTART almost always means mismatched parameters (timers, area, or MTU).
Part 8

Step 5 — Verify routes

R1# show ip route ospf
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O       10.0.1.0/30 [110/2] via 10.0.2.2, 00:02:14, GigabitEthernet0/1
O       192.168.2.0/24 [110/2] via 10.0.0.2, 00:02:14, GigabitEthernet0/0
O       192.168.2.0/24 [110/2] via 10.0.2.2, 00:02:14, GigabitEthernet0/1
O       192.168.3.0/24 [110/1] via 10.0.2.2, 00:02:14, GigabitEthernet0/1

Read the key fields. Every O route is OSPF-learned. The bracketed [110/2] is administrative distance 110, cost 2. Because all three links are Gigabit Ethernet (cost 1 with the default 100 Mbps reference), R1 reaches 192.168.2.0/24 with cost 2 two different ways — straight to R2, or via R3 — and OSPF installs both for equal-cost load balancing.

Confirm R2 agrees and sees 192.168.1.0/24 and 192.168.3.0/24 as O routes, and R3 sees the other two /24 LANs too. If any LAN is missing, check that the corresponding network statement exists and the interface is up.

Part 9

Step 6 — Test connectivity

End-to-end tests are the real proof:

R1# ping 192.168.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 ms

R1# ping 192.168.2.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 ms

R2# ping 192.168.3.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 ms

Every router reaches every LAN through OSPF alone. Notice you typed no static routes — that is the payoff of a dynamic protocol.

Part 10

Step 7 — Fail a link and watch reconvergence

Now break the direct R1–R2 link and watch the network heal itself. Shut the interface on one end only (the far end will notice when its dead timer expires at 40 seconds, but the local router reacts immediately):

R1(config)# interface gigabitEthernet 0/0
R1(config-if)# shutdown
R1(config-if)# end

R1 immediately loses its neighbour 2.2.2.2 on G0/0 and floods a new LSA for its changed topology. After a short convergence, the routing table still contains 192.168.2.0/24 — only the path changes:

R1# show ip route ospf
...
O       192.168.2.0/24 [110/2] via 10.0.2.2, 00:00:14, GigabitEthernet0/1

The route now points to R3 only (R1→R3→R2), and a ping still succeeds:

R1# ping 192.168.2.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 ms

Restore the link when you are done:

R1(config)# interface gigabitEthernet 0/0
R1(config-if)# no shutdown

Within a couple of Hello cycles (10 s) the neighbour returns to FULL and the load balanced second path reappears. This reconvergence you just watched automated is the entire reason networks run OSPF rather than hand-managed static routes in a loop topology.

Exam tip — how fast is convergence? OSPF keeps the route table corrent by timing: a neighbour is declared dead when four Hello intervals pass without hearing it (40 s dead timer). Poisoned or failed links are flagged instantly on the local router; remote routers learn of the change after LSA flooding and an SPF run. Don’t quote a single number — say “within the dead timer and one SPF run”.
Part 11

Step 8 — Troubleshooting guide

SymptomProbablyTo check
No neighbour appears in show ip ospf neighborOSPF not enabled on the matching network, area mismatch, interface down, or Hellos blocked.show ip ospf interface; verify both network statements and the area; show ip interface brief.
Neighbour stuck at INITOne router is not running OSPF on the link, or a passive interface is facing the neighbour.Remove passive-interface from the inter-router link on both ends.
Neighbour stuck at EXSTART/ExchangeMTU mismatch on the link, or a filtering rule blocking OSPF type 89.Compare MTU on both interfaces; clear with clear ip ospf process.
A /24 LAN is learnt by some routers but not othersThe owning router lacks the network statement, or its passive interface list is wrong.show ip protocols or show running-config | section router ospf on the owner.
Route cost looks wrongReference bandwidth, cable speed, or interface bandwidth not consistent.show ip ospf interface brief shows per-interface cost; compare bandwidth settings.
Link re-enabled but no reconvergenceBoth ends still show shutdown, or one side has a stuck neighbour.show ip interface brief — want up/up; then clear ip ospf process.
The clear ip ospf process debugger's friend clear ip ospf process restarts OSPF and forces all adjacencies to rebuild. Use it after a router-ID change or a stuck neighbour, but expect a few seconds of downtime, and remember it is a privileged exec command, not a debug.
Key terms

The vocabulary you need

Every term below appears in the lesson text above. Select one to read its definition, then use the quiz at the end to check what stuck.

Key terms · select a term

Part 12 · Your turn

Review

Check what you have learned with these review questions.

Review · 4 questions

Sources

Sources & references

  1. Cisco. CCNA (200-301) Exam Topics. cisco.com.
  2. IETF. Request for Comments (RFCs). rfc-editor.org.
  3. IANA. Internet Assigned Numbers Authority registries. iana.org.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.