What Is a Subnet Mask?

Subnet Mask Definition and Examples

A subnet mask is the IP address-like designation of the size of subnetwork to which a computer or other network device belongs. It's a 32-bit number that splits the IP address into its two components: the network address and host address.

A subnet mask (also called netmask), then, is structured like this: <network><host>. To subnet is to divide the host section into its own <network><subnet><host>.

The subnet mask is created by setting all the network bits to 1s and host bits to 0s. A network reserves two addresses that cannot be assigned to hosts, and those include 0 for the network address and 255 for the broadcast address.

Subnet Mask Examples

These are the netmasks used for Class A (16-bit), Class B (16-bit), and Class C (24-bit) networks:

  • Class A networks support 16,777,216 hosts and have a subnet mask of
  • Class B networks have a subnet mask of and can only have 65,534 IP devices. 
  • Most home networks are Class C, designated by a subnet mask of This size of network can contain up to 256 IP devices, plenty of room for any normal home or small business.

Consider the IP address If we assume it's a Class B address, the first two numbers (128.71) explain the Class B network address while the last two (216.118) identify the host address.

See more about subnet masks in our Subnet Masks and Subnetting tutorial.