A subnet mask splits an IP address into a host and network address so that a router can identify which parts are which.

The parts of the IP address which represent the network ID are set as 1s which those that represent the host ID are set as 0s.

This allows the router to tell which parts should be used to determine the network ID when subnetting, a process in which the network administrator further divides the host part of an IP address into further smaller ‘subnets’.

The router extracts it from the IP address and the subnet mask.

The IP address is used to identify a device on the network. With subnetting, the host part of the address is divided into two or more subnets, with part of the host address identifying the subnet.

The subnet mask can be calculated automatically using a subnet mask calculator. It differs from an IP address, as it does not represent a specific device on the internet.