How to determine if two network devices are in the same LAN?
Posted by Alan Huang on 03 January 2012 02:44 PM
Assume that there is a PC A with IP: 192.168.1.10 and subnet mask: 255.255.255.0. PC A wants to connect PC B with IP: 188.8.131.52. Multiply IP of PC A by the 4 digits of subnet mask A (convert 255 as 1). Then multiply the 4 digits of PC B’s IP by the 4 digits of PC A’s subnet mask (convert 255 as 1). If the sum is the same, they are in the same LAN. If not, they aren’t.
IP (PC A): 192.168.1.10 <--192.168.1.10
IP (PC B): 184.108.40.206 <--220.127.116.11
As 192.168.1.0 18.104.22.168, PC A and PC B are not in the same LAN.
PC A with IP: 192.168.1.10 and subnet mask: 255.255.255.0; PC B with IP 192.168.1.39.
IP (PC B): 192.168.1.39 <-- 192.168.1.39
As 192.168.1.0=192.168.1.0, PC A and PC B are in the same LAN.
Applied Models: All NAS series