CCNA practice test / CCNA OSPF Practice Questions: Single-Area OSPFv2

CCNA OSPF Practice Questions: Single-Area OSPFv2

10 original questions, each with an explanation for every option. On the 13 related questions in our full bank, CertAce users answer 43% correctly.

I failed my first CCNA with 58%. Knowing what a protocol is and reading its output under time pressure are two different skills, and OSPF questions test the second one. I work as a network engineer now, and OSPF is still one of the protocols I check first when something stops routing.

On the 200-301 exam, OSPF sits under IP Connectivity. Cisco expects you to configure and verify single-area OSPFv2: neighbor adjacencies, point-to-point vs broadcast network types, DR/BDR election and router ID. In practice this means reading output quickly and knowing which parameters must match between neighbors, which ones don't, and what each neighbor state says about where the process is stuck.

The way to get good at this is boring and it works. Build a small lab in Packet Tracer, CML or GNS3 with three or four routers on one switch and a point-to-point link. Then break it on purpose: change a hello timer, a mask, an MTU, a priority, a passive interface. Each time, run show ip ospf neighbor, show ip ospf interface and show ip route ospf before you fix it. The questions below are built the same way. Read every explanation, including the ones for wrong answers.

Adrian, network engineer and founder of CertAce.

How to work these questions

  1. Run show ip ospf neighbor. No entry at all means a hello-level problem; an entry stuck in EXSTART/EXCHANGE points to MTU; 2WAY between DROTHERs is normal.
  2. Run show ip ospf interface on both ends and compare area, network type, hello/dead timers and the IP address/mask.
  3. Check that the interface is not passive (show ip protocols lists passive interfaces) and that OSPF is enabled on it at all.
  4. Confirm router IDs are unique and authentication settings match on both sides.
  5. If the neighbor is FULL but a route is missing, check show ip route ospf, costs and whether the route is actually being advertised (for a default route, default-information originate).

Practice questions

