OSPF
OSPF is a link-state routing protocol that routers use to exchange topology information inside one routing domain. Each router builds a shared map and calculates its own shortest paths.
itNetworking | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Intro
OSPF
Routers need routes before they can forward packets beyond directly connected networks. Static routes can work in small, stable designs. They become harder to maintain when links fail, paths multiply, or many routers must agree on reachability.
Open Shortest Path First, or OSPF, distributes routing information inside one autonomous system. It is an interior gateway protocol and a link-state protocol. Instead of sending a finished routing table to every neighbor, each router describes parts of the topology with link-state advertisements.
Think of OSPF as a repeated agreement process:
discover neighbors
↓
form selected adjacencies
↓
exchange and flood LSAs
↓
build a link-state database
↓
calculate shortest paths
↓
install selected routes
Routers in the same area aim to hold the same link-state database. Each router then runs the shortest-path calculation with itself as the root. The result is local: two routers use the same topology information but calculate from different starting points.
The three planes to keep separate
OSPF is easier to reason about when you separate three related objects.
The neighbor table records other OSPF routers discovered on connected links. A neighbor relationship does not always become a full adjacency.
The link-state database, or LSDB, stores the LSAs known for an area. The LSDB is the topology input to the shortest-path calculation.
The routing table contains usable paths selected after OSPF calculates routes and the router compares them with routes from other sources. The routing table is not a copy of the LSDB.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.rfc-editor.org/rfc/rfc2328.html
Supports
- OSPFv2 link-state model, areas, neighbor and interface state machines
- Hello, Database Description, Link State Request, Link State Update, and Link State Acknowledgment packets
- Reliable LSA flooding, area LSDB synchronization, and shortest-path calculation
- OSPFv2 LSA types, scopes, router roles, DR and BDR behavior
- Interface cost, equal-cost paths, route calculation, and external routing information
- IP protocol number 89 and original OSPFv2 authentication behavior
- https://www.rfc-editor.org/rfc/rfc5340.html
Supports
- OSPFv3 use for IPv6 and preservation of core OSPF algorithms
- Per-link processing, removal of addressing semantics from main packets and topology LSAs
- IPv6 link-local neighbor communication and OSPFv3 packet processing
- https://www.rfc-editor.org/rfc/rfc3101.html
Supports
- NSSA operation and Type 7 LSA origination, flooding, and translation
- Import of external reachability from within an NSSA
- https://www.rfc-editor.org/rfc/rfc5709.html
Supports
- HMAC-SHA cryptographic authentication algorithms for OSPFv2
- Authentication and integrity scope without confidentiality
- https://www.rfc-editor.org/rfc/rfc7474.html
Supports
- OSPFv2 manual-key management extensions
- Extended sequence numbers, key identifiers, and key rollover procedures
- https://www.rfc-editor.org/rfc/rfc9454.html
Supports
- Leader and Follower terminology for OSPF database exchange
- Terminology updates to OSPFv2 and OSPFv3
- https://docs.frrouting.org/en/latest/ospfd.html
Supports
- Open implementation configuration and inspection for OSPFv2
- Areas, interfaces, redistribution, neighbors, routes, and LSDB commands
- https://github.com/sindresorhus/awesome
Supports
- Starting point for curated Awesome-list discovery
- https://github.com/networktocode/awesome-network-automation
Supports
- Discovery of OSPF Watcher, Topolograph, netlab, and Batfish
- Descriptions of OSPF monitoring, topology visualization, lab generation, and network validation tools
- https://github.com/Vadims06/ospfwatcher
Supports
- Monitoring of OSPF adjacency, link-cost, and prefix topology changes
- OSPF adjacency and BGP Link State collection modes
- https://github.com/Vadims06/topolograph
Supports
- OSPF and IS-IS topology visualization from LSDB output
- Shortest-path and link or node failure views
- https://netlab.tools/
Supports
- YAML-defined virtual network labs
- Configuration generation for supported platforms and OSPF
- https://batfish.readthedocs.io/
Supports
- Model-based network configuration, routing, forwarding, and reachability analysis
- Pre-change and post-change validation without production probes
