CCNA 200-301Chapter 154 of 260Objective 3.4

Lab: Configure OSPF Single Area

OSPF is the most widely deployed interior gateway protocol in enterprise networks, and configuring a single-area OSPF network is a fundamental skill tested on the CCNA 200-301 exam (Objective 3.4). Mastering this lab will teach you how to enable OSPF, advertise networks, verify neighbor relationships, and troubleshoot common issues. In real-world engineering, OSPF provides fast convergence and loop-free routing, making it essential for any network professional.

25 min read
Intermediate
Updated May 31, 2026

The Company Town Hall Analogy

Imagine a company with multiple departments (routers) that need to share information about their projects (routes). Each department holds a weekly town hall meeting (Hello protocol) where they announce their presence and listen for new colleagues. To ensure everyone is on the same page, they agree on a common language (area ID), a meeting time (Hello/Dead intervals), and a password for entry (authentication). The department head (Designated Router) is elected to collect all project updates and share them with everyone, reducing chaos. When a new project starts (a route changes), the department head sends out a memo (Link State Update) to all attendees. Everyone updates their whiteboard (Link State Database) and recalculates their own project plan (SPF algorithm). If a colleague stops attending meetings (Dead interval expires), they are assumed to have left, and the department head announces the change. This system ensures that every department has a consistent view of all projects, just as OSPF ensures every router has a consistent link-state database.

How It Actually Works

What is OSPF Single Area?

