The subnet mask is used to divide the IP address into a network address and a host address. The calculation steps include: determining the subnet size and converting it to a binary representation; subtracting the number of digits in the host address from 32 , get the number of digits in the network address; in binary representation, fill 1 to the number of digits in the network address; fill the remaining digits with 0 to form a 32-bit subnet mask.
How to calculate the subnet mask
The subnet mask is used to divide the IP address into networks 32-bit binary number for address and host address. It is represented by separating the network and host parts of the IP address, represented by 1s and 0s.
Steps to calculate subnet mask:
Example:
Suppose we want to create a subnet of 64 computers.
Therefore, the subnet mask used to create a subnet of 64 computers is 255.255.255.192 (decimal).
The above is the detailed content of How to calculate subnet mask. For more information, please follow other related articles on the PHP Chinese website!