Netmask

A netmask is a mask used to divide an IP address into subnets and specify the number of available host addresses in the subnet.

The netmask consists of a 32-bit sequence on the format 255.255.225.255.

There are three commonly used network classes:

Class Netmask length # of networks Number of hosts Netmask
Class A 8 126 16777214 255.0.0.0
Class B 16 16382 65534 255.255.0.0
Class C 24 2097150 254 255.255.255.0

The last 0 and 255 in a sequence are always assigned and cannot be used as host addresses.

For example, in 255.255.225.0, 0 is the assigned network address.

In 255.255.255.255, 255 is the assigned IPv4 broadcast address.