A router has route entries for 172.31.0.0/16, 172.31.0.0/24, and 172.31.0.0/25. A packet to 172.31.0.1 arrives—which route is chosen?
Choose an answer
Tap an option to check your answer.
Correct answer: It sends the traffic via prefix 172.31.0.0/25..
Why this is the answer
Routers use the longest prefix match rule to determine the best path for a packet. This means the route with the most specific match (the highest subnet mask value) to the destination IP address is preferred. For the destination 172.31.0.1, all three listed routes match. However, 172.31.0.0/25 has a /25 subnet mask, which is more specific than /24 or /16. Therefore, the router will choose the 172.31.0.0/25 route. The default gateway (0.0.0.0/0) is only used when no more specific route exists.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed