Subnetting splits the host field into subnet and host fields, creating a three-part address. The network field remains unchanged, and is determined via classful addressing as described earlier. The boundary between the subnet and host fields can fall between any two bits, and is determined using a subnet mask, assigned by the network engineer. The subnet mask is 32 bits long and is written in dotted decimal format, just like an IP address. Each bit in the mask is either 1 to identify bit positions in the network and subnet fields, or 0 to identify bit positions in the host field. The subnet mask, beginning with a sequence of 1 bits, and ending with 0 bits, was the precursor of the modern prefix length and is still widely used.
Each classful network possessed a single subnet mask which determined the subnet/host boundary for that entire network. Different classful networks could have different subnet masks, but only a single subnet mask was allowed for each classful network. The subnet mask for that network was programmed into all hosts and routers within that network.
Subnetting quickly became the most popular way to manage the classful address space. The main reason for this was its flexibility. Any classful network could be now be subdivided on any bit boundary. A Class B address could be segmented into 254 subnets of 254 addresses each, or 62 subnets of 1022 addresses each, or any similar combination. Likewise, a Class C could be broken down into 14 subnets of 14 addresses each, or 6 subnets of 30 each, depending on the requirements of the particular network.