Netmask & Subnetmask
Netmask
A netmask is a 32-bit mask used to divide an IP address into subnets and specify the networks available hosts. In a netmask two bits are always automatically assigned. For example in 255.255.225.0, “0″ is the assigned network address and in 255.255.255.255, “255″ is the assigned broadcast address. The 0 and 255 are always assigned and cannot be used.
Below is an example of a netmask and an example of its binary conversion.
Netmask: 255. 255. 255. 255
Binary Conversion: 11111111 11111111 11111111 11111111
Netmask length 8 16 24 32
Counting out the bits in the binary conversion allows you to determine the netmask length. In the above example you have an example of a 32-bit address. However, this address is a broadcast address does not allow any hosts (computers or other network devices) to be connected to it.
Subnetmask
The subnet mask is the network address plus the bits reserved for identifying the subnetwork. (By convention, the bits for the network address are all set to 1, though it would also work if the bits were set exactly as in the network address.) In this case, therefore, the subnet mask would be 11111111.11111111.11110000.00000000. It’s called a mask because it can be used to identify the subnet to which an IP address belongs by performing a bitwise AND operation on the mask and the IP address. The result is the subnetwork address:
Subnet Mask 255.255.240.000 11111111.11111111.11110000.00000000
IP Address 150.215.017.009 10010110.11010111.00010001.00001001
Subnet Address 150.215.016.000 10010110.11010111.00010000.00000000
The subnet address, therefore, is 150.215.016.000.



















