CCNA Domain 3: IP Connectivity
50 free practice questions for IP Connectivity in the Cisco Certified Network Associate (CCNA 200-301) exam. Try each question first, then open "Show answer" for the correct option and explanation.
IP Connectivity practice questions
-
Question 1. A router has routes to 10.1.0.0/16, 10.1.1.0/24, and 10.1.1.0/26. Which route is used for a packet to 10.1.1.20?
Show answer
Answer: C. 10.1.1.0/26
Routers use the longest prefix match, the most specific route containing the destination.
-
Question 2. A router learns the same prefix from OSPF and from EIGRP. Which route is installed, with default settings?
Show answer
Answer: C. The EIGRP route, because its administrative distance is lower
Internal EIGRP has an AD of 90 and OSPF 110. Lower AD wins between different sources; metrics compare routes within one protocol.
-
Question 3. What is the default administrative distance of a static route?
Show answer
Answer: C. 1
Directly connected routes are 0 and static routes are 1. OSPF is 110 and RIP is 120.
-
Question 4. What is the default administrative distance of OSPF?
Show answer
Answer: D. 110
OSPF's AD is 110, higher than EIGRP (90) and lower than RIP (120).
-
Question 5. In the output of show ip route, what does the code "O" indicate?
Show answer
Answer: A. A route learned through OSPF
O marks OSPF routes (O IA for inter-area). C is connected, S is static, and D is EIGRP.
-
Question 6. In the route entry O 10.2.2.0/24 [110/20] via 192.168.1.2, what does 20 represent?
Show answer
Answer: C. The OSPF metric (cost) of the route
The bracketed values are [administrative distance/metric].
-
Question 7. What is the "gateway of last resort" in a routing table?
Show answer
Answer: A. The next hop of the default route
The gateway of last resort is used when no more specific route matches.
-
Question 8. Which command configures an IPv4 default static route pointing to next hop 203.0.113.1?
Show answer
Answer: A. ip route 0.0.0.0 0.0.0.0 203.0.113.1
0.0.0.0/0 matches every destination and is used when nothing more specific exists.
-
Question 9. Which command creates an IPv6 default route to next hop 2001:DB8::1?
Show answer
Answer: B. ipv6 route ::/0 2001:DB8::1
::/0 is the IPv6 default route. ipv6 unicast-routing must also be enabled.
-
Question 10. A backup static route should be used only if the OSPF-learned route fails. How should it be configured?
Show answer
Answer: A. As a floating static route with an administrative distance above 110
A floating static route has a higher AD than the primary route, so it's installed only when the primary disappears.
-
Question 11. What is a host route in IPv4?
Show answer
Answer: B. A route to a single address, with a /32 mask
Host routes use /32 (or /128 in IPv6) to match exactly one address.
-
Question 12. When a static route uses only an exit interface on an Ethernet link, what can happen?
Show answer
Answer: A. The router must ARP for every destination, relying on proxy ARP
On multi-access links, specifying a next-hop address (or both) avoids reliance on proxy ARP.
-
Question 13. Which IPv6 next hop must be combined with an exit interface in a static route?
Show answer
Answer: B. A link-local address
Link-local addresses are only unique on a link, so the router needs the exit interface to use them.
-
Question 14. How does OSPF choose the router ID if none is configured manually?
Show answer
Answer: A. The highest IPv4 address on a loopback, or else on an active interface
A manual router-id wins. Otherwise the highest loopback address is used, then the highest active physical interface address.
-
Question 15. Which OSPF packet type is used to discover and maintain neighbors?
Show answer
Answer: A. Hello
Hello packets discover neighbors and act as keepalives. DBD, LSR, LSU, and LSAck exchange the link-state database.
-
Question 16. Two OSPF routers on the same link will not become neighbors. Which mismatch prevents adjacency?
Show answer
Answer: C. Different hello and dead timers
Hello/dead timers, area ID, subnet, authentication, and stub flags must match. Router IDs must be different.
-
Question 17. Which OSPF neighbor state indicates the routers have fully synchronized their databases?
Show answer
Answer: A. Full
Full means the adjacency is complete. On broadcast networks, DROthers stay in 2-Way with each other.
-
Question 18. On an Ethernet broadcast segment, why does OSPF elect a DR and BDR?
Show answer
Answer: C. To reduce the number of adjacencies and LSA flooding
Routers form full adjacencies only with the DR and BDR, which reduces overhead on multi-access networks.
-
Question 19. How is the OSPF designated router elected?
Show answer
Answer: B. Highest interface priority, then highest router ID
Priority 0 means the router never becomes DR. The election isn't preemptive, so a new higher-priority router won't take over.
-
Question 20. Which command stops a router from ever becoming the DR on an interface?
Show answer
Answer: C. ip ospf priority 0
Priority 0 excludes the router from DR and BDR elections.
-
Question 21. Which OSPF network type has no DR/BDR election and is common on serial or directly connected router links?
Show answer
Answer: C. Point-to-point
Point-to-point networks form a single adjacency, so no DR is needed. Setting Ethernet links between two routers to point-to-point speeds up adjacency.
-
Question 22. How is OSPF cost calculated by default on Cisco routers?
Show answer
Answer: D. Reference bandwidth divided by interface bandwidth
The default reference bandwidth is 100 Mbps, so all links of 100 Mbps and faster get cost 1 unless the reference is raised.
-
Question 23. What does the passive-interface command do in OSPF?
Show answer
Answer: B. Stops sending hellos on the interface while still advertising its network
Passive interfaces are used on LAN interfaces with no routers, preventing unwanted adjacencies.
-
Question 24. Which command enables OSPF on all interfaces with addresses in 10.0.0.0/8, in area 0?
Show answer
Answer: B. network 10.0.0.0 0.255.255.255 area 0
The network command uses a wildcard mask. Alternatively, ip ospf 1 area 0 can be set per interface.
-
Question 25. In a single-area OSPF design, which area must be used?
Show answer
Answer: D. Area 0, the backbone
Single-area designs commonly use area 0. In multi-area designs, all areas must connect to area 0.
-
Question 26. What is the purpose of a first hop redundancy protocol (FHRP)?
Show answer
Answer: A. Provide a backup default gateway that hosts use without reconfiguration
FHRPs share a virtual IP and MAC between routers, so the gateway survives a router failure.
-
Question 27. Which FHRP is Cisco proprietary and uses an active and a standby router?
Show answer
Answer: B. HSRP
HSRP uses active and standby roles. VRRP is the open standard with master and backup roles.
-
Question 28. Which FHRP is an open standard?
Show answer
Answer: C. VRRP
VRRP is defined by the IETF. HSRP and GLBP are Cisco proprietary.
-
Question 29. Which FHRP can load-balance traffic from hosts across several gateway routers using one virtual IP?
Show answer
Answer: A. GLBP
GLBP gives different hosts different virtual MACs so several routers forward traffic at once.
-
Question 30. In HSRP, what happens by default when a higher-priority router comes back online after a failure?
Show answer
Answer: C. It stays standby unless preemption is configured
HSRP doesn't preempt by default. The standby preempt command lets the higher-priority router reclaim the active role.
-
Question 31. What is the default HSRP priority?
Show answer
Answer: A. 100
The highest priority becomes active. On a tie, the highest IP address wins.
-
Question 32. What IP address do hosts use as their default gateway in an HSRP group?
Show answer
Answer: A. The virtual IP address shared by the group
Hosts point to the virtual IP, which moves between routers as roles change.
-
Question 33. A router has two routes to the same prefix from OSPF with equal cost. What does it do by default?
Show answer
Answer: D. Installs both and load-balances across them
OSPF supports equal-cost multipath. Cisco routers install up to 4 equal-cost paths by default.
-
Question 34. Which command shows OSPF neighbors and their states?
Show answer
Answer: C. show ip ospf neighbor
show ip ospf neighbor lists neighbor router IDs, priority, state, and interface.
-
Question 35. A router's routing table has no route for a destination and no default route. What happens to the packet?
Show answer
Answer: C. It is dropped and an ICMP unreachable message may be sent
Without a matching route, the packet is discarded.
-
Question 36. What does the routing table code "L" represent in Cisco IOS?
Show answer
Answer: B. The router's own interface address, as a /32 route
L routes are the router's own addresses. C routes are the connected networks.
-
Question 37. Which statement about OSPF is correct?
Show answer
Answer: B. It is a link-state protocol that uses Dijkstra's SPF algorithm
OSPF routers build a link-state database and run SPF to calculate best paths. RIP sends periodic full updates.
-
Question 38. Which multicast address do OSPF routers use to send hellos to all OSPF routers?
Show answer
Answer: C. 224.0.0.5
224.0.0.5 is AllSPFRouters. 224.0.0.6 is used to reach the DR and BDR.
-
Question 39. An OSPF router sits in the ExStart state with a neighbor. What is a common cause?
Show answer
Answer: A. An MTU mismatch between the two interfaces
Routers can get stuck in ExStart/Exchange when their interface MTUs differ.
-
Question 40. Which command changes the reference bandwidth so 10 Gbps and 1 Gbps links get different OSPF costs?
Show answer
Answer: A. auto-cost reference-bandwidth 10000
Setting the reference bandwidth (in Mbps) higher than the fastest link gives faster links lower costs. It should match on all routers.
-
Question 41. Which route source is always preferred when the same prefix is learned several ways?
Show answer
Answer: A. A directly connected network
Connected routes have an administrative distance of 0, the most trusted source.
-
Question 42. What happens when a packet's TTL reaches zero at a router?
Show answer
Answer: C. The router drops it and sends an ICMP time exceeded message
TTL prevents packets from looping forever. Traceroute uses these ICMP messages to map the path.
-
Question 43. Before forwarding a packet on Ethernet, what does a router need to learn about the next hop?
Show answer
Answer: C. Its MAC address, through ARP or IPv6 neighbor discovery
The router rewrites the layer 2 header with the next hop's MAC address on each hop.
-
Question 44. Which statement about the IP header as a packet crosses several routers is correct?
Show answer
Answer: B. The source and destination IP addresses stay the same, but the MAC addresses change
Without NAT, IP addresses stay end to end. Layer 2 addresses are rewritten on each link.
-
Question 45. What does the command ip route 192.168.50.0 255.255.255.0 10.0.0.2 200 create?
Show answer
Answer: C. A static route with an administrative distance of 200
The trailing number sets the AD, making this a floating static route.
-
Question 46. Which command enables IPv6 routing on a Cisco router?
Show answer
Answer: B. ipv6 unicast-routing
Without ipv6 unicast-routing, the router won't forward IPv6 packets between interfaces.
-
Question 47. Which protocol type does OSPFv3 route?
Show answer
Answer: B. IPv6, and IPv4 through address families
OSPFv3 was built for IPv6 and can carry IPv4 through address families.
-
Question 48. Which OSPF router role on a broadcast segment takes over if the DR fails?
Show answer
Answer: C. The BDR
The backup designated router is already fully adjacent with all routers, so it can take over quickly.
-
Question 49. Why is a loopback interface commonly used for the OSPF router ID?
Show answer
Answer: B. It is always up, so the router ID stays stable
A loopback doesn't go down with a physical link, so it provides a stable identity. Configuring router-id explicitly is also common.
-
Question 50. What does the "via" address in a routing table entry indicate?
Show answer
Answer: B. The next-hop router's IP address
The next hop is where the router sends packets to reach that destination.
Cisco and CCNA are trademarks or registered trademarks of Cisco Systems, Inc. These questions are original study material, not questions from the real exam.