The OSPF route is used because the longest prefix match overrides administrative distance in the route selection process. Even though the static route has a lower administrative distance and is generally preferred over OSPF, the router first evaluates the specificity of the destination prefix. The OSPF /26 entry provides a more precise match for the host 198.51.100.70 than the static /24 route, so it wins regardless of the route source. On the CCNA 200-301 v2 exam, this concept tests your understanding that prefix length is always checked before administrative distance—a common trap is assuming static routes always beat dynamic ones. Remember: the router cares about the mask first, not the source. A useful memory tip is “longer mask, faster pass”—the more specific the prefix, the higher the priority, no matter how trustworthy the route type seems.
CCNA IP Routing Practice Question
This 200-301 practice question tests your understanding of ip routing. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. A key principle to apply: a router uses longest-prefix match to select the most specific route for a given destination IP address, preferring routes with longer subnet masks.. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
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 host 198.51.100.70 using the OSPF route instead of the static route?
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
A
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.
B
Because OSPF always overrides static routing, regardless of prefix length.
Why wrong: This is wrong because static routes do not automatically lose to OSPF; prefix specificity is the key issue here.
C
Because the static route must have an administrative distance of 255 to be considered.
Why wrong: This is wrong because the static route is already valid in the table; the problem is that it is less specific.
D
Because the destination 198.51.100.70 is outside both listed routes.
Why wrong: This is wrong because the destination clearly falls within both the /24 and the /26 prefixes shown.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
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.
Key principle: A router uses longest-prefix match to select the most specific route for a given destination IP address, preferring routes with longer subnet masks.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✓
Because the OSPF /26 route is more specific than the static /24 route.
Why this is correct
This is correct because longest-prefix match causes the /26 route to be chosen for 198.51.100.70.
Related concept
A router uses longest-prefix match to select the most specific route for a given destination IP address, preferring routes with longer subnet masks.
✗
Because OSPF always overrides static routing, regardless of prefix length.
Why it's wrong here
This is wrong because static routes do not automatically lose to OSPF; prefix specificity is the key issue here.
When this WOULD be correct
In a different exam scenario where the question states that OSPF routes are configured with a higher administrative distance than static routes, this option would be correct. For example, if the static route had an administrative distance of 1 and the OSPF route had an administrative distance of 110, OSPF would not override the static route.
✗
Because the static route must have an administrative distance of 255 to be considered.
Why it's wrong here
This is wrong because the static route is already valid in the table; the problem is that it is less specific.
When this WOULD be correct
In a different scenario where the question specifies that a static route has been configured with an administrative distance of 255, the option could be correct if the question asks why the static route is not being used at all, as it would be ignored due to its unreachable status.
✗
Because the destination 198.51.100.70 is outside both listed routes.
Why it's wrong here
This is wrong because the destination clearly falls within both the /24 and the /26 prefixes shown.
When this WOULD be correct
In a different question setup where the static route is defined as 198.51.100.0/24 and the OSPF route is not configured correctly, leading to a scenario where the destination is indeed outside the defined routes, this option could be correct. For example, if the static route was incorrectly configured to point to a different subnet entirely.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The 200-301 exam frequently reuses these exact scenarios with slightly different constraints.
✓Because the OSPF /26 route is more specific than the static /24 route.Correct answer▾
Why this is correct
This is correct because longest-prefix match causes the /26 route to be chosen for 198.51.100.70.
✗Because OSPF always overrides static routing, regardless of prefix length.Wrong answer — click to see why▾
Why this is wrong here
OSPF does not always override static routing; the decision is based on administrative distance and prefix length. Static routes typically have a lower administrative distance (1) than OSPF (110), so they are preferred unless a more specific route exists. In this case, the OSPF route is chosen because it is more specific, not because OSPF inherently overrides static routes.
★ When this WOULD be the correct answer
In a different exam scenario where the question states that OSPF routes are configured with a higher administrative distance than static routes, this option would be correct. For example, if the static route had an administrative distance of 1 and the OSPF route had an administrative distance of 110, OSPF would not override the static route.
Why candidates choose this
Students may confuse the concept of administrative distance with route selection priority, thinking that a dynamic protocol like OSPF always takes precedence over static routes. However, static routes usually have a lower AD and are preferred unless overridden by a longer prefix match.
✗Because the static route must have an administrative distance of 255 to be considered.Wrong answer — click to see why▾
Why this is wrong here
The static route does not need an administrative distance of 255 to be considered; an AD of 255 means the route is not considered reliable and is not installed in the routing table. The static route in the exhibit is already in the routing table (as indicated by 'S*'), so its AD is not 255. The issue is that the OSPF route has a longer prefix length, not that the static route has a high AD.
★ When this WOULD be the correct answer
In a different scenario where the question specifies that a static route has been configured with an administrative distance of 255, the option could be correct if the question asks why the static route is not being used at all, as it would be ignored due to its unreachable status.
Why candidates choose this
Test-takers might think that a static route must have a specific AD to be considered, or they may confuse the concept of administrative distance with prefix length. They might also recall that routes with AD 255 are not installed, but that is not the case here.
✗Because the destination 198.51.100.70 is outside both listed routes.Wrong answer — click to see why▾
Why this is wrong here
The destination 198.51.100.70 is within both the /24 and /26 prefixes. The /24 prefix covers 198.51.100.0–198.51.100.255, and the /26 prefix covers 198.51.100.64–198.51.100.127. Since 198.51.100.70 falls in the /26 range, it is inside both routes, so this statement is factually incorrect.
★ When this WOULD be the correct answer
In a different question setup where the static route is defined as 198.51.100.0/24 and the OSPF route is not configured correctly, leading to a scenario where the destination is indeed outside the defined routes, this option could be correct. For example, if the static route was incorrectly configured to point to a different subnet entirely.
Why candidates choose this
A student might misread the exhibit or incorrectly calculate the subnet ranges, thinking that 198.51.100.70 is outside the /26 range. They might also confuse the destination IP with the network address or broadcast address, leading to the mistaken belief that it is not covered.
Analysis generated from the official 200-301blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Common exam traps
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.
Trap categories for this question
Command / output trap
This is wrong because the destination clearly falls within both the /24 and the /26 prefixes shown.
Detailed technical explanation
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.
Key takeaway
A router uses longest-prefix match to select the most specific route for a given destination IP address, preferring routes with longer subnet masks.
Real-world example
How this comes up in practice
A network engineer at a university connects two campus buildings via a fibre link. Both routers run OSPF, but no adjacency forms — even though both routers can ping each other. The engineer finds one router is in area 0 and the other in area 1. OSPF adjacency requires matching area numbers, hello/dead timers, and network type. IP reachability alone is not enough.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this 200-301 question in full detail.
Review a router uses longest-prefix match to select the most specific route for a given destination IP address, preferring routes with longer subnet masks., then practise related 200-301 questions on the same topic to reinforce the concept.
IP Routing — This question tests IP Routing — 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?
Review a router uses longest-prefix match to select the most specific route for a given destination IP address, preferring routes with longer subnet masks., then practise related 200-301 questions on the same topic to reinforce the concept.
What is the key concept behind this question?
A router uses longest-prefix match to select the most specific route for a given destination IP address, preferring routes with longer subnet masks.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Based on the exhibit, why is the static route not being used for 172.18.9.10?
hard
✓ A.Because the connected /24 route is more specific than the static /16 route.
B.Because static routes are never used when a connected network exists anywhere in the table.
C.Because connected routes always have administrative distance 255.
D.Because static routes work only for default routing.
Why A: The static route is not being used because the connected route is the more specific match. In practical terms, route selection starts with prefix specificity. The static route covers a broad /16, but the destination 172.18.9.10 also falls inside a connected /24. The /24 wins because it is more specific.
This is a classic routing interpretation question because it tests whether you apply longest-prefix logic before thinking about route source preference.
Variation 2. Based on the exhibit, which route will be used for destination 10.1.1.70?
hard
✓ A.The static route to 10.1.1.64/26
B.The OSPF route to 10.1.1.0/24
C.The OSPF route to 10.1.0.0/16
D.The default route
Why A: The route used will be the one with the longest matching prefix. In practical terms, 10.1.1.70 falls inside 10.1.1.64/26, and that prefix is more specific than both 10.1.1.0/24 and 10.1.0.0/16. Route selection begins with specificity, so the /26 route wins regardless of the broader alternatives.
This is a clean simulation-style routing-table interpretation question and very close to real exam thinking.
Variation 3. Based on the exhibit, which route will be used for destination 192.168.10.130?
hard
✓ A.The static route to 192.168.10.128/25
B.The OSPF route to 192.168.10.0/24
C.The default route
D.No route at all
Why A: The route used will be the one with the longest matching prefix. In practical terms, 192.168.10.130 matches both the /24 and the /25 prefixes shown, but the /25 is more specific. Because longest-prefix match comes first, the router uses the /25 route even though other matching routes are present.
This is a clean route-table interpretation question that is very close to real exam reasoning.
Variation 4. Based on the exhibit, which route will be used to reach 172.20.10.33?
hard
✓ A.The static route to 172.20.10.32/27
B.The OSPF route to 172.20.10.0/24
C.The default route
D.No route, because the destination does not match any prefix.
Why A: The route used will be the one with the longest matching prefix. In practical terms, 172.20.10.33 matches both the /24 and the /27 shown, but the /27 is more specific. That means the router selects the /27 route before considering the broader /24 or any default route.
This is exactly the kind of route-table interpretation the CCNA exam likes because it rewards precise thinking about prefix boundaries.
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This 200-301 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-301 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.