The network mask strips the network ID from the IP address, leaving only the host ID. Each netmask consists of binary ones (decimal 255) to mask the network and subnet IDs and binary zeroes (decimal 0) to retain the host ID of the IP address. For example, the default netmask for a Class B address is 255.255.0.0. The first two octets have the value 255 as a result of setting all their bits to 1.
Always use the default netmask that the installation program prompts you for unless your network uses subnetting. If a subnet uses part of the IP address, you must also mask this portion of the address. For example, for machines on a Class B network which uses the third octet for subnetting, the netmask would be 255.255.255.0.
As another example, consider several subnetted class C networks which use the first three bits of the fourth octet for the subnet address and the last five bits for the host address. In this case, the netmask for all machines on the subnets would be 255.255.255.224 which is obtained by setting all the network and subnet address bits to 1 (255.255.255.128+64+32).
See also: