What's your name?

Enter your name to start a short security demo.

Blog

Step-by-Step: Configuring Single-Area OSPF on a Cisco Router (CCNP Level)

So far in my Cisco tutorial series, we've covered concepts like VLAN, Inter-VLAN Routing, STP, EtherChannel, ACL, and NAT — all CCNA-level topics. Now it's time to step into one of the most important CCNP subjects: dynamic routing protocols, and OSPF is the most popular and widely used of them.

The problem: why isn't static routing enough?
In a small network with 2-3 routers, you can define routes manually (with the ip route command). But in a large enterprise network with dozens of routers, this becomes practically impossible — and worse, if a link goes down, static routes don't automatically switch to an alternate path. OSPF (Open Shortest Path First) solves this: routers automatically discover each other, share network topology information, and calculate the best path themselves.

Basic concepts you need to know
OSPF is a link-state protocol — meaning each router builds a complete map of the entire network (or at least that area), not just information about direct neighbors (unlike distance-vector protocols). OSPF's best-path metric is called Cost, calculated based on interface bandwidth — the higher the bandwidth, the lower the cost, and the more attractive the path.

This tutorial's scenario
Suppose we have two routers (R1 and R2) directly connected to each other, each with a different internal network that should be reachable by the other without manual configuration.

Step 1: Enter OSPF configuration mode on R1
enable
configure terminal
router ospf 1

The number 1 here is just a local process ID for OSPF on this router — it doesn't need to match between different routers.

Step 2: Advertise the connected networks into OSPF
network 10.0.0.0 0.0.0.3 area 0
network 192.168.1.0 0.0.0.255 area 0

The network command, with a wildcard mask (exactly like an ACL), specifies which of this router's interfaces should participate in the OSPF process. area 0 means these networks belong to the backbone area — in a single-area configuration, everything lives inside Area 0.

Step 3: Repeat similar configuration on R2
enable
configure terminal
router ospf 1
network 10.0.0.0 0.0.0.3 area 0
network 172.16.1.0 0.0.0.255 area 0

Step 4: Check OSPF neighbor adjacency
After a few seconds, the two routers should automatically discover each other via Hello messages:
show ip ospf neighbor

If the peer router's status shows FULL, the adjacency has formed successfully and the two routers are fully exchanging topology information.

Step 5: Check the routing table
show ip route ospf

This command shows only the routes learned via OSPF (marked with an O at the start of the line) — you should see that R1 now knows about R2's internal network, without you having written a single manual ip route command.

Step 6: Practical test
From a computer on R1's internal network, ping a computer on R2's internal network. If you get a reply, OSPF has successfully established the path between the two networks automatically.

Why is OSPF a core CCNP skill?
Almost no large modern enterprise network runs without a dynamic routing protocol like OSPF — maintaining hundreds of static routes is not only time-consuming but also has zero resilience against link failure. Mastering OSPF (and its more advanced concepts like multi-area design) is exactly what separates CCNP level from CCNA, and it's a core part of my advanced Cisco courses.