# OSPF Fundamentals

> Learn how OSPF discovers neighbors, builds a link-state database, and calculates shortest paths, and how misconfigured areas and authentication create real attack surface.

Canonical: https://codelivly.com/rooms/ospf-fundamentals
Last updated: 2026-09-01

| | |
|---|---|
| Level | Beginner |
| Category | Networking |
| Lessons | 6 |
| Estimated time | 30 min |
| XP | 200 |

This module moves beyond static routing into dynamic routing with OSPF (Open Shortest Path First), the most widely deployed link-state routing protocol in enterprise networks. You'll learn how OSPF routers discover each other through Hello packets, form adjacencies, exchange Link-State Advertisements (LSAs), and independently run the Dijkstra shortest path first algorithm to build a loop-free routing table.

You'll break down OSPF's area-based hierarchy, the role of the backbone area (Area 0), Designated Routers and Backup Designated Routers on multi-access segments, and how OSPF's metric (cost) is calculated from interface bandwidth. You'll also cover OSPF authentication mechanisms and why unauthenticated OSPF domains are a serious internal network risk.

From an offensive perspective, you'll learn how attackers can passively fingerprint OSPF traffic, inject rogue LSAs or a rogue neighbor into an unauthenticated OSPF domain, and manipulate route advertisements to redirect or blackhole traffic, a technique used in real internal penetration tests and red team engagements to demonstrate routing protocol trust exploitation. Every lesson pairs this offensive insight with concrete defensive configuration, including MD5 and SHA authentication, passive interfaces, and area design best practices.

## Lessons

1. What Is OSPF and Why Does It Matter (30 min)
2. OSPF Areas, Neighbors & Adjacencies (30 min)
3. DR/BDR Election Process (30 min)
4. OSPF Cost & Path Selection (30 min)
5. Troubleshooting OSPF Neighbor Issues (30 min)
6. Guided Lab: Multi-Area OSPF Deployment (30 min)

## Related

- [Learning path: Routing & Switching Fundamentals](https://codelivly.com/learning-paths/routing-switching-fundamentals)
- [All rooms](https://codelivly.com/rooms)
