🔄 Open Shortest Path First (OSPF) - CCNA Practice Questions

Deep dive into OSPF operation: neighbor adjacencies, LSAs, areas, DR/BDR election, cost calculation, route summarization, and troubleshooting OSPF issues.

25Questions Available
1Exam Domains

Practice OSPF Questions Now

Start a timed practice session focusing on Open Shortest Path First (OSPF) topics from the CCNA question bank.

Start CCNA Practice Quiz →

CCNA OSPF Question Bank (25 Questions)

Browse all 25 practice questions covering Open Shortest Path First (OSPF) for the CCNA certification exam. Each question includes the full answer and a detailed explanation to help you understand the concepts.

  1. Question 1IP Connectivity

    What is the final OSPF neighbor state indicating full adjacency?

    A2-Way
    BExStart
    CLoading
    DFull
    Show Answer & Explanation
    Correct Answer: D
    Explanation:

    Full state means complete LSDB synchronization. The sequence is: Down → Init → 2-Way → ExStart → Exchange → Loading → Full.

  2. Question 2IP Connectivity

    What is the purpose of OSPF Area 0?

    AIt serves as a stub area for external routes
    BIt is the backbone area that all other areas must connect to
    CIt contains only default routes
    DIt handles authentication for all OSPF areas
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Area 0 is the OSPF backbone area. All other areas must connect to Area 0 either directly or through a virtual link for inter-area routing to work.

  3. Question 3IP Connectivity

    How is OSPF cost calculated by default on Cisco routers?

    AHop count
    BReference bandwidth / interface bandwidth
    CDelay + bandwidth
    DAdministrative distance / metric
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    OSPF cost = reference bandwidth (default 100 Mbps) / interface bandwidth. A 100 Mbps link has cost 1, a 10 Mbps link has cost 10.

  4. Question 4IP Connectivity

    What determines the OSPF Designated Router (DR) election on a broadcast network?

    ALowest router ID
    BHighest OSPF priority, then highest router ID
    CFastest interface speed
    DFirst router to boot
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    DR is elected by highest OSPF priority (default 1, range 0-255). Priority 0 means ineligible. If tied, highest router ID wins.

  5. Question 5IP Connectivity

    What is the default OSPF Hello interval on an Ethernet interface?

    A5 seconds
    B10 seconds
    C30 seconds
    D40 seconds
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    OSPF Hello interval is 10 seconds on broadcast/point-to-point networks and 30 seconds on NBMA. Dead interval is 4× Hello (40 seconds on Ethernet).

  6. Question 6IP Connectivity

    How is OSPF cost calculated for an interface?

    AHop count
    BReference bandwidth divided by interface bandwidth (default: 100 Mbps / interface bandwidth) — lower cost is preferred
    CDelay × bandwidth
    DRandom assignment
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    OSPF cost = Reference BW / Interface BW. Default reference = 100 Mbps. So: 10 Mbps = cost 10, 100 Mbps = cost 1, 1 Gbps = cost 1 (same!). For Gigabit+ links, increase reference: 'auto-cost reference-bandwidth 10000' (10 Gbps) to differentiate.

  7. Question 7IP Connectivity

    On a multi-access OSPF network, how is the Designated Router (DR) elected?

    AThe router with the lowest IP address
    BThe router with the highest OSPF priority wins; if tied, the highest router ID breaks the tie
    CRandom selection
    DThe first router to boot
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    DR election: highest OSPF priority (0-255, default 1) wins. Priority 0 = never become DR. If tied, highest Router ID wins. DR election is non-preemptive — a new router with higher priority doesn't replace the current DR until a failure occurs.

  8. Question 8IP Connectivity

    What is the purpose of OSPF Area 0 (backbone area)?

    AIt's optional for OSPF operation
    BAll other OSPF areas must connect to Area 0; it acts as the transit area for inter-area routing traffic
    CIt's used only for external routes
    DIt handles authentication only
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Area 0 is the OSPF backbone. Rules: every area must connect to Area 0 (directly or via virtual link). Inter-area traffic flows through Area 0. ABRs (Area Border Routers) connect non-backbone areas to Area 0 and summarize routes between areas.

  9. Question 9IP Connectivity

    Which OSPF packet type is used to establish and maintain neighbor adjacencies by exchanging hello messages?

    AType 1 – Hello
    BType 2 – Database Description (DBD)
    CType 3 – Link-State Request (LSR)
    DType 5 – Link-State Acknowledgment (LSAck)
    Show Answer & Explanation
    Correct Answer: A
    Explanation:

    OSPF Type 1 Hello packets are used to discover neighbors and maintain adjacencies. They are sent periodically (default 10 seconds on broadcast/point-to-point networks). DBD packets exchange database summaries, LSR requests specific LSAs, LSU carries LSAs, and LSAck acknowledges receipt of LSAs.

  10. Question 10IP Connectivity

    What is the OSPF router ID selection order of preference?

    AHighest loopback IP → highest physical IP → manually configured
    BManually configured → highest loopback IP → highest physical IP
    CLowest loopback IP → lowest physical IP → manually configured
    DManually configured → lowest loopback IP → lowest physical IP
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    OSPF selects the router ID in this order: (1) manually configured router-id, (2) highest IP on any active loopback interface, (3) highest IP on any active physical interface.

  11. Question 11IP Connectivity

    What is the default OSPF network type on an Ethernet interface?

    APoint-to-point
    BBroadcast
    CNon-broadcast
    DPoint-to-multipoint
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Ethernet interfaces default to broadcast network type, which elects a DR and BDR. Serial interfaces default to point-to-point.

  12. Question 12IP Connectivity

    Which OSPF version supports IPv6?

    AOSPFv1
    BOSPFv2
    COSPFv3
    DOSPF-TE
    Show Answer & Explanation
    Correct Answer: C
    Explanation:

    OSPFv3 (RFC 5340) was designed for IPv6. OSPFv2 is for IPv4. OSPFv3 can also carry IPv4 routes using address families.

  13. Question 13IP Connectivity

    What is the effect of configuring an OSPF interface as passive?

    AOSPF stops advertising the network
    BOSPF includes the network in LSAs but stops sending Hello packets
    COSPF removes the network from the routing table
    DOSPF increases the Hello timer on that interface
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    A passive OSPF interface advertises the connected network in LSAs but does not send or process Hello packets, so no adjacencies form on that interface.

  14. Question 14IP Connectivity

    Which OSPF authentication type uses MD5 hashing?

    AType 0 (null)
    BType 1 (simple password)
    CType 2 (MD5)
    DType 3 (SHA-256)
    Show Answer & Explanation
    Correct Answer: C
    Explanation:

    OSPF authentication: Type 0 = none, Type 1 = clear-text password, Type 2 = MD5 cryptographic authentication. Type 2 is recommended for security.

  15. Question 15IP Connectivity

    What is the key difference between OSPFv2 and OSPFv3?

    AOSPFv3 only works with IPv4
    BOSPFv3 supports IPv6 (and IPv4 with address families), uses link-local addresses for neighbor communication, and is configured per interface
    COSPFv2 is faster
    DOSPFv3 doesn't support areas
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    OSPFv3: native IPv6 support, uses link-local addresses for adjacencies, configured per-interface (not network command), authentication via IPsec instead of OSPF-native auth, and new LSA types (0x2008/0x2009 for IPv6 prefixes). Can carry IPv4 too with address families.

  16. Question 16IP Connectivity

    Which command verifies the OSPF neighbor relationships on a Cisco router?

    Ashow ip route ospf
    Bshow ip ospf neighbor
    Cshow ip ospf database
    Dshow ip protocols
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    'show ip ospf neighbor' displays the OSPF neighbor table, showing neighbor IDs, states (FULL, 2WAY, etc.), DR/BDR roles, and interface information. 'show ip route ospf' shows OSPF-learned routes. 'show ip ospf database' shows the LSDB. 'show ip protocols' shows configured routing protocols and parameters.

  17. Question 17IP Connectivity

    An OSPF router is stuck in the EXSTART/EXCHANGE state with its neighbor. What is the most likely cause?

    AMismatched OSPF hello/dead timers
    BMismatched MTU values on the connecting interfaces
    CMismatched OSPF area IDs
    DDuplicate OSPF router IDs
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    When OSPF neighbors get stuck in EXSTART/EXCHANGE state, the most common cause is mismatched MTU values. During the database exchange, OSPF includes the interface MTU in DBD packets. If MTU values don't match, the adjacency cannot progress. Mismatched hello/dead timers prevent reaching 2-WAY state. Mismatched area IDs prevent neighbor discovery.

  18. Question 18IP Connectivity

    A router has two equal-cost routes to the same destination learned via OSPF. What will the router do by default?

    AUse only the first route learned
    BUse the route with the lowest next-hop IP address
    CLoad balance traffic across both routes (ECMP)
    DDrop both routes due to ambiguity
    Show Answer & Explanation
    Correct Answer: C
    Explanation:

    OSPF supports Equal-Cost Multi-Path (ECMP) routing by default. When multiple routes to the same destination have the same OSPF cost, the router installs all of them in the routing table and load-balances traffic across them. Cisco IOS allows up to 4 ECMP paths by default (configurable up to 32).

  19. Question 19IP Connectivity

    Which OSPF area must all other areas connect to, serving as the backbone?

    AArea 1
    BArea 0
    CArea 51
    DAny area can serve as the backbone
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    OSPF Area 0 is the backbone area. All other OSPF areas must connect to Area 0 either directly or via virtual links. This hierarchical design ensures loop-free inter-area routing and is a fundamental OSPF requirement.

  20. Question 20IP Connectivity

    What is the administrative distance of an OSPF-learned route on a Cisco router?

    A90
    B100
    C110
    D120
    Show Answer & Explanation
    Correct Answer: C
    Explanation:

    OSPF has a default administrative distance (AD) of 110 on Cisco routers. EIGRP internal routes have AD 90, EIGRP external has AD 170, RIP has AD 120, static routes have AD 1 (or 0 for connected), and eBGP has AD 20.

  21. Question 21IP Connectivity

    In OSPF, what role does the Designated Router (DR) play on a multi-access network?

    AThe DR redistributes routes from other routing protocols into OSPF
    BThe DR reduces the number of adjacencies by acting as a central point for LSA exchange on the segment
    CThe DR performs route summarization between OSPF areas
    DThe DR encrypts OSPF hello packets to prevent unauthorized neighbors
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    On multi-access networks (like Ethernet), the DR reduces OSPF overhead by minimizing the number of full adjacencies. Instead of every router forming adjacencies with every other router (n*(n-1)/2), all routers form adjacencies only with the DR and BDR. The DR collects and distributes LSAs for the segment. Route redistribution is done by ASBRs, and summarization by ABRs.

  22. Question 22IP Connectivity

    Which command enables OSPF on all interfaces whose IP addresses fall within the 10.1.0.0/16 range on a Cisco router?

    Arouter ospf 1 network 10.1.0.0 0.0.255.255 area 0
    Brouter ospf 1 network 10.1.0.0 255.255.0.0 area 0
    Crouter ospf 1 redistribute connected
    Dinterface range gi0/0 - 3 ip ospf 1 area 0
    Show Answer & Explanation
    Correct Answer: A
    Explanation:

    OSPF uses wildcard masks (inverse of subnet masks). For a /16 network, the wildcard mask is 0.0.255.255. The command 'network 10.1.0.0 0.0.255.255 area 0' activates OSPF on all interfaces with IP addresses in the 10.1.x.x range and places them in Area 0. Option B incorrectly uses a subnet mask instead of a wildcard mask.

  23. Question 23IP Connectivity

    What metric does OSPF use to determine the best path to a destination?

    AHop count
    BBandwidth and delay (composite metric)
    CCost (based on interface bandwidth)
    DAdministrative distance
    Show Answer & Explanation
    Correct Answer: C
    Explanation:

    OSPF uses cost as its metric, calculated as the reference bandwidth divided by the interface bandwidth (default: 100 Mbps / interface bandwidth). Lower cost means a better path. RIP uses hop count. EIGRP uses a composite metric based on bandwidth and delay. Administrative distance is used to choose between different routing protocols, not within a protocol.

  24. Question 24IP Connectivity

    What must be configured when redistributing routes between OSPF and EIGRP?

    ANothing special — routes transfer automatically
    BA seed metric must be configured for redistributed routes, and route maps can filter which routes are redistributed
    CBoth protocols must use the same AS number
    DOnly static routes can be redistributed
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Route redistribution requires: a seed metric (EIGRP needs bandwidth/delay/reliability/load/MTU; OSPF needs cost/type). Without a metric, redistributed routes may be ignored. Route maps and distribute lists filter which routes are injected to prevent loops.

  25. Question 25IP Connectivity

    If a router learns the same destination via OSPF (AD 110) and EIGRP (AD 90), which route is installed?

    AOSPF (lower number always loses)
    BEIGRP — lower administrative distance (90) is preferred over OSPF (110), indicating higher trustworthiness
    CBoth routes are installed for load balancing
    DThe route learned first
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Administrative Distance determines route preference between different routing sources. Lower AD = more trusted. Common ADs: Connected (0), Static (1), EIGRP (90), OSPF (110), IS-IS (115), RIP (120), External EIGRP (170), iBGP (200). EIGRP's 90 beats OSPF's 110.

