Simply put, when sending IP packets, you can compare your IP address with the destination IP address (after ANDing the mask to both addresses) to see whether you can send packets directly to the destination Ethernet address, or whether you need to send it to the Gateway/Router's Ethernet address instead.
IP addresses by themselves don't give you enough information to get the packet to the destination. You have to know which Ethernet address to send the packet to, as well.
At least, this is my understanding.
In reality, you may be able to send ALL IP packets to the Gateway/Router, regardless of whether the destination is on the same network or not. However, I'm not entirely sure if this a) will work in all cases, b) is terribly inefficient, and/or c) is frowned upon. Feel free to chime in if you happen to know the answer...
_________________ Project: OZone Source: GitHub Current Task: LIB/OBJ file support "The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
|