2.2 Classes of Subnets and Subnet Masks

Basics

Many networks are divided into smaller networks referred to as subnets. “Sub” in this use refers to a subsection or part of the network. The process of subnetting the network, or dividing it into smaller networks, means you can get more IPv4 addresses out of your network. Instead of each device needing a unique global address based solely on the base IP address of the network, when you apply subnets, each device will have an IP address in which part refers to the overall network IP address, and a part that refers to its corresponding subnet. Each IP address is unique internally to the network, but they will all share the same parts that relate to the network IP address.

You should know the following terms:

  • Broadcasting or Broadcast traffic
  • Classless Inter-Domain Routing (CIDR)
  • Netmask
  • Subnet
  • Subnet mask
  • Subnet mask classes
  • Subnetting

Subnetting can make the network more efficient and secure. Using subnets targets data directly to where it should be transmitted as opposed to sharing the data across an entire network until it finds the correct device. This latter type of data transfer, called broadcasting or broadcast traffic, is inefficient but is sometimes used, as was presented under the topic MAC addresses. 

Subnets reduce the amount of traffic on a network overall and improve the speed at which data is transferred. Subnets can also improve the security of your network, because if one subnet is attacked or compromised, it’s possible it can be contained to just that subnet and not impact your entire network. You can also limit network access within a subnet to create a more secure place to store files or support secure communications.

Once you have divided your network into subnets, you need a way to help computers find the right IP address within those subnets. In addition to a unique IP address, all of the computing devices on your network require a subnet mask. A subnet mask is always paired with an IP address.

There are different classes of subnets, the ones you will mostly commonly use are likely to be Class A, Class B, and Class C. These classes help to identify which parts of an IP address correspond to the network address and which correspond to the host address.

Subnet Mask Classes

ClassFirst Octet AddressDefault Subnet MaskHosts per Network
A1-127255.0.0.016,777,214
B128-191255.255.0.065,534
C192-223255.255.255.0254

Subnet Chart

Based on your current subnet mask, use the following table to determine how many hosts are available on that subnet. How many hosts are possible on your subnets?

Your DHCP server might run out of hosts if your subnet isn’t large enough. If you need more hosts, you may be able to use a different CIDR (Classless Inter-Domain Routing (first column) or supernetting. You might hear someone mention they are using a “slash 24 (/24)” and moving to a “ slash 23 (/23)” which will double the amount of hosts available in that subnet mask from 256 to 512. This process can include reconfiguring your DHCP server, scopes, IP helpers, and static addresses. Because this can result in a domino effect, be sure to check with your CTO, IT Director, or a network engineer before changing subnet masks.

The Netmask will also indicate whether a host is or is not on a specific subnet. If not, you’ll need to connect the two subnets through one or more routers. You may need to configure your router to connect the subnets, and if this is something you’re not familiar with, be sure to work with an expert.

CIDRHostsNetmaskAmount of a Class C
/304255.255.255.2521/64
/298255.255.255.2481/32
/2816255.255.255.2401/16
/2732255.255.255.2241/8
/2664255.255.255.1921/4
/25128255.255.255.1281/2
/24256255.255.255.01
/23512255.255.254.02
/221,024255.255.252.04
/212,048255.255.248.08
/204,096255.255.240.016
/198,192255.255.224.032
/1816,384255.255.192.064
/1732,768255.255.128.0128
/1665,536255.255.0.0256


Here are additional resources you may find useful:

Complete the following task or self-assessment:

WARNING: Changing your subnet mask configuration can require reconfiguring your DHCP server and shouldn’t be done unless necessary.

  • How many subnets are deployed on your network?
  • What are the subnet masks?

If necessary, work with a network administrator to determine your subnet configuration and subnet masks.