I am currently facing a problem and can't get a definitive answer to how the router will decide the correct interface to forward my packet to.
Given that an IP datagram has destination address of 192.168.1.10 and my router has this two following entries:
192.168.1.0/24
192.168.1.16/27
In this case, which entry will be chosen here? I would think that the answer is 192.168.1.16/27 since it has the longest prefix that matches. However, some of my peers suggest it is 192.168.1.0/24 since the interface that contains 192.168.1.16 only accepts IPs that start from 192.168.1.16 so 192.168.1.10 does not exist inside of it.