R1 has the following routes installed: O 10.10.10.0/24 via 192.0.2.2 S 10.10.10.128/25 via 198.51.100.2 S* 0.0.0.0/0 via 203.0.113.1 A packet destined for 10.10.10.200 arrives at R1. Which route is used?
Routers prioritise routes based on the longest prefix match principle. For the destination 10.10.10.200, all three listed routes are potential matches. However, the static route to 10.10.10.128/25 offers a 25-bit prefix, which is longer and therefore more specific than the 24-bit prefix of 10.10.10.0/24 or the 0-bit prefix of the default route. This ensures the packet is forwarded via 198.51.100.2, satisfying the requirement for the most precise route.
Why this answer
Routers forward using longest prefix match first. Even though the OSPF /24 exists, the static /25 is more specific and covers 10.10.10.200, so the packet is sent via 198.51.100.2. The default route is used only when nothing more specific matches.
Exam trap
A common exam trap is assuming that the router will always prefer OSPF routes over static routes because OSPF is a dynamic routing protocol. Candidates may also mistakenly believe that overlapping routes are invalid or cause routing conflicts. In reality, Cisco routers allow overlapping routes and use the longest prefix match rule first, regardless of the routing protocol or administrative distance.
This leads to confusion when a static route with a longer prefix exists alongside an OSPF route with a shorter prefix. Misunderstanding this can cause incorrect answers about which route will be used for forwarding packets.
Why the other options are wrong
The OSPF route to 10.10.10.0/24 matches the destination IP but has a shorter prefix length (/24) than the static route (/25). Since longest prefix match is the primary rule, this route is not used.
The default route 0.0.0.0/0 is the least specific and is only used when no other route matches the destination IP. Since more specific routes exist, the default route is not selected.
It is incorrect that packets are dropped due to overlapping routes. Cisco routers allow overlapping static and OSPF routes and forward packets based on the most specific prefix match, so the packet is not dropped.
When would these options actually be correct?
If the question stated that the packet was destined for an IP address within the 10.10.10.0/24 subnet, such as 10.10.10.50, then the OSPF route would be the correct answer as it matches the destination IP.
This option would be correct if the question specified that there were no more specific routes available for the destination address, making the default route the only viable option for routing the packet.
In a scenario where the question specifies that OSPF routes are configured to prevent overlapping with static routes, and the routing table is set to drop packets if such overlap occurs, this option would be correct.
Why candidates pick the wrong answer
Students may think that OSPF routes are preferred over static routes due to administrative distance, but in this case the static route has a longer prefix, which takes precedence regardless of routing protocol.
Students may assume that a default route is always used as a last resort, but they forget that the longest prefix match rule overrides the default route when a more specific match exists.
Some students might think that overlapping routes cause conflicts or errors, but routers handle overlapping prefixes by using the longest prefix match. The statement about OSPF and static routes being incompatible is incorrect.