Open Shortest Path First (OSPF) is a link-state routing protocol that uses the Shortest Path First (SPF) algorithm (Dijkstra's algorithm) to compute the best path to each destination. In a single-area design, all routers belong to area 0 (the backbone area), which simplifies configuration and avoids the complexities of inter-area routing. OSPF is classless, supports VLSM and CIDR, and converges quickly because each router maintains a complete topology map (Link State Database) of the area.

How OSPF Works Step by Step

1.

Neighbor Discovery: Routers send Hello packets out OSPF-enabled interfaces every 10 seconds (default on broadcast multi-access networks like Ethernet). The Hello packet contains the router ID (RID), area ID, Hello/Dead intervals, and a list of known neighbors. Two routers become neighbors when they match certain parameters: area ID, subnet mask, Hello/Dead intervals, and authentication (if configured).

2.

Database Exchange: After forming a 2-way state, routers on multi-access networks elect a Designated Router (DR) and Backup Designated Router (BDR). The DR is responsible for sending Link State Updates to all other routers (DROthers) on the segment. This avoids full mesh adjacencies. On point-to-point links, no DR/BDR election occurs. Routers then exchange Database Description (DBD) packets to compare their link-state databases, followed by Link State Requests (LSR) and Link State Updates (LSU) to synchronize.

3.

SPF Computation: Once the database is synchronized (Full state), each router runs the SPF algorithm to compute the shortest path tree to all destinations. The metric (cost) is calculated as 10^8 / bandwidth (in bps). For example, a FastEthernet (100 Mbps) interface has a cost of 1 (10^8/100,000,000 = 1). The router then populates the routing table with the best routes.

Key States, Timers, and Defaults

OSPF States: Down -> Init -> 2-Way -> ExStart -> Exchange -> Loading -> Full.

Hello Interval: 10 seconds (default on broadcast and point-to-point networks). 30 seconds on NBMA (e.g., Frame Relay).

Dead Interval: 40 seconds (4x Hello interval).

Cost: Default = 10^8 / bandwidth. For GigabitEthernet (1 Gbps), cost = 1 (but 10^8/1,000,000,000 = 0.1, so Cisco uses 1 for all links >= 100 Mbps).

Router ID: Highest loopback IP, then highest physical IP. Can be manually set with router-id command.

Designated Router (DR): Elected based on highest OSPF priority (default 1), then highest Router ID. The BDR is the second highest.

IOS CLI Verification Commands

show ip ospf neighbor
show ip ospf database
show ip ospf interface
show ip route ospf
show ip protocols

Example output for show ip ospf neighbor:

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.2          1   FULL/DR        00:00:35    192.168.1.2    GigabitEthernet0/0
10.1.1.3          1   FULL/BDR       00:00:33    192.168.1.3    GigabitEthernet0/0

Interaction with Related Protocols

OSPF uses IP protocol 89. It does not use TCP or UDP. OSPF runs directly over IP. It can be configured with authentication (MD5 or SHA) to secure routing updates. OSPF also supports path load balancing over equal-cost paths (default 4, up to 32).

Walk-Through

1

Configure OSPF Process

Enter global configuration mode and start OSPF with a process ID. The process ID is locally significant and can be any number between 1 and 65535. For example: `router ospf 1`. This creates an OSPF routing process. You must then assign a Router ID, either by configuring a loopback interface or explicitly using the `router-id` command. To set a Router ID: `router-id 1.1.1.1`. After configuring the Router ID, you may need to reload or clear the OSPF process with `clear ip ospf process` for it to take effect.

2

Advertise Networks with Network Command

Use the `network` command under the OSPF process to advertise interfaces into OSPF. The syntax is `network <network-address> <wildcard-mask> area <area-id>`. For a single area, use area 0. For example, to advertise the 192.168.1.0/24 network: `network 192.168.1.0 0.0.0.255 area 0`. The wildcard mask is the inverse of the subnet mask. This command enables OSPF on any interface whose IP address falls within the range. For point-to-point links, you can use a more specific wildcard mask like 0.0.0.0 to match a single interface.

3

Configure OSPF on Interfaces Directly

Alternatively, you can enable OSPF directly on an interface using `ip ospf <process-id> area <area-id>`. This method is preferred in modern CCNA exams. For example: `interface GigabitEthernet0/0` then `ip ospf 1 area 0`. This command enables OSPF on that specific interface without using the network command. It is more precise and reduces the risk of accidentally including unwanted interfaces. Ensure the interface has an IP address configured.

4

Verify OSPF Neighbor Relationships

After configuration, use `show ip ospf neighbor` to verify that routers have formed adjacencies. Each neighbor should show a state of FULL (for DR/BDR or point-to-point) or 2-WAY (for DROTHERs). Check that Dead Time is counting down. If neighbors are not forming, check that Hello/Dead intervals match, area IDs match, and there is no ACL blocking OSPF (protocol 89). Also verify that the subnet mask is consistent across the link.

5

Verify OSPF Database and Routes

Use `show ip ospf database` to view the link-state database. It should list Router and Network LSAs. For a single area, you should see Router LSAs from each router and a Network LSA from the DR. Use `show ip route ospf` to see OSPF-learned routes. They are marked with O (not O IA or O E1/E2). Verify that all expected networks appear. If a route is missing, check that the network is advertised on the originating router and that there are no mismatched area IDs.

6

Troubleshoot Common Issues

Common OSPF issues include: mismatched Hello/Dead intervals (use `show ip ospf interface` to check), mismatched area IDs, mismatched subnet masks (OSPF requires the same subnet mask on both ends of a link), and passive interfaces. Use `show ip ospf interface` to see OSPF settings per interface. If an interface is passive, OSPF will not send Hellos, preventing neighbor formation. To fix, use `no passive-interface <interface>` under the OSPF process. Another issue is incorrect wildcard masks in the network command – use the correct inverse mask.

What This Looks Like on the Job

In enterprise networks, OSPF single area is commonly deployed in small to medium-sized networks where simplicity is key. For example, a company with three branch offices connected via point-to-point WAN links might use a single OSPF area to ensure all routers have a complete topology. The network engineer would configure OSPF on each router, advertise the LAN subnets, and verify full connectivity. This design allows for fast convergence – if a link fails, OSPF detects it within 40 seconds (Dead interval) and recalculates routes.

Another scenario is a data center with multiple top-of-rack switches. OSPF single area can be used to provide loop-free routing within the data center fabric. However, engineers must be careful with the cost metric – default costs may not reflect actual link speeds, so manual cost adjustment is often needed. For example, a 10 Gbps link would have a default cost of 1, same as a 1 Gbps link, which may not be desirable. Engineers can set cost manually with ip ospf cost <value>.

A common misconfiguration is forgetting to advertise the point-to-point link network itself. For example, two routers connected via a /30 link – if neither router includes that subnet in its network command, OSPF will not form an adjacency. Always ensure the link subnet is included in OSPF. Also, passive interfaces are often misapplied: making a WAN interface passive will prevent neighbor formation. In production, engineers use passive-interface default and then selectively enable OSPF on specific interfaces with no passive-interface.

How CCNA 200-301 Actually Tests This

The CCNA 200-301 exam tests OSPF single area configuration and verification under Objective 3.4. You must know how to configure OSPF using both the network command and the interface-level command. The exam expects you to interpret show ip ospf neighbor output to determine the state (FULL, 2-WAY, etc.) and identify the DR/BDR. You must also know the default Hello and Dead intervals: 10 and 40 seconds for broadcast networks.

Common wrong answers: 1. "OSPF uses UDP port 89" – Wrong. OSPF uses IP protocol 89, not UDP or TCP. 2. "The process ID must match on all routers" – Wrong. The process ID is locally significant. 3. "The network command uses a subnet mask" – Wrong. It uses a wildcard mask. 4. "OSPF cost is based on hop count" – Wrong. It is based on bandwidth (10^8/bandwidth).

Specific values to memorize: - Default reference bandwidth: 100 Mbps (10^8). - Cost for 100 Mbps: 1. Cost for 10 Mbps: 10. Cost for 1 Gbps: 1 (since 10^8/1,000,000,000 = 0.1, Cisco rounds up to 1). - OSPF neighbor states: Down, Init, 2-Way, ExStart, Exchange, Loading, Full. - DR/BDR election: Highest priority (0-255, default 1), then highest Router ID. Priority 0 means never DR/BDR.

Calculation traps: The exam may ask you to calculate the cost of a path. Remember that cost is additive. For example, a path with two FastEthernet links has cost 1+1=2. Also, if the reference bandwidth is changed with auto-cost reference-bandwidth, use the new value.

Decision rule for scenario questions: If a question asks why two OSPF routers are not forming an adjacency, check: (1) Are they on the same subnet? (2) Do Hello/Dead intervals match? (3) Is there an ACL blocking protocol 89? (4) Are area IDs the same? (5) Is authentication configured inconsistently?

Key Takeaways

OSPF uses IP protocol 89, not TCP or UDP.

Default Hello interval = 10 seconds, Dead interval = 40 seconds on broadcast networks.

Cost = 10^8 / bandwidth (bps); FastEthernet cost = 1, 10 Mbps Ethernet cost = 10.

Router ID selection: highest loopback IP, then highest physical IP; can be manually set.

OSPF neighbor states sequence: Down, Init, 2-Way, ExStart, Exchange, Loading, Full.

DR/BDR election occurs on multi-access networks; highest priority (default 1) then highest RID wins.

Use `show ip ospf neighbor` to verify adjacency; FULL state indicates successful synchronization.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

OSPF Single Area

All routers in area 0.

Simple configuration, no ABRs.

Larger LSDB, more CPU/memory usage.

Faster convergence within area.

Suitable for small networks.

OSPF Multi-Area

Multiple areas with area 0 as backbone.

Requires ABRs to summarize routes.

Smaller LSDB per area, less overhead.

Slower inter-area convergence.

Scalable for large enterprise networks.

Watch Out for These

Mistake

OSPF process ID must match on all routers in the same area.

Correct

The process ID is locally significant and can differ between routers. Only the area ID must match.

Candidates confuse the process ID with the area ID because both are numbers used in configuration.

Mistake

The network command uses a subnet mask.

Correct

The network command uses a wildcard mask (inverse of subnet mask). For example, network 192.168.1.0 0.0.0.255 area 0.

Candidates are used to subnet masks from IP addressing and forget that OSPF uses wildcard masks.

Mistake

OSPF converges by exchanging routing tables periodically.

Correct

OSPF is link-state; it floods link-state advertisements (LSAs) only when a change occurs, not periodically. It does not exchange full routing tables.

Candidates coming from distance vector protocols (like RIP) assume periodic updates.

Mistake

The DR is always the router with the highest Router ID.

Correct

The DR is elected based on highest OSPF priority (default 1), then highest Router ID. A router with priority 0 will never become DR.

Candidates often overlook the priority factor and assume RID alone determines DR.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the default OSPF cost for a GigabitEthernet interface?

The default cost is 1. The formula is reference bandwidth (100 Mbps) divided by interface bandwidth. For 1 Gbps, 100/1000 = 0.1, but Cisco rounds up to 1 for all links >= 100 Mbps. This can be misleading because a 10 Gbps link also gets cost 1. To fix, use `auto-cost reference-bandwidth 10000` to set reference to 10 Gbps.

Can I have two OSPF processes on the same router?

Yes, but they are independent. Each process has its own LSDB and routing table. Routes from one process can be redistributed into the other. However, for CCNA, you only need one process per router.

What is the difference between the network command and the ip ospf command?

The network command is a legacy method that enables OSPF on all interfaces matching the network/wildcard pair. The `ip ospf <process-id> area <area-id>` interface command enables OSPF on a specific interface. The latter is more precise and recommended in modern configurations.

Why do I see 2-WAY state instead of FULL on some neighbors?

On multi-access networks, routers that are not DR or BDR (DROTHERS) stay in 2-WAY state with each other. They only form FULL adjacencies with the DR and BDR. This is normal and does not indicate a problem.

How do I change the OSPF Router ID after it has been selected?

Use the `router-id <new-id>` command under the OSPF process, then reload the OSPF process with `clear ip ospf process`. The new RID will take effect after the clear. Note that this will temporarily disrupt OSPF adjacencies.

What does the Dead interval do?

The Dead interval is the time (default 40 seconds) a router waits to hear a Hello from a neighbor before declaring it dead. If no Hello is received within the Dead interval, the neighbor is considered down, and the router floods LSAs to update the topology.

Is OSPFv2 used for IPv4 or IPv6?

OSPFv2 is used for IPv4. OSPFv3 is used for IPv6. The CCNA 200-301 exam covers OSPFv2 for IPv4. OSPFv3 is not tested in depth.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Lab: Configure OSPF Single Area — now see how well it sticks with free CCNA 200-301 practice questions. Full explanations included, no account needed.

Done with this chapter?