QuestionQ55

VerifiedIP Connectivity

A packet from a company branch office is addressed to host 172.31.0.1 at headquarters. The sending router has three matching entries in its routing table for that packet: 172.31.0.0/16, 172.31.0.0/24, and 172.31.0.0/25.

How does the router forward the packet?

Explanation

IP routers forward packets by using longest-prefix match: when multiple routing-table entries match a destination address, the route with the greatest prefix length is selected because it is the most specific. The destination 172.31.0.1 matches all three listed networks, and 172.31.0.0/25 is the most specific of /16, /24, and /25, so the packet is sent using the /25 route.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!