Subnetting: A Beginner’s Guide to Subnet Masks

May 10, 2023

Subnetting is the process of dividing a network into smaller, more efficient and secure networks known as subnets. This division aids in the efficient routing of data, making it an essential part of Internet Protocol (IP) networking.

Understanding IP Addresses and Subnet Masks

When a device connects to a network, it’s assigned an IP address, which consists of two parts: the network portion and the host portion. The network portion identifies the overall network, while the host portion identifies the device. These two parts are indistinguishable without a subnet mask, which splits IP addresses into the network and host addresses for network traffic to comprehend.

Subnetting allows a network with one public IP address to divide into multiple smaller networks, each with a unique internal IP address. By using subnets, data can travel more directly to its destination IP address, enhancing network performance. For successful subnetting, each IP address needs to be matched with a subnet mask.

IP Classes and Subnet Masks

Networks come in different sizes, and IP Classes determine the number of hosts a network can support. There are three classes of IP addresses: A, B, and C. Furthermore, Class D is for multicasting and Class E for research purposes, so they’re not relevant here.

Class A networks support over 65,536 hosts, with the subnet mask reflecting the network address in the first octet. Class B networks have the subnet mask reflecting the network address in the first and second octets, supporting between 256 to 65,534 hosts.

Network Addresses and Subnet Masks

Each class of network has a different default mask:

Class A:

Class B:

Class C:

The default subnet masks reflect how many of the octets are used by the network address.

For example, if you pair the IP address with the subnet mask, the network address is contained in the portion 10.45.21, and the associated subnet for host addresses ranges from to


Understanding subnet masks begins with understanding how IP addresses work and why networks use subnetting. Network administrators often use subnetting for security, routing efficiency, network speed, or to preserve public IPv4 addresses.

Even for relatively small systems, subnet masks play an integral part in ensuring reliable and smooth operation. They ensure that inbound traffic is routed to and from the correct host devices.