The subnet mask cannot exist alone, it must be used in conjunction with an IP address. The subnet mask has only one function, which is to divide an IP address into two parts: network address and host address.
The subnet mask setting must follow certain rules. The same as the IP address, the length of the subnet mask is also 32 bits, the left is the network bit, with the binary number "1", the right is the host bit, the binary number "0" is represented. Only through the subnet mask can you indicate the relationship of the subnet that the host resides with the other subnets, and make the network work properly.
A subnet mask is a basis for determining whether the IP addresses of any two computers belong to the same subnet. The simplest understanding is that after the IP address of two computers and the subnet mask, if the result is the same, then the two computers are on the same sub-network and can communicate directly.
It's so simple.
Determine if the same subnet is owned by IP address, subnet mask