Pick an answer to see right away whether it is correct and why every option is right or wrong.

  1. Question 1 of 10Exhibit

    R1 connects to a shared Ethernet segment with three other OSPF routers. Based on the exhibit, which statement is correct?

    R1# show ip ospf neighbor
    
    Neighbor ID     Pri   State           Dead Time   Address         Interface
    192.168.255.2     1   FULL/DR         00:00:36    10.10.10.2      GigabitEthernet0/0
    192.168.255.3     1   FULL/BDR        00:00:31    10.10.10.3      GigabitEthernet0/0
    192.168.255.4     1   2WAY/DROTHER    00:00:38    10.10.10.4      GigabitEthernet0/0
    1. 192.168.255.4 has a hello or dead timer mismatch with R1.
    2. R1 is the BDR, and the 2WAY state with 192.168.255.4 is normal.
    3. There is an MTU mismatch between R1 and 192.168.255.4.
    4. R1 is a DROTHER, and the 2WAY state with 192.168.255.4 is normal.
    Show the answer

    Answer: D

    On broadcast networks, DROTHERs only go FULL with the DR and BDR; DROTHER-to-DROTHER stays at 2WAY and that is healthy. If a router is 2WAY with any neighbor, it cannot be the DR or BDR itself.

    • A. A timer mismatch stops hellos from being accepted, so the neighbor would not appear in the table at all, let alone in 2WAY.
    • B. A BDR forms a FULL adjacency with every router on the segment, including DROTHERs. R1 is only 2WAY with one of them.
    • C. An MTU mismatch shows up as a neighbor stuck in EXSTART or EXCHANGE during database exchange, not as a stable 2WAY.
    • D. The DR and BDR go FULL with every router, so a router that stays in 2WAY with someone must be a DROTHER. Two DROTHERs stop at 2WAY by design.
  2. Question 2 of 10Exhibit

    R1 and R2 are directly connected on GigabitEthernet0/1, but they never become OSPF neighbors. Based on the exhibit, what is the cause?

    R1# show ip ospf interface GigabitEthernet0/1
    GigabitEthernet0/1 is up, line protocol is up
      Internet Address 172.16.12.1/30, Area 0, Attached via Network Statement
      Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
      Transmit Delay is 1 sec, State POINT_TO_POINT
      Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
        Hello due in 00:00:06
      Neighbor Count is 0, Adjacent neighbor count is 0
      Suppress hello for 0 neighbor(s)
    
    R2# show ip ospf interface GigabitEthernet0/1
    GigabitEthernet0/1 is up, line protocol is up
      Internet Address 172.16.12.2/30, Area 0, Attached via Network Statement
      Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 10
      Transmit Delay is 1 sec, State POINT_TO_POINT
      Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
        Hello due in 00:00:03
      Neighbor Count is 0, Adjacent neighbor count is 0
      Suppress hello for 0 neighbor(s)
    1. The hello and dead intervals do not match.
    2. The router IDs are not in the same subnet as the link.
    3. The interface costs do not match.
    4. Point-to-point links cannot form an adjacency because no DR is elected.
    Show the answer

    Answer: A

    Hello and dead timers are part of the adjacency checklist along with area, subnet/mask, authentication and stub flag. Cost and router ID values do not have to match between neighbors.

    • A. R1 uses hello 10/dead 40 and R2 uses hello 5/dead 20. Hello and dead values must match exactly or the hellos are ignored.
    • B. The router ID is just a 32-bit identifier. It does not have to match any interface subnet, only be unique.
    • C. Cost is a local value used only for SPF. Neighbors can have different costs on the same link and still go FULL.
    • D. Point-to-point links skip DR/BDR election and form FULL adjacencies normally. Not electing a DR is expected there.
  3. Question 3 of 10Exhibit

    Refer to the exhibit from R3. Which two statements are true? (Choose two.)

    R3# show ip route ospf
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
           E1 - OSPF external type 1, E2 - OSPF external type 2
           * - candidate default, U - per-user static route
    
    Gateway of last resort is 10.1.23.2 to network 0.0.0.0
    
    O*E2  0.0.0.0/0 [110/1] via 10.1.23.2, 00:14:22, GigabitEthernet0/1
          10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
    O        10.1.12.0/30 [110/2] via 10.1.23.2, 00:14:22, GigabitEthernet0/1
                          [110/2] via 10.1.13.1, 00:14:22, GigabitEthernet0/0
    O     192.168.10.0/24 [110/2] via 10.1.23.2, 00:14:22, GigabitEthernet0/1
                          [110/2] via 10.1.13.1, 00:14:22, GigabitEthernet0/0
    1. The O*E2 metric of 1 increases by the cost of each link as the route is flooded through the area.
    2. R3 load-balances traffic to 192.168.10.0/24 across two equal-cost OSPF paths.
    3. The default route is advertised into OSPF by the router reachable via 10.1.23.2, and R3 installs it with administrative distance 110.
    4. If R3 also learned 192.168.10.0/24 from EIGRP (internal), the OSPF route would stay in the table because OSPF has the lower administrative distance.
    5. The metric of 2 for 192.168.10.0/24 means the network is two router hops away.
    Show the answer

    Answer: B and C

    Read routing table entries as [administrative distance/metric]. OSPF uses AD 110 and a cost-based metric; equal-cost paths are installed together. E2 externals keep their seed metric, E1 externals add internal cost.

    • A. An E2 route keeps its seed metric everywhere in the domain. Only E1 routes add internal cost along the way.
    • B. Two next hops with the same [110/2] are listed, so both are installed and traffic is shared across them (IOS default maximum-paths is 4).
    • C. O*E2 marks an external candidate default learned via OSPF, typically from default-information originate. The bracket shows [AD/metric], so AD is 110.
    • D. Internal EIGRP has AD 90, which is lower than OSPF's 110, so the EIGRP route would win.
    • E. OSPF metric is the sum of interface costs, not a hop count. Two 1 Gbps links at the default reference bandwidth just happen to total 2.
  4. Question 4 of 10Config

    Your OSPF network has 100 Mbps, 1 Gbps and 10 Gbps links. Every 1 Gbps and 10 Gbps interface currently shows cost 1, so OSPF cannot tell them apart. You want 10 Gbps = cost 1, 1 Gbps = cost 10, 100 Mbps = cost 100. Which command should you apply under router ospf 1 on every router?

    1. auto-cost reference-bandwidth 10
    2. ip ospf cost 10 on every interface
    3. auto-cost reference-bandwidth 10000
    4. bandwidth 10000000 on every interface
    Show the answer

    Answer: C

    OSPF cost = reference bandwidth / interface bandwidth, with a default reference of 100 Mbps and a minimum cost of 1. Raise the reference with auto-cost reference-bandwidth (in Mbps) on all routers so costs stay consistent.

    • A. 10 Mbps as the reference makes every link of 10 Mbps or faster cost 1, which makes the problem worse.
    • B. ip ospf cost is an interface command that hard-codes a cost. It is not entered under router ospf, and setting 10 on every interface gives every link the same cost.
    • C. The reference bandwidth is set in Mbps. 10000 Mbps divided by 10000, 1000 and 100 Mbps gives costs 1, 10 and 100.
    • D. bandwidth is an interface command in kbps that changes how an interface is costed, not the reference. Setting it on every interface makes every link look like the same speed, and it is not a router ospf command.
  5. Question 5 of 10Scenario

    Four routers share one Ethernet VLAN and start OSPF at the same moment. R-A: priority 1, RID 10.0.0.9. R-B: priority 0, RID 10.255.255.255. R-C: priority 1, RID 10.0.0.20. R-D: priority 1, RID 10.0.0.5. Which routers become DR and BDR?

    1. DR: R-C, BDR: R-A
    2. DR: R-A, BDR: R-C
    3. DR: R-B, BDR: R-C
    4. DR: R-D, BDR: R-A
    Show the answer

    Answer: A

    DR election: highest priority first, then highest router ID, compared as a number octet by octet. Priority 0 means never DR or BDR. Election is not preemptive, so these results only hold when routers start together.

    • A. Priorities tie at 1 for the eligible routers, so the highest RID wins. 10.0.0.20 is higher than 10.0.0.9, so R-C is DR and R-A is BDR.
    • B. This compares the RIDs as text. As numbers, the last octet 20 is higher than 9, so R-C beats R-A.
    • C. R-B has priority 0, which makes it ineligible for DR or BDR no matter how high its RID is.
    • D. The highest RID wins the tie-break, not the lowest. R-D has the lowest RID of the eligible routers.
  6. Question 6 of 10Scenario

    R7 has no router-id command under router ospf 1. Its interfaces: Loopback0 10.255.0.1/32 (in OSPF), Loopback1 192.0.2.1/32 (not in any network statement), GigabitEthernet0/0 203.0.113.254/24 (up, in OSPF). Which router ID does OSPF choose?

    1. 0.0.0.0, because no router ID was configured
    2. 192.0.2.1, because it is the highest loopback address
    3. 10.255.0.1, because only loopbacks enabled for OSPF are considered
    4. 203.0.113.254, because it is the highest IP address on the router
    Show the answer

    Answer: B

    Router ID order: router-id command, then highest IP on an up loopback, then highest IP on an up physical interface. The interface does not need to be in OSPF. The RID must be unique, and a change only takes effect after clear ip ospf process or a reload.

    • A. IOS always derives a router ID from an interface if none is configured. OSPF only fails to start when no up interface with an IPv4 address exists.
    • B. With no manual router-id, IOS picks the highest IP on an up loopback. 192.0.2.1 beats 10.255.0.1, and the loopback does not need to run OSPF.
    • C. Router ID selection does not require the loopback to be advertised in OSPF. Any up loopback counts.
    • D. A physical interface address is only used when no loopback is up. Loopbacks are checked first.
  7. Question 7 of 10Scenario

    After a WAN provider swaps a circuit, R1 shows its OSPF neighbor R2 stuck in EXSTART, while R2 shows R1 in EXCHANGE. They never reach FULL. Area, subnet, hello/dead timers and authentication were checked and match. What is the most likely cause?

    1. An interface MTU mismatch between R1 and R2
    2. An area ID mismatch between R1 and R2
    3. An authentication key mismatch on the link
    4. Both routers have priority 0 on the link
    Show the answer

    Answer: A

    Hello-level parameters (area, subnet, timers, auth, stub flag) decide whether a neighbor appears at all. A neighbor that appears but sticks in EXSTART/EXCHANGE usually points to an MTU mismatch.

    • A. Hellos do not check MTU, so neighbors reach EXSTART/EXCHANGE, but DBD packets carry the MTU and the larger-MTU side's packets are rejected. Fix the MTU (or use ip ospf mtu-ignore as a workaround).
    • B. An area mismatch makes the routers reject each other's hellos, so they never get to EXSTART. It was also checked.
    • C. Mismatched authentication also breaks the hello exchange, so the neighbor would not progress past DOWN/INIT.
    • D. Priority 0 on both ends only means no DR/BDR on a broadcast link. On a point-to-point WAN link it is irrelevant, and it never causes EXSTART loops.
  8. Question 8 of 10Scenario

    To stop sending hellos toward user LANs, an engineer enters passive-interface default and then no passive-interface GigabitEthernet0/0 under router ospf 1 on R5. Immediately the adjacency to R6 on GigabitEthernet0/1 goes down, but R5's LAN subnets are still in other routers' tables. What explains this and what fixes it?

    1. The new settings need clear ip ospf process before the adjacency can come back.
    2. Passive interfaces still send hellos but drop LSAs. Change the network type on Gi0/1.
    3. Gi0/1 is now passive and sends no hellos. Add no passive-interface GigabitEthernet0/1.
    4. passive-interface default removes all networks from OSPF. Re-enter the network statements.
    Show the answer

    Answer: C

    A passive interface is advertised in OSPF but sends no hellos and forms no adjacencies. With passive-interface default, you must explicitly un-passive every interface that faces an OSPF neighbor.

    • A. Passive settings apply right away, which is why the adjacency dropped right away. Clearing the process will not undo a passive interface.
    • B. Passive interfaces send no hellos at all, so no adjacency can form on them. The network type is not the problem.
    • C. passive-interface default made every interface passive, and only Gi0/0 was excluded. A passive interface sends no hellos, so the R6 adjacency drops while its subnet is still advertised.
    • D. Passive interfaces are still advertised into OSPF, which is why the LAN subnets are still visible. Nothing needs re-adding.
  9. Question 9 of 10Config

    Edge router R1 has ip route 0.0.0.0 0.0.0.0 198.51.100.1 toward the ISP. You want every other router in OSPF area 0 to learn a default route pointing toward R1. Which command do you enter under router ospf 1 on R1?

    1. area 0 default-cost 1
    2. default-information originate
    3. network 0.0.0.0 255.255.255.255 area 0
    4. redistribute static subnets
    Show the answer

    Answer: B

    To share a default route through OSPF, use default-information originate on the router that has it. Add always only if you want it advertised even when the local default route disappears.

    • A. area default-cost sets the cost of the default summary an ABR sends into a stub area. It does not originate a default in area 0.
    • B. default-information originate advertises 0.0.0.0/0 as an external (O*E2) route as long as R1 has a default route in its own table.
    • C. This network statement enables OSPF on every interface. It matches interfaces, not routes, so it does not advertise a default route.
    • D. Redistributing static routes into OSPF does not include the default route. OSPF only advertises 0.0.0.0/0 through default-information originate.
  10. Question 10 of 10Exhibit

    R1 and R2 connect through a switch on GigabitEthernet0/0 (OSPF broadcast network type). They do not become neighbors. Based on the exhibit, what is the cause?

    R1 configuration (excerpt)
    interface GigabitEthernet0/0
     ip address 10.20.30.1 255.255.255.0
     ip ospf 1 area 0
    !
    router ospf 1
     router-id 1.1.1.1
    
    R2 configuration (excerpt)
    interface GigabitEthernet0/0
     ip address 10.20.30.2 255.255.255.128
     ip ospf priority 0
    !
    router ospf 10
     router-id 2.2.2.2
     network 10.20.30.0 0.0.0.127 area 0
    1. The OSPF process IDs (1 and 10) are different.
    2. R1 enables OSPF with an interface command while R2 uses a network statement.
    3. R2 has priority 0, which prevents it from forming any adjacency.
    4. The subnet masks on the two interfaces do not match.
    Show the answer

    Answer: D

    On broadcast and NBMA links, neighbors must share the subnet and mask. Process IDs, the way OSPF is enabled, and priority values do not have to match.

    • A. The process ID is only significant locally. Neighbors can use different process IDs.
    • B. ip ospf 1 area 0 and a network statement are two ways to enable OSPF on an interface. Mixing them between routers is fine.
    • C. Priority 0 only stops R2 from becoming DR or BDR. It still goes FULL with the DR and BDR.
    • D. R1 uses /24 and R2 uses /25. On broadcast links, the network mask in the hello must match, so the hellos are rejected.

Want more like these? The full CertAce bank has timed exams, a review pool for the questions you miss and readiness per exam domain.

Start free trial

3 days and 100 questions, no card needed.

Common mistakes

Questions people ask

How much OSPF is on the CCNA 200-301 exam?

OSPF falls under the IP Connectivity domain, which Cisco weights at 25% of the exam. The specific objective is configuring and verifying single-area OSPFv2: adjacencies, point-to-point and broadcast network types, DR/BDR selection and router ID. Cisco does not publish how many questions cover each objective, so be ready for both multiple-choice and output-reading questions.

Do I need multi-area OSPF or OSPFv3 for the CCNA?

The CCNA objective is single-area OSPFv2. You should still know what an area and an ABR are, but multi-area design, LSA types in depth and OSPFv3 are covered properly at CCNP level.

Does OSPF DR election happen again if a router with higher priority joins later?

No. DR/BDR election is not preemptive. A new router with a higher priority or router ID becomes DR only after the current DR and BDR go down or the OSPF process is reset on the segment.

More CCNA topics

Questions written by CertAce. CertAce is not affiliated with or endorsed by Cisco Systems. CCNA and Cisco are trademarks of Cisco Systems, Inc.