What is a Netmask?

Wiki mirrorView source
A Netmask is a 32-bit "mask" used to divide an IP address into subnets and specify the network's available hosts. In a netmask, two bits are always automatically assigned. For example, in 255.255.225.0, "0" is the assigned network address. In 255.255.255.255, "255" is the assigned broadcast address. The 0 and 255 are always assigned and cannot be used.
Netmask defines how "large" a network is or if you're configuring a rule that requires an IP address and a Netmask, the Netmask will signify to what range of the Network the rule will apply to:
IPNETMASKDESCRIPTION
192.168.55.161255.255.255.255Only applies to 192.168.55.161
192.168.55.0255.255.255.0Applies to IPs in the 192.168.55.0 - 192.168.55.255 range
192.168.55.240255.255.255.240192.168.55.240 - 192.168.55.255
192.168.55.161255.255.255.0192.168.55.0 - 192.168.55.255
192.168.0.0255.255.0.0192.168.0.0 - 192.168.255.255

Sometimes you will see that a Netmask is defined by one number, e.g., 24. This number is the length of the Netmask in bits:
NETMASK255.255.255.255
Netmask length8162432

So, for example, a Netmask that is 24-bits long is 255.255.255.0:
NETMASK255.255.255.0
Netmask length81624-

A Netmask that is 16-bits long is 255.255.0.0:
NETMASK255.255.0.0
Netmask length816--
And so on.