Key OSPF Concepts for CCNA

ospfarealsadrbdrneighboradjacencycosthellodead timerspflink-state

CCNA OSPF Exam Tips

Open Shortest Path First (OSPF) questions in CCNA are typically scenario-based. Focus on service-level decision making aligned to official exam objectives. Priority concepts: ospf, area, lsa, dr, bdr, neighbor.

What CCNA Expects

  • Anchor your answer in select the most practical, secure, and scalable answer for the stated scenario.
  • OSPF scenarios for CCNA are frequently mapped to Domain 3 (25%), so read the objective carefully before picking controls or architecture.
  • Expect multi-service scenarios where OSPF interacts with IAM, networking, storage, or observability patterns rather than appearing as an isolated service question.
  • When two options are both technically valid, prefer the choice that best aligns with the exam's operational scope (Associate) and managed-service best practices.

High-Value OSPF Concepts

  • Know the core OSPF building blocks cold: ospf, area, lsa, dr.
  • Review the edge-case features and limits for bdr, neighbor; these details are commonly used to differentiate answer choices.
  • Practice service-integration reasoning: how OSPF pairs with Routing, IP Addressing, Network Fundamentals in real deployment patterns.
  • For CCNA, explain why the chosen OSPF design meets reliability, security, and cost expectations better than the alternatives.

Common CCNA Traps

  • Watch for answers that partially solve the requirement but miss operational constraints.
  • Questions in IP Connectivity often include distractors that look correct for OSPF but violate least-privilege, durability, or availability requirements.
  • Avoid picking options purely by feature name; validate data path, failure handling, and governance impact before answering.
  • If the prompt hints at automation or repeatability, eliminate manual-only operational answers first.

Fast Review Checklist

  • Can you compare at least two OSPF implementation paths and justify which one best fits the scenario?
  • Can you map the chosen answer back to IP Connectivity (25%) outcomes for CCNA?
  • Can you explain security and access boundaries for OSPF without relying on default-open assumptions?
  • Can you describe how OSPF integrates with Routing and IP Addressing during failure, scaling, and monitoring events?

Exam Domains Covering OSPF

Related Resources

More CCNA Study Resources