Knowledgebase: NAS - English
How to determine if two network devices are in the same LAN?
Posted by Alan Huang on 03 January 2012 02:44 PM

Example 1.

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: 192.123.2.3. 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
Subnet mask (PC A): 255.255.255.0 <--1.1.1.0
Result: 192.168.1.0

IP (PC B): 192.123.2.3 <--192.123.2.3
Subnet mask (PC A): 255.255.255.0 <--1.1.1.0
Result: 192.123.2.0

As 192.168.1.0 192.124.2.0, PC A and PC B are not in the same LAN.

Example 2.

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 A): 192.168.1.10 <-- 192.168.1.10
SM (PC A): 255.255.255.0 <-- 1.1.1.0
Result: 192.168.1.0

IP (PC B): 192.168.1.39 <-- 192.168.1.39
SM (PC A): 255.255.255.0 <-- 1.1.1.0
Result: 192.168.1.0

As 192.168.1.0=192.168.1.0, PC A and PC B are in the same LAN.

 

Applied Models: All NAS series

 

(6 vote(s))
Helpful
Not helpful

Comments (1)
Marco
03 May 2012 12:03 PM
We can change Ip adedsrs using command line netsh is the command for that. Find the usage in below command. We used following details in exampleIP adedsrs : 192.168.1.50Subnet Mask : 255.255.255.0Default Gateway : 192.168.1.1Lan name : Local Area ConnectionDNS Server : 192.168.1.2Commands as follows netsh interface ip set adedsrs name= Local Area Connection static 192.168.1.50 255.255.255.0 192.168.1.1netsh interface ip set dns Local Area Connection static 192.168.1.2