What is OSPF? Beginner Guide

In networking, one protocol always steals the spotlight — Open Shortest Path First. If you’re learning networking or preparing for the CCNA, you’ve probably already heard its name. And let’s be honest — the moment a new interview comes up, everyone runs to revise this protocol.
This blog is beginner-friendly, written in a casual tone so even if you’re just starting out, you won’t feel overwhelmed. I’ll also share how I learned this protocol, got rejected in interviews, and then cleared two back-to-back — so stay with me till the end.
What We’ll Cover:
- Introduction
- Areas
- LSAs (Link-State Advertisements)
- Router Types
- States
- Timers
- Packet Types
- Interview Tips
Let’s go!

🔍 What is OSPF?
OSPF stands for Open Shortest Path First. It’s a link-state routing protocol and is a key part of the CCNA syllabus. When routers use a link-state protocol, each one builds a complete map of the network, then uses that map to calculate the shortest path to a destination.
This calculation is done using the Shortest Path First (SPF) algorithm, which was developed by Dutch scientist Edsger Dijkstra — yes, remember that name for interviews!
📅 Open Shortest Path First Protocol Versions:
- OSPFv1 (1989): Obsolete
- OSPFv2 (1998): Supports IPv4, most commonly used
- OSPFv3 (2008): Supports both IPv4 and IPv6
When we say “Open Shortest Path First Protocol” in this blog, we mean OSPFv2.
🌐 Areas
In a large network, It uses areas to segment routers. If you’re working in a small network, Area 0 (backbone) may be enough. But in real-world enterprise networks, areas make this protocol scalable.

Types of OSPF Areas:
- Backbone Area (Area 0): The core of the It’s network. All other areas must connect to it.
- Regular Area: Supports all LSA types.
- Stub Area: Doesn’t accept external routes (Type 5 LSAs). Ideal for small branch offices.
- Totally Stubby Area: Even more restricted — only allows a default route.
- Not-So-Stubby Area (NSSA): Allows limited external routes (Type 7 LSAs). Used with BGP or other protocols.
👉 These are common interview questions, so know them well.
🛰️ LSA Types
LSA stands for Link-State Advertisement — the way routers share information.
LSA Type | Name | Purpose |
---|---|---|
Type 1 | Router LSA | Info about router’s own links |
Type 2 | Network LSA | Info about multi-access networks |
Type 3 | Summary LSA | Routes between areas (by ABR) |
Type 4 | ASBR Summary LSA | Routes to external networks |
Type 5 | External LSA | External routes (e.g., from BGP) |
Type 7 | NSSA External LSA | External routes in NSSA |
🧠 Router Types
- Internal Router: All interfaces in the same area
- Area Border Router (ABR): Connects two or more areas
- Autonomous System Boundary Router (ASBR): Connects It’s to external routing protocols
- Designated Router (DR) and Backup DR (BDR): Elected in multi-access networks to reduce LSA flooding
🔄 States
This routers go through seven states before forming full adjacency:
- Down – No communication
- Init – Hello packet sent
- 2-Way – Hello packet received, DR/BDR election starts
- ExStart – Master/slave negotiation
- Exchange – DBD packets exchanged
- Loading – Requesting full LSAs
- Full – Synchronized LSDB
If you’re preparing for interviews, memorize this flow.
📦 Packet Types
It uses five types of packets:
- Hello Packet – To find and maintain neighbors
- DBD (Database Description) – Contains LSA summaries
- LSR (Link State Request) – Requests specific LSAs
- LSU (Link State Update) – Sends LSAs in reply
- LSAck (Acknowledgement) – Confirms LSU receipt
⏲️ OSPF Timers
- Hello Timer: Sent every 10 seconds (default)
- Dead Timer: If no Hello received in 40 seconds, neighbor is considered down
🎯 Interview Bonus Tip
If you’re asked to choose between protocols, check their administrative distance:
- OSPF: 110
- RIP: 120
- EIGRP: 90
Lower = better preference.
💬 Final Words
OSPF is a huge topic, and no single post can cover everything. But this guide should give you enough to:
- Pass your interviews
- Understand OSPF conceptually
- Build your confidence
I’ll write advanced posts like “OSPF Troubleshooting,” “OSPF vs RIP,” and “OSPF Configuration Lab” soon. If you want OSPF interview questions, just comment or message — I’ll reply personally.
Let’s keep learning and growing together 🚀 and Feel free to contact me.