Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to tell whether two IP are on the same local area network?

Shulou Source: shulou.com Published: 2022-06-03 04:41:56 10月03日 Update

How to tell whether two IP are on the same local area network?

1. In windows, start-> cmd to enter Dos, enter ipconfig / all, and view the network configuration.

two。 First of all, look at the subnet mask (Subnet Mask). If the subnet mask of the two machines is not the same, it is not in a local area network.

3. If the subnet mask is the same, see if the IP address corresponds to the IP segment of the subnet mask 255. if so, it belongs to a subnet, that is, a local area network.

For example, two IP addresses, 10.178.0.222 and 10.178.1.212, have subnet masks of 255.255.0.0. In the rules of TCP/IP protocol, the IP address and subnet mask are calculated, and the hexadecimal is FF, and the binary is 1111111110.178.0.222 and 255.255.0.0. The result is 10.178.0.0. Similarly, 10.178.1.212 and 255.255.0.0 do and calculate 10.178.0.0, so these two addresses belong to a local area network.

And 10.178.0.222 and 10.178.1.212 IP addresses, if their subnet mask is 255.255.255.0, they do not belong to a LAN. The results of the sum calculation of the two IP addresses and subnet masks are 10.178.0.0 and 10.178.1.0 respectively, which is obviously inconsistent with IP.

Tags: Subnet address two local area local area network consistency operation that is result obvious binary hexadecimal machine network rule do not input configure Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MySQL Docker Linux Apple