(also subnet mask)
A netmask is a 32-bit binary mask that divides an IP address into subnets or smaller networks and defines networking rules in routers and firewalls. It is also used to determine the class and range of IP addresses, which makes computer networking easier. A netmask provides the number range of IP addresses from Class A to Class C and sets a mask that divides them into subnets.
Additionally, dividing IP addresses into subnets depends on the IP address class, and the longer the netmask is, the more networks it can house. In a netmask, two possible addresses representing the final byte are always automatically assigned. For instance, in 255.255.255.0, the “0” is the given network address, while in 255.255.255.255, the last “255” is the given broadcast address. As a result, these two values can’t be used to assign IP addresses.
See also: IPv4, class A IP address