Let's say I have a router with three interfaces.

Interface #1 is 10.x.x.x /8

Interface #2 is 142.100.48.x /20

Interface #3 is /21

I'm trying to send a file to [dest] from [src]

When the router receives my first packet it will look at the destination address and compare to it's routing table then send it out to the correct network. However, in this situation Interface #2 and #3 are very similar and the destination address could be for either network.

So typically, how will the router deal with this? Will it go down the table matching the most network bits and select the winning route based on that or will it send it out on the first one that passes?


Since both #2 and #3 match, your router will use the longest prefix match, so it'll pick #3 since it has a 'longer' mask (closer, more specific match).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.