Videos/CCNA OSPF Lab
CCNA OSPF Lab
28 min lesson, taught by CISNET instructor Mani Poopal (CCIE).
In this hands on CCNA lab, instructor Mani Poopal (CCIE) walks through configuring single area OSPF across three routers, R1, R2, and R3, all running in area 0. You will learn two ways to enable OSPF, using the network command and enabling it directly on an interface, how to hard code the router ID, how to inject a static default route into OSPF, and how to verify and troubleshoot neighbour adjacencies. The lab also explains OSPF fundamentals such as cost as the metric, network types, DR and BDR election, and the hello and dead intervals that must match for an adjacency to form.
What this lesson covers
- 00:00Lab overview: routers, area 0, and a static default route
- 00:45Requirements: default route, hard coded router IDs, two config methods
- 03:37Configuring OSPF on R1 with the network command and wildcard mask
- 05:06R2: network command for one link, interface method for the other
- 06:51R3: enabling OSPF directly on interfaces, no network command
- 10:05Verifying the routing table, neighbours, and OSPF network types
- 14:11Injecting the static default route with default information originate
- 18:24Cost, hello and dead intervals: breaking and fixing the adjacency
Key concepts
- Enable the OSPF process with router ospf followed by a process ID that is local to each router and does not need to match its neighbours.
- Hard code the router ID under the OSPF process (for example router-id 10.1.1.1) so it does not depend on interface or loopback addresses.
- Advertise networks with the network command using a wildcard mask, which is the inverse of the subnet mask (255.255.255.255 minus the subnet mask), followed by area 0.
- Alternatively, enable OSPF directly on an interface with ip ospf process-id area 0, which is a second valid way to bring an interface into OSPF.
- Interface level OSPF configuration overrides the network command when both are present on the same router.
- Inject the existing static default route into OSPF from R1 with default-information originate, which advertises the default route to R2 and R3 as an external route.
- Verify with show ip ospf neighbor, show ip ospf interface brief, show ip ospf database, and show ip route ospf, and confirm Ethernet neighbours reach the FULL state.
- OSPF uses cost as its metric, calculated as 100 divided by the interface bandwidth in Mbps, giving a cost of 10 on a 10 Mbps Ethernet link.
Key takeaways
- OSPF can be enabled two ways, through the network command or directly on an interface, and both must produce a working adjacency in area 0.
- For a neighbour adjacency to form, the area ID must match, the hello and dead intervals must match, the network types must be compatible, and each router ID must be unique.
- Changing the hello interval breaks the adjacency because the dead interval also changes and no longer matches the neighbour, so restoring it brings OSPF back up.
- A duplicate router ID prevents the neighbour relationship from forming, so always confirm each router has a unique router ID when troubleshooting.
Train for this the structured way
This free lesson is a sample of how CISNET teaches. The live courses cover it with guided labs and exam prep.
Frequently asked questions
Does the OSPF process ID have to match between neighbouring routers?
No. The process ID is local to each router and does not need to match. In this lab R1 uses process 1, R2 uses process 2, and R3 uses process 3, yet the adjacencies still form. What must match are the area ID and the hello and dead intervals.
What is a wildcard mask and how do you calculate it for the OSPF network command?
A wildcard mask is the inverse of the subnet mask and it tells OSPF which interfaces to match. You calculate it by subtracting the subnet mask from 255.255.255.255. For a /24 network the subnet mask is 255.255.255.0, so the wildcard mask is 0.0.0.255.
How do you advertise a default route to other OSPF routers?
On the router that already has a static default route, go into the OSPF process and enter default-information originate. Because a static default route already exists, you do not need the always keyword, and the default route is then advertised to the other routers as an external OSPF route.
Ready to Advance Your IT Career?
Get in touch to find the right certification path for your goals.
Get in Touch