Quick answer: OSPF (Open Shortest Path First) is a link-state routing protocol that uses areas to scale, elects Designated Routers (DR/BDR) on multi-access networks, and calculates the best path using cost (bandwidth). It relies on LSA types to share topology information. Master these concepts and practice with the 15 CCNA OSPF practice questions below to solidify your exam readiness.
Why OSPF Matters for CCNA
OSPF is one of the two dynamic routing protocols you must know for the CCNA (the other being EIGRP). Unlike distance-vector protocols like RIP, OSPF builds a complete map of the network using the Shortest Path First (SPF) algorithm. This gives you loop-free, fast-converging routing—critical for production networks.
The CCNA exam tests your understanding of OSPF's core mechanics: how it discovers neighbors, selects routes, and scales via areas. You'll also need to interpret show commands and troubleshoot common issues. The 15 practice questions at the end of this post target exactly these areas, with full rationales to reinforce your learning.
How OSPF Works: The Core Concepts
Link-State vs. Distance-Vector
OSPF is a link-state protocol. Each router sends link-state advertisements (LSAs) to all routers in the same area, building an identical link-state database (LSDB). From that LSDB, each router runs the SPF algorithm to calculate the shortest path to every destination. This is fundamentally different from distance-vector protocols, which only know "next hop" and "metric."
OSPF Areas
Areas are the key to OSPF scalability. Without areas, every router would need to know the entire network topology—impractical for large enterprises.
- Area 0 (backbone): All other areas must connect to area 0. Inter-area traffic flows through it.
- Standard areas: Non-backbone areas (e.g., area 1, area 2) that contain internal routes.
- Stub areas: Block external routes (type 5 LSAs) to reduce LSDB size.
- Totally stubby areas: Block external and inter-area routes (type 3, 4, 5 LSAs), default route only.
Key exam trap: Routers in different areas do not exchange LSAs directly. Area Border Routers (ABRs) summarize and advertise routes between areas.
DR/BDR Election
On multi-access networks (e.g., Ethernet), OSPF elects a Designated Router (DR) and Backup Designated Router (BDR) to reduce LSA flooding. Non-DR/BDR routers (DROTHERs) only form full adjacencies with the DR and BDR.
- Election priority: Based on the
ip ospf prioritycommand (0–255). Highest priority wins. Tie-breaker: highest router ID. - Priority 0: Router never becomes DR/BDR.
- DR/BDR are elected per segment, not per router.
Exam trap: The DR/BDR election is non-preemptive. If a new router with higher priority joins, it will not take over unless the DR/BDR fail.
LSA Types You Must Know
OSPF uses multiple LSA types. For CCNA, focus on these:
| LSA Type | Name | Origin | Scope | Description |
|---|---|---|---|---|
| 1 | Router LSA | Every router | Area | Lists all directly connected links and their states. |
| 2 | Network LSA | DR | Area | Describes the segment and all attached routers. |
| 3 | Summary LSA | ABR | Inter-area | Advertises routes from one area to another. |
| 4 | ASBR Summary LSA | ABR | Inter-area | Points to an ASBR (used for external routes). |
| 5 | External LSA | ASBR | Entire AS | Advertises routes redistributed from other protocols. |
Exam trap: Type 1 and 2 LSAs stay within an area. Type 3, 4, and 5 LSAs can cross areas. Stub areas block type 5 LSAs; totally stubby areas block type 3, 4, and 5.
OSPF Cost Metric
OSPF uses cost as its metric, calculated as 10^8 / bandwidth (in bps). For example:
- FastEthernet (100 Mbps): cost = 10^8 / 100,000,000 = 1
- GigabitEthernet (1000 Mbps): cost = 10^8 / 1,000,000,000 = 1 (same as FE, but you can manually set cost)
Cisco routers default to using reference bandwidth 100 Mbps. For modern high-speed links, use auto-cost reference-bandwidth to adjust.
Exam trap: OSPF cost is cumulative along the path. The SPF algorithm selects the path with the lowest total cost, not the fewest hops.
OSPF Neighbor States
Understanding neighbor states helps you troubleshoot adjacency issues:
- Down: No OSPF hello received.
- Init: Hello received, but router ID not seen in neighbor's hello.
- 2-Way: Hello received with own router ID. Election happens at this state.
- ExStart: Master/slave negotiation for database exchange.
- Exchange: Sending and receiving DBD (Database Description) packets.
- Loading: Requesting and receiving full LSAs.
- Full: Fully adjacent—LSDB synchronized.
Exam trap: On point-to-point links (e.g., serial), no DR/BDR election occurs. Routers go from 2-Way directly to Full.
Common OSPF Exam Traps
- Passive interfaces: OSPF does not send hellos on passive interfaces. No neighbor will form.
- Network type mismatch: If one end is broadcast and the other is point-to-point, adjacency fails.
- Area ID mismatch: Must match exactly (e.g., area 0 vs. area 0.0.0.0 is the same, but area 1 vs. area 0.0.0.1 is not).
- MTU mismatch: Causes OSPF to get stuck in ExStart/Exchange.
- Authentication mismatch: MD5 or plain-text passwords must match.
15 CCNA OSPF Practice Questions with Rationales
Test your knowledge. Each question targets a specific concept. Answers and explanations follow.
Questions 1–5: Fundamentals
Which OSPF packet type is used to discover neighbors and maintain adjacencies?
A) Database Description (DBD)
B) Link-State Request (LSR)
C) Hello
D) Link-State Update (LSU)What is the default OSPF cost for a 100 Mbps FastEthernet interface?
A) 1
B) 10
C) 100
D) 1000Which LSA type is generated by the DR to describe all routers on a multi-access segment?
A) Type 1
B) Type 2
C) Type 3
D) Type 5A router in a stub area receives which LSA types?
A) Type 1, 2, 3, and 5
B) Type 1, 2, and 3
C) Type 1, 2, and 5
D) Type 1, 2, 3, and 4What OSPF neighbor state indicates that the LSDB is fully synchronized?
A) 2-Way
B) ExStart
C) Loading
D) Full
Questions 6–10: Advanced Concepts
Which command modifies the OSPF reference bandwidth to 10000 Mbps?
A)auto-cost reference-bandwidth 10000
B)bandwidth 10000
C)ip ospf cost 10000
D)ospf reference-bandwidth 10000In OSPF, what does a router ID of 0.0.0.0 indicate?
A) The router is a DR
B) The router is not participating in OSPF
C) The router ID has not been set
D) The router is an ABRWhich network type requires a DR/BDR election?
A) Point-to-point
B) Broadcast
C) Point-to-multipoint
D) LoopbackWhat happens if two OSPF routers have mismatched MTU values?
A) They form a full adjacency but routes are missing
B) They stay in ExStart/Exchange state
C) They form a 2-Way adjacency
D) They use the smaller MTU automaticallyWhich OSPF LSA type advertises external routes into the OSPF domain?
A) Type 3
B) Type 4
C) Type 5
D) Type 7
Questions 11–15: Troubleshooting & Scenarios
A router in area 1 has a route to 10.0.0.0/8 learned via OSPF, but the next hop is unreachable. What is the most likely cause?
A) OSPF process is not running
B) A mismatched area ID
C) A passive interface on the next-hop router
D) The route is a type 5 LSA blocked by a stub areaYou see "OSPF stuck in 2-Way state" on a serial link. What does this indicate?
A) Normal operation for point-to-point links
B) DR/BDR election is still in progress
C) MTU mismatch
D) Authentication failureWhich statement about OSPF DR/BDR election is true?
A) The router with the highest IP address wins
B) The election is preemptive
C) A router with priority 0 can become BDR
D) The DR is elected first, then the BDRAn ABR generates which LSA type to advertise routes from area 1 into area 0?
A) Type 1
B) Type 2
C) Type 3
D) Type 4What is the default OSPF hello interval on a broadcast network?
A) 10 seconds
B) 30 seconds
C) 40 seconds
D) 60 seconds
Answer Key with Rationales
- C – Hello packets discover neighbors and maintain adjacencies (default every 10 seconds on broadcast).
- A – Cost = 10^8 / 100,000,000 = 1.
- B – Type 2 (Network LSA) is generated by the DR for multi-access segments.
- B – Stub areas block type 5 (external) LSAs; they receive type 1, 2, and 3.
- D – Full state means LSDBs are synchronized.
- A –
auto-cost reference-bandwidth 10000under router ospf. - C – Router ID 0.0.0.0 means it hasn't been set (often due to missing loopback or physical IP).
- B – Broadcast network type (e.g., Ethernet) requires DR/BDR election.
- B – MTU mismatch causes OSPF to get stuck in ExStart/Exchange state.
- C – Type 5 (External LSA) is generated by an ASBR.
- C – A passive interface on the next-hop router prevents OSPF hellos, so adjacency fails.
- A – On point-to-point links, 2-Way is normal (no DR/BDR election occurs).
- D – The DR is elected first, then the BDR. Election is non-preemptive.
- C – ABRs generate Type 3 Summary LSAs for inter-area routes.
- A – Default hello interval is 10 seconds on broadcast and point-to-point networks.
Takeaway: Your OSPF Study Plan
OSPF is one of the most heavily tested topics on the CCNA. To pass, you need to:
- Understand areas, DR/BDR, LSA types, and cost.
- Memorize neighbor states and what triggers each transition.
- Practice with show commands (
show ip ospf neighbor,show ip ospf database,show ip route ospf). - Watch for exam traps like passive interfaces, MTU mismatches, and area ID errors.
The 15 practice questions above cover the highest-yield concepts. For more realistic exam simulation, check out the full CCNA OSPF practice question bank at Courseiva.com—with detailed explanations, performance tracking, and adaptive quizzes.
[Practice more CCNA OSPF questions on Courseiva]