IP Connectivity
A router learns 172.16.0.0/16 via OSPF with metric 20 and 172.16.8.0/21 via EIGRP, and also has a static default route. A packet arrives for 172.16.12.5. Which route does the router use?
Show the answer
Correct answerB. The EIGRP route to 172.16.8.0/21
AWhy not this: The default route is the least specific match and is used only when nothing else matches.
BWhy this is right: The /21 spans 172.16.8.0-172.16.15.255, includes the destination, and has the longest matching prefix.
CWhy not this: Routes from different protocols coexist in the table, and the longest match is chosen among all of them.
DWhy not this: The /16 matches but is shorter than the /21, so the more specific route overrides it.
The 172.16.8.0/21 route covers 172.16.8.0 to 172.16.15.255, so it matches 172.16.12.5 and is longer than the /16. The OSPF route also matches but is less specific; its lower metric is not considered.