The static route is chosen because the longest prefix match rule dictates that the router always prefers the most specific route, and the /25 mask is more specific than the /24. When forwarding traffic to 172.16.10.130, the destination falls within both the 172.16.10.128/25 and 172.16.10.0/24 networks, but the /25 route has a longer prefix length, meaning it matches a smaller, more precise range of addresses. This concept is a cornerstone of the CCNA 200-301 v2 exam, where it tests your ability to prioritize route selection before considering administrative distance or metric—a common trap is to assume OSPF is always preferred over a static route. Remember, specificity always wins first; the router does not care about the route source until after the longest match is found. A helpful memory tip is "longer is stronger"—the longer the subnet mask, the stronger the match.
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: cisco routers select the route with the longest prefix match as the primary routing path for a given destination IP address.. 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 ip route
O 172.16.10.0/24 [110/20] via 192.0.2.10
S 172.16.10.128/25 [1/0] via 192.0.2.6
Destination being tested: 172.16.10.130
A router has a static route for 172.16.10.128/25 and an OSPF-learned route for 172.16.10.0/24. When forwarding traffic to 172.16.10.130, why does the router use the static route instead of the OSPF route?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Because the static /25 route is more specific than the OSPF /24 route.
The static route is used because it is the more specific match. In practical terms, route selection starts with prefix specificity. The destination 172.16.10.130 matches both routes shown, but the static /25 is more specific than the OSPF /24. Because longest-prefix match comes first, the static route is chosen regardless of the different route sources.
This is a classic route-selection interpretation question that tests whether you prioritize specificity correctly.
Key principle: Cisco routers select the route with the longest prefix match as the primary routing path for a given destination IP address.
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 static /25 route is more specific than the OSPF /24 route.
Why this is correct
This is correct because longest-prefix match selects the /25 for 172.16.10.130.
Related concept
Cisco routers select the route with the longest prefix match as the primary routing path for a given destination IP address.
✗
Because static routes always beat OSPF even when they are less specific.
Why it's wrong here
This is wrong because specificity comes before source preference.
When this WOULD be correct
In a different scenario, if the question stated that a static route with a less specific prefix length was configured with a lower administrative distance than the OSPF routes, then this option could be correct. For example, if a static route had an administrative distance of 110 and OSPF had 120, the static route would be preferred despite being less specific.
✗
Because OSPF routes cannot be used for Class B networks.
Why it's wrong here
This is wrong because OSPF can absolutely carry those routes.
When this WOULD be correct
In a different scenario, if the question stated that OSPF was configured only for Class A networks and the static route was for a Class B network, this option could be correct. For example, if the question asked why OSPF was not being used for a Class B network, this option would apply.
✗
Because the OSPF metric is lower than the static administrative distance.
Why it's wrong here
This is wrong because the decisive factor here is prefix length, not that comparison.
When this WOULD be correct
In a different scenario where the question asks about route selection based on administrative distance alone, if the OSPF route had a higher administrative distance than the static route, this option would be correct. For example, if the static route had an administrative distance of 1 and OSPF had 110, then the static route would be preferred.
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 static /25 route is more specific than the OSPF /24 route.Correct answer▾
Why this is correct
This is correct because longest-prefix match selects the /25 for 172.16.10.130.
✗Because static routes always beat OSPF even when they are less specific.Wrong answer — click to see why▾
Why this is wrong here
This statement is false because static routes do not always beat OSPF; the administrative distance of a static route (default 1) is lower than OSPF (default 110), but prefix length takes precedence over administrative distance. A less specific static route would not be chosen over a more specific OSPF route.
★ When this WOULD be the correct answer
In a different scenario, if the question stated that a static route with a less specific prefix length was configured with a lower administrative distance than the OSPF routes, then this option could be correct. For example, if a static route had an administrative distance of 110 and OSPF had 120, the static route would be preferred despite being less specific.
Why candidates choose this
Students often confuse the order of route selection criteria, thinking that administrative distance is the primary factor. They may recall that static routes have a lower AD than OSPF and incorrectly assume that static routes are always preferred, ignoring the longest-prefix match rule.
✗Because OSPF routes cannot be used for Class B networks.Wrong answer — click to see why▾
Why this is wrong here
OSPF is a classless routing protocol that supports Variable-Length Subnet Masking (VLSM) and can carry routes for any network, including Class B networks. There is no restriction that prevents OSPF from advertising or using routes for Class B addresses.
★ When this WOULD be the correct answer
In a different scenario, if the question stated that OSPF was configured only for Class A networks and the static route was for a Class B network, this option could be correct. For example, if the question asked why OSPF was not being used for a Class B network, this option would apply.
Why candidates choose this
Some test-takers may confuse OSPF with older classful routing protocols like RIPv1, which do not support VLSM. They might incorrectly assume that OSPF cannot handle Class B networks due to a misunderstanding of classful vs. classless routing.
✗Because the OSPF metric is lower than the static administrative distance.Wrong answer — click to see why▾
Why this is wrong here
The decisive factor in this scenario is the prefix length (longest match), not the comparison between OSPF metric and static administrative distance. Even if the OSPF metric were lower, the static route with a longer prefix would still be preferred because prefix length is evaluated first.
★ When this WOULD be the correct answer
In a different scenario where the question asks about route selection based on administrative distance alone, if the OSPF route had a higher administrative distance than the static route, this option would be correct. For example, if the static route had an administrative distance of 1 and OSPF had 110, then the static route would be preferred.
Why candidates choose this
Students may think that a lower metric (or administrative distance) always determines the best route. They might compare the OSPF metric (cost) to the static route's administrative distance, not realizing that these values are not directly comparable and that prefix length overrides both.
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 common exam trap is to incorrectly assume that static routes always override OSPF routes due to their lower administrative distance, regardless of prefix length. Candidates might also believe that OSPF cannot handle Class B networks or that metrics alone determine route selection. The trap lies in ignoring the fundamental routing principle of longest-prefix match, which Cisco routers apply before considering administrative distance or metric. This misunderstanding leads to incorrect answers and confusion about route selection behavior in Cisco routing tables.
Detailed technical explanation
How to think about this question
Routing decisions in Cisco networks rely heavily on the concept of longest-prefix match, where the router selects the route with the most specific subnet mask that matches the destination IP address. In this scenario, two routes exist for the destination 172.16.10.130: a static route with a /25 subnet mask and an OSPF-learned route with a /24 subnet mask. Since /25 (255.255.255.128) is more specific than /24 (255.255.255.0), the static route covers a smaller range of IP addresses and thus is preferred for routing traffic to that IP.
When multiple routes to the same destination exist, Cisco routers first evaluate the prefix length to determine the most specific match. Only after prefix length does the router consider administrative distance or metric values. In this case, although OSPF routes typically have a lower administrative distance (110) compared to static routes (usually 1 if configured with no distance override), the static route’s longer prefix length takes precedence. This longest-prefix match rule ensures precise routing and optimal path selection.
A common exam trap is to assume that administrative distance or routing protocol preference always determines route selection. However, Cisco routers prioritize prefix specificity before administrative distance. This means a less preferred routing protocol’s route can be chosen if it has a more specific subnet mask. Practically, this behavior allows network engineers to override dynamic routing with static routes for specific subnets by using more specific masks, providing granular control over traffic flow.
KKey Concepts to Remember
Cisco routers select the route with the longest prefix match as the primary routing path for a given destination IP address.
A static route with a more specific subnet mask (/25) is preferred over a dynamic OSPF route with a less specific subnet mask (/24) regardless of administrative distance.
Administrative distance is considered only after the router identifies routes with the same prefix length to the destination network.
OSPF routes have a default administrative distance of 110, while static routes typically have an administrative distance of 1 unless manually changed.
Longest-prefix match ensures that traffic is routed through the most precise path available, improving routing accuracy and efficiency.
Static routes can be used to override dynamic routing protocols for specific subnets by configuring more specific subnet masks.
Cisco routing decisions do not prioritize routing protocol preference over prefix specificity, preventing less specific routes from overriding more specific ones.
Understanding prefix length and longest-prefix match is critical for troubleshooting routing issues and designing effective routing policies in Cisco networks.
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
Cisco routers select the route with the longest prefix match as the primary routing path for a given destination IP address.
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 cisco routers select the route with the longest prefix match as the primary routing path for a given destination IP address., then practise related 200-301 questions on the same topic to reinforce the concept.
IP Routing — This question tests IP Routing — Cisco routers select the route with the longest prefix match as the primary routing path for a given destination IP address..
What is the correct answer to this question?
The correct answer is: Because the static /25 route is more specific than the OSPF /24 route. — The static route is used because it is the more specific match. In practical terms, route selection starts with prefix specificity. The destination 172.16.10.130 matches both routes shown, but the static /25 is more specific than the OSPF /24. Because longest-prefix match comes first, the static route is chosen regardless of the different route sources.
This is a classic route-selection interpretation question that tests whether you prioritize specificity correctly.
What should I do if I get this 200-301 question wrong?
Review cisco routers select the route with the longest prefix match as the primary routing path for a given destination IP address., then practise related 200-301 questions on the same topic to reinforce the concept.
What is the key concept behind this question?
Cisco routers select the route with the longest prefix match as the primary routing path for a given destination IP address.
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. Exhibit: A router has the following routes in its routing table:
- OSPF: 10.1.1.0/24
- Static: 10.1.1.128/25
- Default: 0.0.0.0/0
A packet is destined for 10.1.1.130. Which route does the router use?
hard
A.The OSPF 10.1.1.0/24 route
✓ B.The static 10.1.1.128/25 route
C.The default route
D.The router load-balances across all three
Why B: Routers use longest-prefix match before they think about metrics. The /25 route for 10.1.1.128/25 is more specific than the /24 or the default route, so traffic for 10.1.1.130 follows that path.
Variation 2. A router has the following routes in its routing table: a static route to 10.60.4.16/28, an OSPF route to 10.60.4.0/24, and an EIGRP route to 10.60.0.0/16. Which route will be used for a packet destined to 10.60.4.17?
hard
✓ A.The static route to 10.60.4.16/28
B.The OSPF route to 10.60.4.0/24
C.The EIGRP route to 10.60.0.0/16
D.No route at all
Why A: The route used will be the route with the longest matching prefix. In practical terms, 10.60.4.17 falls inside the /28 route shown, and that is more specific than the broader /24 and /16 alternatives. Because specificity comes first, the /28 route wins.
This is a clean route-table interpretation problem that mirrors actual exam-style thinking very closely.
Variation 3. A router has the following routes in its table: 172.16.0.0/16, 172.16.20.0/24, and 172.16.20.128/25. Which route is used for traffic to 172.16.20.200?
hard
A.172.16.0.0/16
B.172.16.20.0/24
✓ C.172.16.20.128/25
D.The default route
Why C: The /25 route is used because it is the most specific match. In plain language, the router looks for the narrowest route that still contains the destination address. Since 172.16.20.200 falls inside 172.16.20.128/25, that route wins over the broader /24 and /16 entries.
This is a direct longest-prefix-match question. It is meant to reinforce that specificity comes first in routing-table lookup. Broader routes remain useful, but they are not chosen when a more precise matching entry exists.
Variation 4. A router learns 172.16.0.0/16 from OSPF and 172.16.10.0/24 from a static route. Which route is used for traffic to 172.16.10.55?
hard
A.The OSPF /16 route
✓ B.The static /24 route
C.The default route
D.Neither route because the prefixes overlap
Why B: The static /24 route is used because it is more specific than the OSPF /16 route. In plain language, even though OSPF is a dynamic source and the /16 covers the destination broadly, the router prefers the entry that describes the exact destination range more precisely. Since 172.16.10.55 falls within 172.16.10.0/24, that route wins under longest-prefix match.
This is a classic example of route specificity taking priority before broader route-source comparisons would matter between equal prefix lengths.
Variation 5. A router learns 10.0.0.0/8 from OSPF and 10.10.0.0/16 from a static route. Which route is used for traffic to 10.10.20.1?
hard
A.The OSPF 10.0.0.0/8 route
✓ B.The static 10.10.0.0/16 route
C.The default route if present
D.Neither route, because the networks overlap
Why B: The static /16 route is used because it is more specific than the OSPF /8 route. In practical terms, even though both routes match the destination, the router chooses the one that narrows the destination range more precisely. Since 10.10.20.1 belongs to 10.10.0.0/16, that entry wins.
This question reinforces that longest-prefix match comes first. The broader OSPF route still matters for other destinations inside 10.0.0.0/8, but not for this one.
Variation 6. A router learns 203.0.113.0/24 through OSPF and 203.0.113.0/25 through a static route. Which route is used for traffic destined to 203.0.113.10?
medium
A.The OSPF /24 route
✓ B.The static /25 route
C.Both routes equally
D.Neither route because the prefixes overlap
Why B: Routers prefer the most specific matching route first. The /25 route is more specific than the /24 and includes 203.0.113.10.
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.