Cisco CCNA (200-301)IP ConnectivityMedium
A router's routing table contains the following entries: 10.1.0.0/16, 10.1.1.0/24, and 10.1.1.128/25, each via a different next hop. A packet arrives destined for 10.1.1.130. Which route will the router use to forward this packet?
- A10.1.1.128/25, because it is the longest (most specific) matching prefix
- B10.1.1.0/24, because it has a lower administrative distance
- CThe router will load-balance across all three routes
- D10.1.0.0/16, because it was learned first
Show answer & explanationAnswer & explanation
Correct answer: A. 10.1.1.128/25, because it is the longest (most specific) matching prefix
10.1.1.130 falls within all three ranges, but routers always use the longest prefix match first, before considering administrative distance. The /25 route (10.1.1.128-10.1.1.255) is the most specific match, so it is used.
Why the other options are wrong
- B. AD is not mentioned here and is only a tiebreaker for equal-length prefixes.
- C. Load balancing only occurs among equal-cost, equal-length routes to the same destination, not different prefix lengths.
- D. Order learned is irrelevant; longest prefix match governs.
Longest Prefix Match
The rule that a router selects the route with the longest (most specific) matching subnet mask when multiple routes match a destination.
- Always evaluated before administrative distance
- More specific /25 beats less specific /24 or /16
- Applies to both IPv4 and IPv6 routing tables
Memory trick: The most precise address wins the forwarding race.