Cisco CCNA Single-Area OSPFv2 Configuration Questions and Answers — Questions and Answers
Question 1: A network engineer configures a Cisco router for single-area OSPFv2. The router has three active interfaces: Loopback0 (10.0.0.1/32), GigabitEthernet0/0 (192.168.1.1/24), and GigabitEthernet0/1 (172.16.1.1/24). The OSPF process is started, but the `router-id` command is NOT used. Which IP address will OSPF select as the router ID?
- 192.168.1.1
- 172.16.1.1
- 10.0.0.1 (Correct answer)
- The OSPF process will fail to start without a manual router-id.
Correct answer: 10.0.0.1
The OSPF router ID selection process on Cisco IOS follows a specific order of precedence: 1) The address manually configured with the `router-id` command. 2) The highest IP address on any configured loopback interfaces. 3) The highest IP address on any active non-loopback (physical) interfaces. Since the `router-id` command was not used, OSPF will select the highest loopback IP address, which is 10.0.0.1.
Question 2: An administrator needs to enable OSPF on an interface with the IP address 192.168.10.65/27. Which of the following `network` commands will correctly and most precisely enable OSPF only on this specific interface?
- network 192.168.10.64 0.0.0.31 area 0
- network 192.168.10.65 255.255.255.224 area 0
- network 192.168.10.0 0.0.0.255 area 0
- network 192.168.10.65 0.0.0.0 area 0 (Correct answer)
Correct answer: network 192.168.10.65 0.0.0.0 area 0
The OSPF `network` command uses a wildcard mask, which is the inverse of a subnet mask. A wildcard mask of 0.0.0.0 tells the router to match all 32 bits of the specified IP address exactly. Therefore, `network 192.168.10.65 0.0.0.0 area 0` will enable OSPF exclusively on the interface configured with the IP address 192.168.10.65.
Question 3: A network administrator issues the `passive-interface default` command under the OSPF process. What is the effect of this command?
- It prevents all interfaces from being advertised in OSPF.
- It sets the OSPF cost to the default value on all interfaces.
- It stops OSPF from forming adjacencies on any interface. (Correct answer)
- It enables OSPF on all interfaces using default timers.
Correct answer: It stops OSPF from forming adjacencies on any interface.
The `passive-interface default` command globally prevents the router from sending or receiving OSPF Hello packets on all interfaces by default. This stops the formation of neighbor adjacencies. To form an adjacency on a specific interface, the administrator must then use the `no passive-interface <interface-name>` command. The networks on passive interfaces are still advertised into OSPF.
Question 4: Two OSPF routers are connected via a FastEthernet link (100 Mbps) but are failing to form a full adjacency, remaining in the 2-WAY state. Both routers are on the same subnet (10.1.1.0/30) and in the same area (Area 0). Which of the following is a valid reason for this issue on a broadcast network type like Ethernet?
- The OSPF process IDs do not match.
- One router is a DR, and the other is a DROTHER.
- The OSPF priority on both routers is set to 0. (Correct answer)
- The Hello and Dead timers are mismatched.
Correct answer: The OSPF priority on both routers is set to 0.
On broadcast multi-access networks, OSPF elects a Designated Router (DR) and a Backup Designated Router (BDR). Routers that are not a DR or BDR (DROTHERs) will only form a FULL adjacency with the DR and BDR. DROTHER routers will remain in the 2-WAY state with other DROTHERs. If both routers have their OSPF interface priority set to 0, neither can be elected as DR or BDR, preventing them from moving past the 2-WAY state.
Question 5: A company's network includes links with speeds of 1 Gbps and 10 Gbps. A network engineer notices that OSPF is treating both links as having the same cost. What command should be used within the OSPF routing process to ensure OSPF calculates a more granular and accurate cost for these high-speed links?
- ip ospf cost 10
- bandwidth 10000
- auto-cost reference-bandwidth 10000 (Correct answer)
- speed auto 10000
Correct answer: auto-cost reference-bandwidth 10000
By default, OSPF uses a reference bandwidth of 100 Mbps. The cost is calculated as (Reference Bandwidth / Interface Bandwidth). For any interface with a bandwidth of 100 Mbps or higher (like 1 Gbps and 10 Gbps), the calculated cost will be 1, making them appear equal. The `auto-cost reference-bandwidth <value_in_Mbps>` command increases the reference bandwidth, allowing for different costs to be calculated for links faster than 100 Mbps. For example, a value of 10000 (for 10 Gbps) would result in a cost of 10 for a 1 Gbps link and 1 for a 10 Gbps link.
Question 6: To establish an OSPFv2 neighbor adjacency, which of the following parameters must be identical on two directly connected routers?
- Router ID
- Process ID
- OSPF Interface Priority
- Area ID and Subnet Mask (Correct answer)
Correct answer: Area ID and Subnet Mask
For two OSPF routers to become neighbors, several parameters must match. Crucially, their interfaces on the connecting link must be in the same OSPF area and configured with the same subnet mask. While Hello/Dead timers and authentication must also match, Router IDs must be unique, the Process ID is only locally significant, and the interface priority is used for DR/BDR election, not for forming the initial adjacency.
A network engineer configures a Cisco router for single-area OSPFv2.
The router has three active interfaces: Loopback0 (10.0.0.1/32), GigabitEthernet0/0 (192.168.1.1/24), and GigabitEthernet0/1 (172.16.1.1/24).
The OSPF process is started, but the `router-id` command is NOT used.
Which IP address will OSPF select as the router ID?