Exhibit
R1# show run | include ^ip route ip route 198.51.100.0 255.255.255.0 192.0.2.2 R1# show ip route O 198.51.100.64/26 [110/20] via 192.0.2.6, GigabitEthernet0/1 S 198.51.100.0/24 [1/0] via 192.0.2.2 Destination being tested: 198.51.100.70
Based on the exhibit, why is traffic to 198.51.100.64/26 using the OSPF route instead of the static route?
Answer choices
Why each option matters
Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.
Best answer
Because the OSPF /26 route is more specific than the static /24 route.
This is correct because longest-prefix match causes the /26 route to be chosen for 198.51.100.70.
Distractor review
Because OSPF always overrides static routing, regardless of prefix length.
This is wrong because static routes do not automatically lose to OSPF; prefix specificity is the key issue here.
Distractor review
Because the static route must have an administrative distance of 255 to be considered.
This is wrong because the static route is already valid in the table; the problem is that it is less specific.
Distractor review
Because the destination 198.51.100.70 is outside both listed routes.
This is wrong because the destination clearly falls within both the /24 and the /26 prefixes shown.
Common exam trap
Common exam trap: answer the scenario, not the keyword
A frequent exam trap is believing that static routes always take precedence over OSPF routes because static routes have a lower administrative distance. This misconception ignores the fundamental routing principle of longest-prefix match, which prioritizes the most specific subnet mask regardless of route source. Candidates may incorrectly select the static route simply because it is static, missing that the OSPF route’s /26 mask is more specific than the static /24. This leads to incorrect answers and confusion about route selection behavior in Cisco routers.
Technical deep dive
How to think about this question
Routing decisions in Cisco routers rely heavily on the principle of longest-prefix match, which means the router selects the route with the most specific subnet mask that matches the destination IP address. For example, a /26 subnet mask is more specific than a /24 because it covers fewer IP addresses, allowing more precise routing. This specificity ensures traffic is forwarded along the most exact path available, improving routing efficiency and accuracy. When multiple routes to the same destination exist, the router first compares the prefix lengths to determine which route is more specific. Only if two routes have the same prefix length does the router then compare administrative distance values to select the preferred route. Static routes have an administrative distance of 1, while OSPF routes have a default administrative distance of 110. However, this preference is overridden if the prefix lengths differ, as the router always chooses the longest prefix match first. A common exam trap is assuming static routes always override dynamic routes due to their lower administrative distance. In reality, if a dynamic route has a more specific prefix, it will be preferred regardless of administrative distance. This behavior reflects practical network design, where more specific routes provide better path granularity. Understanding this helps network engineers design routing tables that avoid unexpected traffic flows and ensures accurate troubleshooting of routing issues involving overlapping static and OSPF routes.
KKey Concepts to Remember
- A router uses longest-prefix match to select the most specific route for a given destination IP address, preferring routes with longer subnet masks.
- Static routes have a default administrative distance of 1, which is lower than OSPF's default of 110, but prefix specificity takes precedence over administrative distance.
- OSPF advertises routes with specific subnet masks learned dynamically, which can override broader static routes when the destination matches the more specific prefix.
- When multiple routes exist to the same destination, the router first compares prefix length before considering administrative distance or metric.
- A static route with a broader subnet mask (e.g., /24) will be ignored in favor of a dynamic route with a narrower subnet mask (e.g., /26) if the destination IP falls within the narrower range.
- Administrative distance is only used to break ties when two routes have the same prefix length and destination network.
- Routers do not automatically prefer static routes over dynamic routes; route selection depends on prefix specificity and administrative distance in that order.
- Understanding longest-prefix match is critical for troubleshooting routing decisions involving overlapping static and dynamic routes.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Related practice questions
Related 200-301 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
CCNA subnetting practice questions
Practise IPv4 subnetting, CIDR, masks, host ranges and subnet selection.
CCNA OSPF practice questions
Practise OSPF neighbours, router IDs, metrics, areas and routing-table interpretation.
CCNA VLAN practice questions
Practise VLANs, access ports, trunks, allowed VLANs and switching scenarios.
CCNA STP practice questions
Practise spanning tree, root bridge election, port roles and STP troubleshooting.
CCNA EtherChannel practice questions
Practise LACP, PAgP, port-channel behaviour and bundle requirements.
CCNA ACL practice questions
Practise standard and extended ACLs, permit/deny logic and traffic filtering.
CCNA NAT practice questions
Practise static NAT, dynamic NAT, PAT and inside/outside address translation.
CCNA DHCP practice questions
Practise DHCP scopes, relay, leases and troubleshooting.
CCNA show ip route practice questions
Practise routing-table output, longest-prefix match, AD and route selection.
CCNA show interfaces trunk practice questions
Practise trunk verification and VLAN forwarding across switches.
CCNA wireless security practice questions
Practise WLAN security, authentication and wireless architecture concepts.
CCNA IPv6 practice questions
Practise IPv6 addressing, routes, neighbour discovery and common IPv6 exam traps.
More questions from this exam
Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.
Question 1
A router learns the same prefix from both OSPF and EIGRP. Which route is installed by default?
Question 2
A router shows this output: R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.1.1.2 1 FULL/DR 00:00:34 192.168.12.2 GigabitEthernet0/0 10.1.1.3 1 2WAY/DROTHER 00:00:39 192.168.12.3 GigabitEthernet0/0 Which statement is correct?
Question 3
What is the OSPF metric called?
Question 4
A non-root switch has two uplinks toward the root bridge. One path has a lower total STP cost than the other. What role will the lower-cost uplink have?
Question 5
A router interface applies this ACL inbound: 10 deny tcp any any eq 80 20 permit ip any any A user reports that web browsing to a server by IP address fails, but ping works. Which statement best explains the behavior?
Question 6
A router learns route 198.51.100.0/24 from OSPF with AD 110 and also has a static route to the same prefix configured with AD 150. Which route is installed?
FAQ
Questions learners often ask
What does this 200-301 question test?
A router uses longest-prefix match to select the most specific route for a given destination IP address, preferring routes with longer subnet masks.
What is the correct answer to this question?
The correct answer is: Because the OSPF /26 route is more specific than the static /24 route. — The traffic uses the OSPF route because it is the more specific match. In practical terms, the router evaluates destination-prefix specificity before comparing route source preference. The static route points to a broader /24, while the OSPF entry points to a narrower /26 that still contains the destination. Because longest-prefix match comes first, the /26 route wins. This is a good reminder that static routes do not automatically beat dynamic routes when the prefixes are different. Specificity matters first, then source preference only when the prefix length is the same.
What should I do if I get this 200-301 question wrong?
Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.
Discussion
Sign in to join the discussion.