OSPF

Course Description

OSPF (Open Shortest Path First) is a popular link-state routing protocol. Routers exchange pieces of information called LSAs (link-state advertisements) to build a complete topology database, the LSDB (link-state database), and use it to calculate the shortest path to every destination. OSPF is an open standard, so you’ll find it in enterprise, campus, data center, and service provider networks. We start with the basics and work our way through the most advanced OSPF topics.

Course Highlights

In this course you will learn:

  • How link-state routing protocols and OSPF work.
  • How to configure single and multi-area OSPF.
  • How to secure OSPF with authentication.
  • How OSPF neighbors form an adjacency, and how to troubleshoot it.
  • What the different OSPF LSA types are used for, and how to read the OSPF database.
  • How OSPF uses different network types.
  • What the different OSPF stub areas are and how they work.
  • How OSPF selects the best path, and how to summarize and filter prefixes.
  • Advanced topics like SPF tuning, LFA fast reroute, and graceful restart.

Presented to you by instructor Rene Molenaar, CCIE #41726

Course at a glance

  • 63 lessons in 5 units, plus a hands-on OSPF lab.
  • Format: self-paced lessons with Cisco IOS configurations, packet captures, and video.
  • Last updated: October 2026.

Requirements

  • No OSPF knowledge required; we start from the beginning.
  • Basic knowledge of IP addressing, subnetting, and how routers forward packets.

Course Schedule

What is OSPF?

OSPF (Open Shortest Path First) is a link-state interior gateway protocol (IGP). It routes traffic within a network that is under your own administrative control. Each OSPF router describes its own links in LSAs and floods them to its neighbors, so every router in an area ends up with an identical link-state database. Each router then runs Dijkstra’s SPF (Shortest Path First) algorithm on that database to find the path with the lowest cost to every destination.

Distance vector protocols only know what their neighbors tell them. OSPF is different: every router has a complete map of its area, which makes OSPF loop-free and quick to converge. To keep that map manageable in large networks, OSPF uses areas. Area 0 is the backbone, and all other areas connect to it through Area Border Routers (ABRs). OSPF runs directly on top of IP (protocol 89), uses multicast to find neighbors, and only sends updates when something changes.

Who uses OSPF? It’s one of the most popular IGPs in enterprise and campus networks, and service providers use it in their core, often together with MPLS and BGP. Because it’s an open standard, it works between routers from different vendors. OSPFv2 is used for IPv4, and OSPFv3 for IPv6.

OSPF Learning Roadmap

This roadmap follows the course units. Each topic has a short explanation and links to the lessons where we cover it in detail.

OSPF Fundamentals

OSPF calculates a cost for each link, based on its bandwidth, and picks the path with the lowest total cost. To keep large networks manageable, we split them into areas, connected to the backbone area 0. In this unit you configure single area and multi-area OSPF, tune the reference bandwidth for fast links, secure OSPF with MD5 or HMAC-SHA authentication, and advertise a default route.

OSPF LSAs and the LSDB

OSPF routers don’t exchange routes; they exchange LSAs (link-state advertisements) that describe routers, links, and networks. All routers in an area build the same link-state database (LSDB) by flooding these LSAs. There are different LSA types: the router LSA and network LSA for intra-area information, the summary LSA for inter-area routes, and the external LSA for routes from outside OSPF. Once you know them, you can read the OSPF database like a map of your network.

OSPF Neighbor Adjacency

OSPF routers discover their neighbors automatically with hello packets. Before two routers become neighbors, parameters like the area, hello and dead interval, subnet, and authentication have to match, and each router needs a unique router ID. They then go through several states, from Down to Full, to synchronize their databases. On multi-access networks like Ethernet, a DR and BDR are elected to reduce the number of adjacencies. A passive interface advertises a network without sending hellos on it, and when an adjacency doesn’t come up, you’ll learn how to troubleshoot it.

OSPF Network Types

The OSPF network type of an interface decides whether OSPF discovers neighbors automatically, whether it elects a DR and BDR, and which hello and dead timers it uses. Broadcast and point-to-point are the most common, but you also need to understand non-broadcast and point-to-multipoint for hub and spoke networks like DMVPN, and how OSPF treats loopback interfaces. The network type also affects the next hop address of your routes.

