CCNA practice test / CCNA Static Routing Practice Questions: ip route and the Routing Table
CCNA Static Routing Practice Questions: ip route and the Routing Table
10 original questions, each with an explanation for every option.
I failed my first CCNA attempt with 58%. Static routing looked like the easy part of the blueprint, one command and a routing table, and that is exactly why it catches people: the questions are not about typing ip route, they are about predicting which entry a router will actually use. I work as a network engineer, and the same reading skill is what I use when a packet goes the wrong way in a real network.
On the 200-301 exam, IPv4 static routing sits under IP Connectivity together with the routing table itself. Cisco expects you to configure default, network, host and floating static routes, to explain the difference between a next-hop address and an exit interface, and to read show ip route: the codes, the [AD/metric] pair, the gateway of last resort. Above all it expects you to apply the selection order correctly: longest prefix match first, then administrative distance, then metric. Most wrong answers come from running that order backwards.
The practice that works is small and repetitive. Build three routers in Packet Tracer or CML, add overlapping prefixes from different sources, a static /22 next to an OSPF /24 and an EIGRP /16, and predict the next hop for a handful of addresses before you check with show ip route and traceroute. Then shut the interface the next hop lives on and watch the static route disappear. The ten questions below are built from those situations. Read the explanations for the wrong options too; they are where the exam traps are.
Adrian, network engineer and founder of CertAce.
How to work these questions
- Convert the destination address and every candidate route into binary only as far as the longest mask. Keep the routes whose network bits match; discard the rest no matter how low their AD is.
- If one route is left, you are done. If several remain with different prefix lengths, the longest prefix wins. Only equal-length prefixes go to the next step.
- Among equal prefixes, compare administrative distance: connected 0, static 1, eBGP 20, EIGRP 90, OSPF 110, RIP 120. Lower wins, and the metric is not looked at.
- Among routes from the same source, compare the metric; equal metrics mean equal-cost load sharing.
- If nothing matched, look for a gateway of last resort (S* or O*E2 0.0.0.0/0). No default route means the packet is dropped.
- For a static route, confirm it can be installed at all: the exit interface must be up, or the next hop must itself be reachable through another route in the table.
Practice questions
Pick an answer to see right away whether it is correct and why every option is right or wrong.
-
Question 1 of 10Exhibit
R1 receives a packet destined for 172.16.9.10. Based on the exhibit, which next hop does R1 use?
R1# show ip route | begin Gateway Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks C 10.0.12.0/30 is directly connected, GigabitEthernet0/0 L 10.0.12.1/32 is directly connected, GigabitEthernet0/0 C 10.0.13.0/30 is directly connected, GigabitEthernet0/1 L 10.0.13.1/32 is directly connected, GigabitEthernet0/1 C 10.0.14.0/30 is directly connected, GigabitEthernet0/2 L 10.0.14.1/32 is directly connected, GigabitEthernet0/2 172.16.0.0/16 is variably subnetted, 3 subnets, 3 masks D 172.16.0.0/16 [90/3072000] via 10.0.12.2, 00:40:12, GigabitEthernet0/0 S 172.16.8.0/22 [1/0] via 10.0.13.3 O 172.16.8.0/24 [110/2] via 10.0.14.4, 00:35:51, GigabitEthernet0/2- 10.0.12.2, because the EIGRP route is the most trusted dynamic route in the table.
- 10.0.13.3, because /22 is the longest prefix that actually contains 172.16.9.10.
- 10.0.14.4, because the /24 route is the most specific entry in the table.
- None of them; the overlapping entries make the destination ambiguous and the packet is dropped.
Show the answer
Answer: B
First discard every route that does not contain the destination, then pick the longest prefix among the ones that do. Administrative distance and metric are only consulted between routes of identical prefix length. A /24 that does not cover the address is not more specific; it is irrelevant.
- A. The EIGRP /16 does contain the destination, but a /22 that also contains it is more specific. Prefix length is compared before administrative distance, so 90 never gets a say here.
- B. 172.16.8.0/22 covers 172.16.8.0 through 172.16.11.255, which includes 172.16.9.10, and 22 bits is the longest matching mask. The static route via 10.0.13.3 wins.
- C. 172.16.8.0/24 only covers 172.16.8.0 through 172.16.8.255. The destination 172.16.9.10 is outside it, so this route is not a candidate at all, however specific it looks.
- D. Overlapping prefixes are normal in a routing table. The router resolves them with longest prefix match; nothing is dropped as long as at least one entry matches.
-
Question 2 of 10Calculation
R3 learns 10.8.4.0/24 from EIGRP with metric 3072000 and from OSPF with cost 3, and it also has a static route to 10.8.0.0/16 via 192.0.2.1. R3 receives a packet for 10.8.4.9. Which route forwards the packet?
- The EIGRP route: at equal prefix length the lower AD of 90 wins before any metric is compared.
- The OSPF route: its cost of 3 is far lower than the EIGRP metric of 3072000.
- The static route: its AD of 1 is the lowest of the three, so it is preferred.
- Both dynamic routes: the router load-balances between the EIGRP and OSPF paths.
Show the answer
Answer: A
Route selection runs in order: longest prefix match, then administrative distance, then metric. The static /16 loses on prefix length, and the OSPF /24 loses on AD even though its metric number looks smaller. Metrics from different protocols are never compared.
- A. Two /24 routes beat the /16 on prefix length. Between them, EIGRP (AD 90) is preferred over OSPF (AD 110), so the EIGRP route is installed and used; the metric values never come into the decision.
- B. A metric is only meaningful inside one protocol. An OSPF cost of 3 and an EIGRP composite metric of 3072000 are measured in different units and are never compared to each other.
- C. The static /16 has the lowest AD, but it loses on the first criterion: 24 bits of match is longer than 16. AD is only compared between routes of equal prefix length.
- D. Equal-cost load sharing happens between paths learned from the same protocol with the same metric. Routes from different protocols to the same prefix compete on AD, and only the winner is installed.
-
Question 3 of 10Config
R1's GigabitEthernet0/1 is 10.0.0.1/30 and connects to R2 at 10.0.0.2. The LAN 192.168.50.0/24 is behind R2. Which command on R1 installs a static route to that LAN using a next-hop address?
- ip route 192.168.50.0 0.0.0.255 10.0.0.2
- ip route 192.168.50.0 255.255.255.0 10.0.0.1
- ip route 192.168.50.0 255.255.255.0 10.0.0.2
- ip route 192.168.50.0/24 next-hop 10.0.0.2
Show the answer
Answer: C
A next-hop static route is ip route <destination network> <subnet mask> <neighbor address>. The mask is dotted decimal, never a wildcard, and the next hop is the neighbor's address on the shared link, not your own interface address.
- A. The ip route command takes a subnet mask, not a wildcard mask. 0.0.0.255 is what the OSPF or EIGRP network command uses; here IOS would reject it or create a route to the wrong prefix.
- B. 10.0.0.1 is R1's own address on the link. A static route must point to the neighbor that can forward the traffic, which is R2 at 10.0.0.2.
- C. The syntax is ip route <network> <mask> <next-hop>: destination 192.168.50.0, mask 255.255.255.0, next hop 10.0.0.2, which is R2's address on the directly connected link.
- D. Classic IOS does not accept prefix-length notation or a next-hop keyword in the ip route command; that style belongs to other operating systems. The mask must be written in dotted decimal.
-
Question 4 of 10Config
R2 receives a default route from OSPF (O*E2 0.0.0.0/0 [110/1] via 10.0.23.3). A DSL backup on GigabitEthernet0/2 reaches the provider router at 198.51.100.1 and must be used only if the OSPF default route disappears. Which command achieves this?
- ip route 0.0.0.0 0.0.0.0 198.51.100.1 5
- ip route 0.0.0.0 0.0.0.0 198.51.100.1
- ip route 0.0.0.0 255.255.255.255 198.51.100.1 150
- ip route 0.0.0.0 0.0.0.0 198.51.100.1 150
Show the answer
Answer: D
A floating static route is an ordinary ip route with a distance higher than the route it protects: above 110 to back up OSPF, above 90 for EIGRP, above 1 for another static. The default route itself is written 0.0.0.0 0.0.0.0; any other mask changes its meaning.
- A. An AD of 5 is higher than the default static value of 1, so it floats above another static route, but it is still far below OSPF's 110. This route would replace the OSPF default immediately instead of backing it up.
- B. Without a distance value the static route gets AD 1, beats the OSPF default (110) and becomes the active route through the DSL line all the time.
- C. A mask of 255.255.255.255 with network 0.0.0.0 defines a host route to the address 0.0.0.0, not a default route. It would never match normal traffic even though the AD is right.
- D. The mask 0.0.0.0 makes it a default route and the AD of 150 is higher than OSPF's 110, so it stays out of the table while the OSPF default exists and is installed the moment that route is withdrawn.
-
Question 5 of 10Exhibit
R4 receives a packet from a host on 10.4.0.0/24 destined for 172.20.3.9. Based on the exhibit, what does R4 do with the packet?
R4# show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area * - candidate default, U - per-user static route Gateway of last resort is 203.0.113.1 to network 0.0.0.0 S* 0.0.0.0/0 [1/0] via 203.0.113.1 10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks C 10.4.0.0/24 is directly connected, GigabitEthernet0/1 L 10.4.0.1/32 is directly connected, GigabitEthernet0/1 C 10.4.1.0/24 is directly connected, GigabitEthernet0/2 L 10.4.1.1/32 is directly connected, GigabitEthernet0/2 203.0.113.0/24 is variably subnetted, 2 subnets, 2 masks C 203.0.113.0/30 is directly connected, GigabitEthernet0/0 L 203.0.113.2/32 is directly connected, GigabitEthernet0/0- It drops the packet and returns an ICMP destination unreachable, because no entry matches 172.20.3.9.
- It forwards the packet out GigabitEthernet0/0 toward 203.0.113.1 using the static default route.
- It floods the packet out GigabitEthernet0/1 and 0/2, since the destination network is unknown.
- It forwards the packet to 10.4.0.1, the first local address listed in the routing table.
Show the answer
Answer: B
A default route 0.0.0.0/0 matches any destination with zero bits, so it is used only when no longer prefix matches. The S* code means a static route that is also the candidate default, and the line Gateway of last resort confirms it is active. L /32 routes are local addresses, not forwarding paths.
- A. A packet is dropped only when nothing in the table matches it. Here 0.0.0.0/0 matches every destination, so R4 has a route and does not send an unreachable message.
- B. No specific route contains 172.20.3.9, so the lookup falls through to 0.0.0.0/0. The S* line is a static candidate default pointing to 203.0.113.1, which is reachable through the connected 203.0.113.0/30 on GigabitEthernet0/0.
- C. Routers never flood unknown unicast traffic; that is switch behavior for unknown MAC addresses. A router either has a matching route or drops the packet.
- D. L entries with a /32 mask are the router's own interface addresses. They identify traffic addressed to R4 itself and are never used as a next hop for transit traffic.
-
Question 6 of 10Scenario
R1 is configured with ip route 10.50.0.0 255.255.0.0 10.0.12.2, where 10.0.12.2 is R2 on the directly connected link GigabitEthernet0/0 (10.0.12.0/30). A technician shuts down GigabitEthernet0/0 on R1. Afterwards show ip route no longer lists 10.50.0.0/16, although show running-config still contains the command. Which statement explains this?
- The static route was withdrawn because its next hop can no longer be resolved by any route in the table.
- IOS removes a static route from the running configuration as soon as the interface it uses goes down.
- Static routes age out after the holddown timer when the next hop stops responding to ICMP probes.
- The route was replaced by a connected route with a lower administrative distance to the same prefix.
Show the answer
Answer: A
A static route stays in the routing table only while it is resolvable: its exit interface is up, or its next-hop address is reachable through another route. When that condition fails the route is withdrawn, but the command stays in the configuration and the route reappears automatically when the next hop is reachable again.
- A. A next-hop static route is installed only if the router has a route to the next hop (recursive lookup). Shutting GigabitEthernet0/0 removes the connected 10.0.12.0/30, so 10.0.12.2 is unreachable and the static route is pulled from the table. It comes back when the interface comes up.
- B. The running configuration is unchanged, as the technician confirmed; only the routing table entry disappears. IOS never edits your configuration because an interface went down.
- C. Static routes have no timers and IOS does not probe the next hop with ICMP by default. Tracking a next hop with pings requires IP SLA and object tracking, which is not configured here.
- D. The prefix 10.50.0.0/16 is gone from the table, not replaced. Shutting an interface removes connected routes; it cannot create a new one.
-
Question 7 of 10Scenario
A technician configures ip route 172.16.40.0 255.255.255.0 GigabitEthernet0/2 on R1. GigabitEthernet0/2 is an Ethernet link to the provider's router, which has proxy ARP disabled. The route appears in show ip route, but every ping to 172.16.40.0/24 fails and show ip arp on R1 shows Incomplete entries for addresses in 172.16.40.0/24. What resolves the problem?
- Enable ip proxy-arp on GigabitEthernet0/2 of R1 so the ARP requests are answered.
- Lower the administrative distance of the static route so that it is preferred over others.
- Re-enter the static route with the provider router's IP address as the next hop.
- Change the mask to 255.255.0.0 so the route also covers the provider router's address.
Show the answer
Answer: C
An exit-interface-only static route on Ethernet makes the router ARP for every destination in the prefix and depends on the neighbor's proxy ARP. On multi-access links always specify the next-hop address, alone or together with the exit interface, so the router ARPs once for the neighbor.
- A. Proxy ARP on R1 lets R1 answer ARP requests from others; it does nothing for the requests R1 itself sends out GigabitEthernet0/2. The device that would need to answer is the provider router, which has it turned off.
- B. The route is already installed and already chosen, as show ip route confirms. AD only decides between competing routes; it has no effect on how the chosen route is forwarded.
- C. With only an exit interface on Ethernet, R1 treats every 172.16.40.x host as directly connected and ARPs for it; the ARP requests go unanswered, hence the Incomplete entries. A next-hop address makes R1 ARP for the provider router instead, which answers normally.
- D. A wider mask changes which destinations match the route but not how R1 resolves them. It would still ARP for each remote address out the Ethernet interface and still get no reply.
-
Question 8 of 10Exhibit
An engineer added a backup default route on R2 but cannot see it in the routing table. Based on the exhibit, why is the static route missing, and when will it be used?
R2# show running-config | include ip route ip route 0.0.0.0 0.0.0.0 198.51.100.1 150 R2# show ip route | begin Gateway Gateway of last resort is 10.0.23.3 to network 0.0.0.0 O*E2 0.0.0.0/0 [110/1] via 10.0.23.3, 02:11:40, GigabitEthernet0/1 10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks C 10.0.23.0/30 is directly connected, GigabitEthernet0/1 L 10.0.23.2/32 is directly connected, GigabitEthernet0/1 O 10.3.0.0/24 [110/2] via 10.0.23.3, 02:11:40, GigabitEthernet0/1 C 10.5.0.0/24 is directly connected, GigabitEthernet0/0 198.51.100.0/24 is variably subnetted, 2 subnets, 2 masks C 198.51.100.0/30 is directly connected, GigabitEthernet0/2 L 198.51.100.2/32 is directly connected, GigabitEthernet0/2- IOS installs only one default route and always prefers a dynamic one; the static appears only after the OSPF default is removed by hand.
- The static route failed its recursive lookup for 198.51.100.1 and will be installed as soon as that address becomes reachable.
- An AD of 150 marks the route as invalid; it will be installed once the distance is changed to a value lower than 110.
- The OSPF default has the lower AD (110 against 150), so it alone is installed; the static takes over if the OSPF default is withdrawn.
Show the answer
Answer: D
A floating static route is kept out of the routing table on purpose by its higher administrative distance; the configuration still holds it as a candidate. Only the best route per prefix is installed, so the backup appears automatically when the primary route is lost and disappears again when it returns.
- A. IOS has no preference for dynamic routes as such; it compares administrative distance. A static with the default AD of 1 would displace the OSPF default. Nothing needs to be removed by hand; the switch-over is automatic.
- B. 198.51.100.1 is inside the connected 198.51.100.0/30 on GigabitEthernet0/2, so the recursive lookup succeeds. Reachability is not the reason the route is absent.
- C. Any distance from 1 to 254 is valid; only 255 means the route is never installed. 150 is a deliberate choice to keep the route behind OSPF, and lowering it below 110 would make the DSL path the primary one.
- D. Both routes are 0.0.0.0/0, so prefix length ties and AD decides: 110 beats 150, and only the best route for a prefix goes into the table. If the OSPF default disappears, the static at 150 becomes the best candidate and is installed.
-
Question 9 of 10Concept
Which two statements about administrative distance on a Cisco router are true? (Choose two.)
- A directly connected network has an AD of 0 and a static route defaults to an AD of 1.
- RIP's AD of 120 makes it preferred over OSPF at 110 for the same prefix.
- AD is compared before prefix length when the router chooses between routes.
- An eBGP route (AD 20) wins over an EIGRP internal route (AD 90) to the same prefix.
- A static route that points to an exit interface is installed with AD 0 like a connected route.
Show the answer
Answer: A and D
Administrative distance ranks the source of a route, lower being more trusted: connected 0, static 1, eBGP 20, EIGRP 90, OSPF 110, RIP 120, with 255 meaning never installed. It is only applied between routes of equal prefix length, and it does not change with the form of the static route.
- A. Connected routes are the most trusted at 0, and a static route is 1 unless you type a different distance at the end of the ip route command.
- B. Lower AD is more trusted, not higher. With 120 against 110, the OSPF route is installed and the RIP route stays out of the table.
- C. Prefix length comes first; AD only breaks ties between routes of the same length. A static /16 with AD 1 does not beat an OSPF /24 that contains the destination.
- D. 20 is lower than 90, so when eBGP and EIGRP both offer the same prefix the eBGP route is installed. The full order is connected 0, static 1, eBGP 20, EIGRP 90, OSPF 110, RIP 120.
- E. A static route is AD 1 whether it names a next hop or an exit interface. Older IOS printed it as directly connected in show ip route, but the distance shown in brackets is still 1.
-
Question 10 of 10Calculation
Behind R2 there are four LANs: 192.168.16.0/24, 192.168.17.0/24, 192.168.18.0/24 and 192.168.19.0/24. R1 reaches R2 at next hop 10.0.12.2. Which single static route on R1 covers exactly these four networks and nothing else?
- ip route 192.168.16.0 255.255.254.0 10.0.12.2
- ip route 192.168.16.0 255.255.252.0 10.0.12.2
- ip route 192.168.16.0 255.255.248.0 10.0.12.2
- ip route 192.168.0.0 255.255.240.0 10.0.12.2
Show the answer
Answer: B
To summarize contiguous networks, write the first and last third-octet values in binary and keep the bits they share. 16 to 19 share six bits, so the summary is a /22 with mask 255.255.252.0 and block size 4. Check that the summary starts on a multiple of the block size and covers nothing you do not own.
- A. 255.255.254.0 is /23, a block of 2 in the third octet. 192.168.16.0/23 covers only 192.168.16.0 and 192.168.17.0; the 18 and 19 networks would have no route.
- B. 16 is 00010000 and 19 is 00010011 in binary; the first six bits are shared, so the summary is /22 (16 + 6 bits), mask 255.255.252.0. A block of 4 starting at 16 covers exactly 16, 17, 18 and 19.
- C. 255.255.248.0 is /21, a block of 8. 192.168.16.0/21 covers 16 through 23, which includes four networks that are not behind R2 and could blackhole or misroute traffic to them.
- D. 255.255.240.0 is /16 plus 4 bits, a block of 16. 192.168.0.0/20 covers 0 through 15 and does not even contain the four networks that need the route.
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 trial3 days and 100 questions, no card needed.
Common mistakes
- Comparing administrative distance before prefix length, so a static /16 is picked over an OSPF /24 that also contains the destination.
- Treating the OSPF cost or EIGRP metric as comparable across protocols; metrics only break ties between routes learned from the same protocol.
- Writing the mask of an ip route command as a wildcard (0.0.0.255) because that is what the network command under OSPF uses.
- Giving a floating static an AD such as 5 and expecting it to back up an OSPF route; it still beats OSPF at 110 and becomes the active route.
- Pointing a static route at an Ethernet exit interface with no next hop, which makes the router ARP for every remote destination and depend on proxy ARP on the neighbor.
Questions people ask
Should a static route use a next-hop address or an exit interface?
On a point-to-point serial link either form works. On Ethernet and other multi-access links, specify the next-hop IP address (optionally together with the exit interface). An exit-interface-only route on Ethernet forces the router to ARP for every remote destination address and only works if the neighbor answers with proxy ARP, which many devices disable.
What administrative distance should a floating static route use?
Any value higher than the AD of the route it backs up, up to 254. To back up OSPF (110) people commonly use 120 to 200; to back up another static route (1), 5 or 10 is enough. A route with AD 255 is never installed, so do not use it.
Why does a static route disappear from show ip route while it is still in the running configuration?
A static route stays in the table only while it is resolvable: the exit interface must be up, or the next-hop address must be reachable through another route (the recursive lookup). When the interface toward the next hop goes down, the connected route is removed and the static route is withdrawn with it. The configuration is kept and the route returns on its own when the next hop is reachable again.
More CCNA topics
- CCNA Subnetting Practice Questions
- CCNA OSPF Practice Questions: Single-Area OSPFv2
- CCNA VLANs and Trunking: Practice Questions
- CCNA ACL Practice Questions
- CCNA NAT, PAT and Port Forwarding Practice Questions
- CCNA Spanning Tree Protocol: Practice Questions
- CCNA IPv6 Practice Questions: Addressing, EUI-64, SLAAC and NDP
- CCNA EtherChannel: Practice Questions
- CCNA First-Hop Redundancy Practice Questions: HSRP, VRRP and GLBP
- CCNA Wireless Fundamentals Practice Questions
- CCNA IP Services Practice Questions
- CCNA Layer 2 Security Practice Questions
- CCNA Security Fundamentals Practice Questions (200-301)
- CCNA QoS Practice Questions (200-301)
- CCNA Automation and Programmability Practice Questions
- CCNA practice test: all domains
Questions written by CertAce. CertAce is not affiliated with or endorsed by Cisco Systems. CCNA and Cisco are trademarks of Cisco Systems, Inc.