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?
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.
Why this answer
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.
Exam trap
Always prioritize the longest prefix match over broader subnets or default routes.
Why the other options are wrong
The OSPF route to 10.30.5.0/24 is less specific than the /25 static route, so the router prefers the longest mask.
The default route (0.0.0.0/0) has the shortest prefix length and would be used only if no other route matches.
10.30.5.130 is inside the 10.30.5.128/25 subnet range, meaning a route exists for this destination.