OSPFv2 Single Area for CCNA: Three Routers, Router ID and Neighbors
OSPF is the most important link-state routing protocol in the CCNA. In a single area all routers share the same link-state database and compute routes with the SPF algorithm. This is the reference lab.

Edit this template Download .json
Learning objectives
- Enable OSPF with router ID, network and area 0.
- Configure passive interfaces toward user LANs.
- Verify neighbors, routing table and interface cost.
Devices and addressing
| Device | Type | Details |
|---|---|---|
| PC1 | PC / user | 192.168.1.10 |
| R1 | Router | RID 1.1.1.1 G0/0 192.168.1.1/24 |
| R2 | Router | RID 2.2.2.2 G0/0 192.168.2.1/24 |
| PC2 | PC / user | 192.168.2.10 |
| R3 | Router | RID 3.3.3.3 G0/0 192.168.3.1/24 |
| PC3 | PC / user | 192.168.3.10 |
Reference configuration (Cisco IOS)
R1
router ospf 1
router-id 1.1.1.1
network 192.168.1.0 0.0.0.255 area 0
network 10.0.12.0 0.0.0.3 area 0
network 10.0.13.0 0.0.0.3 area 0
passive-interface g0/0
R2
router ospf 1
router-id 2.2.2.2
network 192.168.2.0 0.0.0.255 area 0
network 10.0.12.0 0.0.0.3 area 0
network 10.0.23.0 0.0.0.3 area 0
passive-interface g0/0
R3
router ospf 1
router-id 3.3.3.3
network 192.168.3.0 0.0.0.255 area 0
network 10.0.13.0 0.0.0.3 area 0
network 10.0.23.0 0.0.0.3 area 0
passive-interface g0/0
Verification commands
show ip ospf neighborshow ip route ospfshow ip ospf interface briefshow ip protocols
CCNA exam tips
The router ID is chosen by: router-id command, highest loopback, highest active interface.
Neighbors must match in area, hello/dead, mask and authentication to form an adjacency.
How to use this template
Press “Edit this template”: the editor opens with the topology loaded and ready to change (undo with Ctrl+Z). You can also copy the JSON and paste it into the editor with File ▸ Import JSON…. Then add devices, change IPs and export to PDF, PNG or SVG.
To practice, rebuild the topology in Cisco Packet Tracer, GNS3 or Cisco Modeling Labs and paste the reference configuration on each device. Addresses and names are examples: change them to create your own variants.
JSON template for the editor
This is the full diagram in JSON format. Paste it into the editor (File ▸ Import JSON…) or press the edit button to load it automatically.
Frequently asked questions
What is area 0?
The backbone area: every other area must connect to it.
How is OSPF cost calculated?
Reference bandwidth (100 Mbps by default) divided by the interface bandwidth.