Courseiva
IP RoutinghardMultiple ChoiceObjective-mapped

CCNA IP Routing Practice Question

Exhibit

R1# show ip route
O    10.30.5.0/24 [110/20] via 192.0.2.2
S    10.30.5.128/25 [1/0] via 192.0.2.6
S*   0.0.0.0/0 [1/0] via 198.51.100.1

Destination being tested: 10.30.5.130

A router has a static route to 10.30.5.128/25, an OSPF route to 10.30.5.0/24, and a default route 0.0.0.0/0 in its routing table. Which route will the router use for destination 10.30.5.130?

⚠ Common exam trap

Always prioritize the longest prefix match over broader subnets or default routes.

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

The static route to 10.30.5.128/25

The router selects the route with the longest prefix match between the destination IP and the prefixes in the routing table. 10.30.5.130 matches both 10.30.5.0/24 (prefix length 24) and 10.30.5.128/25 (prefix length 25); the /25 is more specific and wins. Option D is wrong because 10.30.5.130 falls within the subnet range of 10.30.5.128/25 (hosts .129–.254), so a valid route does exist.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The static route to 10.30.5.128/25

    Why this is correct

    The router will utilise the static route to 10.30.5.128/25 because it adheres to the longest prefix match principle. This rule dictates that when multiple routes match a destination IP address, the router selects the route with the longest subnet mask, representing the most specific network. For 10.30.5.130, the /25 mask is more specific than the OSPF route's /24 mask or the default route's /0 mask, ensuring it is prioritised for forwarding.

  • The OSPF route to 10.30.5.0/24

    Why it's wrong here

    The OSPF route to 10.30.5.0/24, while containing the destination address, is not selected because its prefix length of /24 is shorter than the /25 of the static route. Per the longest prefix match rule, a /24 is less specific than a /25, so the OSPF route loses to the more precise static route for 10.30.5.128/25.

    When this WOULD be correct

    In a scenario where the question asks which route to use for any destination within the 10.30.5.0/24 subnet, and there are no more specific routes defined, the OSPF route to 10.30.5.0/24 would be the correct answer. This could occur in a question focused on routing protocols where no other routes are available.

  • The default route

    Why it's wrong here

    The default route (0.0.0.0/0) is the least specific possible match, with a prefix length of zero. Even though it ultimately contains every destination, the router will only fall back to it when no more specific route exists. Because 10.30.5.130 matches the /24 OSPF route and, more importantly, the /25 static route, the default route is never considered.

    When this WOULD be correct

    If the question specified that the router had no specific routes configured for the destination 10.30.5.130 and only a default route was available, then the correct answer would be the default route. For example, a question could state, 'What route will be used if no specific routes exist for 10.30.5.130?'

  • No route, because the destination is outside all prefixes shown.

    Why it's wrong here

    This is incorrect because 10.30.5.130 definitely falls inside both the 10.30.5.0/24 and 10.30.5.128/25 networks. The /25 range covers 10.30.5.128 through 10.30.5.255, which includes the destination. Therefore, the router has matching routes, so a 'no route' outcome is impossible.

    When this WOULD be correct

    In a different scenario where the routing table does not include any routes that cover the destination IP 10.30.5.130, and the only available routes are for different subnets, this option would be correct. For example, if the routing table only had a route for 10.30.6.0/24 and no other entries, then this option would apply.

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.

The static route to 10.30.5.128/25Correct answer

Why this is correct

The router will utilise the static route to 10.30.5.128/25 because it adheres to the longest prefix match principle. This rule dictates that when multiple routes match a destination IP address, the router selects the route with the longest subnet mask, representing the most specific network. For 10.30.5.130, the /25 mask is more specific than the OSPF route's /24 mask or the default route's /0 mask, ensuring it is prioritised for forwarding.

The OSPF route to 10.30.5.0/24Wrong answer — click to see why

Why this is wrong here

This option is wrong because the OSPF route to 10.30.5.0/24 does not match the specific destination of 10.30.5.130, which falls within the subnet of the static route 10.30.5.128/25. The static route has a more specific prefix length, making it the preferred route.

★ When this WOULD be the correct answer

In a scenario where the question asks which route to use for any destination within the 10.30.5.0/24 subnet, and there are no more specific routes defined, the OSPF route to 10.30.5.0/24 would be the correct answer. This could occur in a question focused on routing protocols where no other routes are available.

Why candidates choose this

Candidates may choose this option due to familiarity with OSPF as a dynamic routing protocol, leading them to assume it would be preferred over static routes, especially if they misinterpret the specificity of the destination address.

The default routeWrong answer — click to see why

Why this is wrong here

The default route is used when no other specific routes match the destination. In this case, the static route to 10.30.5.128/25 is a more specific match for the destination 10.30.5.130, making the default route irrelevant.

★ When this WOULD be the correct answer

If the question specified that the router had no specific routes configured for the destination 10.30.5.130 and only a default route was available, then the correct answer would be the default route. For example, a question could state, 'What route will be used if no specific routes exist for 10.30.5.130?'

Why candidates choose this

Candidates may choose this option because they might assume that a default route is always a fallback option, especially if they are not fully aware of the routing table's specifics and the importance of route specificity.

No route, because the destination is outside all prefixes shown.Wrong answer — click to see why

Why this is wrong here

This option is wrong because the destination 10.30.5.130 falls within the range of the static route 10.30.5.128/25, making it reachable through that route. The statement that the destination is outside all prefixes shown is incorrect in this context.

★ When this WOULD be the correct answer

In a different scenario where the routing table does not include any routes that cover the destination IP 10.30.5.130, and the only available routes are for different subnets, this option would be correct. For example, if the routing table only had a route for 10.30.6.0/24 and no other entries, then this option would apply.

Why candidates choose this

Candidates may choose this option due to a misunderstanding of how subnetting works, leading them to incorrectly assume that if a specific route is not explicitly listed, the destination must be unreachable. This reflects a common confusion between available routes and the actual reachability of an IP address.

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

This 200-301 question is part of Courseiva's 1,389-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.