Network Fundamentals

A router has a route for 10.1.0.0/16 via Gi0/0 and a route for 10.1.1.0/24 via Gi0/1. A packet arrives for 10.1.1.5. How does the router forward it?

Show the answer

Correct answerC. Out Gi0/1, because the longest matching prefix is preferred

AWhy not this: Only routes of equal prefix length can load-balance; a more specific route always wins over a less specific one.

BWhy not this: A shorter prefix is less specific, so it loses to a longer match; the router never prefers it for that reason.

CWhy this is right: The /24 is the most specific route covering 10.1.1.5, so the router forwards the packet out the interface it names.

DWhy not this: Overlapping routes of different lengths are normal; the router simply selects the most specific one.

A router selects the route with the longest matching prefix, so the /24 beats the /16 and the packet leaves Gi0/1. Overlapping routes do not conflict, and the router does not prefer the broader route or split traffic across unequal prefix lengths.