With every packet that is sent across a network, the big question is: Is the destination address local or remote? The destination is local if the network portion of the source's IP address is the same as that of the destination's IP address.
If any bits of the network portions differ from each other, then the destination is remote. This is similar to figuring out whether someone lives on the same street as you do. If you look at the person's street name and it is the same as yours, the person lives on the same street as you do. If any part of the street name is different, the person is remote to your street. But, as stated earlier, before IP can figure out whether the destination address is remote, IP has to determine how many bits are in the network portion of the source IP address. IP uses the subnet mask to determine which bits of the IP address represent the network portion of the address.
Read more »
If any bits of the network portions differ from each other, then the destination is remote. This is similar to figuring out whether someone lives on the same street as you do. If you look at the person's street name and it is the same as yours, the person lives on the same street as you do. If any part of the street name is different, the person is remote to your street. But, as stated earlier, before IP can figure out whether the destination address is remote, IP has to determine how many bits are in the network portion of the source IP address. IP uses the subnet mask to determine which bits of the IP address represent the network portion of the address.