Courseiva
IP RoutinghardMultiple ChoiceObjective-mapped

CCNA IP Routing Practice Question

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?

⚠ Common exam trap

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.

Answer choices

Why each option matters

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.

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

    For the destination 172.16.10.130, both 172.16.10.0/24 and 172.16.10.128/25 are candidates, but the /25 has a longer prefix length and therefore provides a more specific match. The router's forwarding logic selects the route with the longest matching prefix, so the static /25 route is installed in the CEF table for that destination. The OSPF /24 route remains in the routing table for other addresses in the /24 that are not covered by the /25.

  • Because static routes always beat OSPF even when they are less specific.

    Why it's wrong here

    Static routes do not automatically outrank OSPF in every scenario; the routing table lookup prefers the longest prefix match before comparing route source. If a static route is less specific (e.g., a default or a shorter prefix), OSPF's more specific route will be used for that destination. In this case, the static /25 is actually more specific than OSPF's /24, so that specificity, not the static route's source, is the decisive factor.

    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

    OSPF is a classless routing protocol that carries prefix lengths in its Link-State Advertisements, so it can advertise and route to any network, including the Class B address space 172.16.0.0/16 or subnets thereof. The forwarding decision for 172.16.10.130 is not restricted by address class; it is determined solely by the longest matching prefix in the routing table.

    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

    The statement confuses administrative distance with routing protocol metric. For the same prefix, a router compares administrative distance, and static (typically AD 1) beats OSPF (AD 110), but when prefixes differ, the router first applies longest-prefix match. The OSPF metric is irrelevant because the /25 static route is more specific, so it wins regardless of the OSPF cost to the /24.

    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

For the destination 172.16.10.130, both 172.16.10.0/24 and 172.16.10.128/25 are candidates, but the /25 has a longer prefix length and therefore provides a more specific match. The router's forwarding logic selects the route with the longest matching prefix, so the static /25 route is installed in the CEF table for that destination. The OSPF /24 route remains in the routing table for other addresses in the /24 that are not covered by the /25.

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?”

Visual reference

R1 R2 R3 R4 10 100 10 100 OSPF picks R1→R2→R4 (cost 20) over R1→R3→R4 (cost 200)

Quick reference

Routing Protocol Comparison

ProtocolMetricMax HopsAlgorithmType
RIP v2Hop count15Bellman-FordDistance vector
OSPFCost (bandwidth)UnlimitedDijkstra (SPF)Link state
EIGRPComposite metricUnlimitedDUALHybrid
IS-ISCostUnlimitedDijkstraLink state
BGPPolicy / attributesUnlimitedPath vectorPath vector

RIP's 15-hop limit makes it unsuitable for large networks. OSPF and EIGRP dominate modern enterprise deployments.

About these practice questions

One of 1,389 original 200-301 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.