A subnet mask is a code, in the form of an IP address, that computers use to determine which parts of an IP address identify the subnet, and which parts identify an individual computer on that subnet.