OSPF Stub Areas

Not every router needs to know every network. Stub areas reduce the size of the LSDB and routing table by replacing external and inter-area routes with a default route. There are four flavors: stub, totally stubby, NSSA (not-so-stubby area), and totally NSSA. The NSSA variants let you redistribute external routes into the area anyway, with type 7 LSAs, and the P-bit decides whether the ABR translates them into type 5 LSAs.

OSPF Path Selection, Summarization and Filtering

OSPF path selection doesn’t only look at cost. OSPF always prefers intra-area routes over inter-area routes, and inter-area routes over external routes, before it compares the cost. Because all routers in an area need the same LSDB, you can only summarize and filter at area borders (ABR) and redistribution points (ASBR), with a distribute-list, type 3 LSA filtering, or type 5 LSA filtering. When an area can’t connect directly to area 0, a virtual link fixes it. And when a route doesn’t show up where you expect it, you’ll learn how to troubleshoot route advertisement.

OSPF Convergence and High Availability

When a link fails, OSPF floods new LSAs and every router runs SPF again. SPF throttling and LSA throttling let you decide how quickly routers react, and incremental SPF reduces the work. LFA Fast Reroute (Loop-Free Alternate) pre-computes a backup path, so traffic switches over almost immediately, and remote LFA extends this to topologies without a direct backup path. For planned maintenance, the stub router feature, graceful shutdown, and graceful restart keep traffic flowing while a router reloads. Prefix suppression keeps the prefixes of transit links out of the routing table.

Practice: OSPF Lab

Reading about OSPF is one thing; configuring it is another. The OSPF professional lab lets you put everything together: neighbors, areas, network types, stub areas, and troubleshooting.

Frequently Asked Questions

Is OSPF still used?

Yes. OSPF is still one of the most widely used routing protocols in enterprise, campus, data center, and service provider networks. It’s an open standard that every vendor supports, so it’s often the default choice when you need an interior gateway protocol. Newer designs use it too: many VXLAN data center fabrics run OSPF as their underlay.

Do I need to know OSPF for the CCNA?

Yes. OSPF is the main routing protocol in the CCNA 200-301, so you need to understand how neighbors form, how the router ID and DR/BDR are chosen, and how to configure single-area OSPF. Multi-area OSPF, stub areas, and LSA types go deeper than the CCNA requires; you’ll see those again at the CCNP level. Read our introduction to OSPF.

Is OSPF better than EIGRP?

Neither is better in every way, but OSPF is the safer choice for most networks. OSPF is an open standard that runs on every vendor’s routers, while EIGRP was created by Cisco and is mostly found in Cisco-only networks. EIGRP is easier to configure and supports unequal cost load balancing, but if you can only learn one IGP well, learn OSPF first. Learn more about EIGRP.

Is OSPF better than RIP?

Yes, for almost every network. RIP only uses hop count, sends its full routing table every 30 seconds, and can take minutes to converge, while OSPF uses a bandwidth-based cost, only sends updates when something changes, and converges in seconds. RIP is still useful for learning how distance vector routing works. Learn more about RIP.

What is OSPF?

OSPF (Open Shortest Path First) is a link-state routing protocol. Every OSPF router builds a complete map of the network and uses the SPF algorithm to calculate the shortest path to each destination. It’s an open standard, so it runs on routers from every vendor. Read our introduction to OSPF.

What is OSPF used for?

OSPF routes traffic within a network under your own control, like a company network, a campus, a data center, or the core of a service provider network. It’s one of the most popular interior gateway protocols (IGPs) because it scales well, converges quickly, and is supported by every vendor.

How does OSPF work?

OSPF routers discover their neighbors with hello packets and form adjacencies. Neighbors exchange LSAs (link-state advertisements) until every router in the area has the same link-state database (LSDB). Each router then runs the SPF algorithm on this database to find the path with the lowest cost to each destination and installs those paths in its routing table.

Ready to master OSPF?

Get access to all 63 OSPF lessons, the OSPF lab, and every other course on NetworkLessons.com.

Sign up

Already have an account? Log in