Skip to content
  • There are no suggestions because the search field is empty.

The Need for Subnets

While networks have evolved to meet modern requirements, flat networks still occasionally exist in rare situations. A flat network is typically built by connecting all devices to a single network segment without subnets or divisions. In a flat network, all devices share the same address space and can communicate directly with one another through switches without the need for routing between subnets. 

Design of a flat network

Although this simplicity can be suitable for small networks, it can lead to issues like broadcast storms, security vulnerabilities, and difficulties in managing, scaling, and troubleshooting the network as it grows. Consider a scenario like the image above, where an enterprise has multiple departments. Initially, they considered implementing a single network for all their devices, where each department is physically separated but logically still belongs to the same network. However, accommodating hundreds or even thousands of devices within one network would lead to significant problems.

Design of a segmented network

The solution to flat networks is subnetting, which involves dividing the larger network into smaller, logically separated subnetworks or subnets. As you can see in the image above, with this approach, each department becomes a separate subnet, and the devices within each department are assigned individual host addresses within their respective subnets. Subnetting reduces broadcast traffic, enhances security by isolating network segments, and simplifies troubleshooting, as network issues are confined to specific subnets.

Understanding Subnetting

Subnetting enables the creation of several smaller, logically separated networks within a larger network. Imagine you have a large network, such as an enterprise network. Subnetting allows you to divide this large network into smaller, more manageable networks or subnets. 

But which steps are involved in the subnetting procedure? Subnetting involves borrowing bits from the host portion of an IP address and using them as subnet bits. These bits must be borrowed consecutively, starting with the first host bit on the left and moving to the right. 

To successfully subnet a network, you must follow this procedure:

  • Determine Network Size: Identify the number of subnets and devices required.
  • Select Subnet Mask: Choose a subnet mask based on subnet size.
  • Calculate Borrowed Bits: Determine how many host bits to convert to subnet bits.
  • Calculate Hosts: Count available host addresses in each subnet.
  • Create Subnet IDs: Generate unique IDs for each subnet.
  • Assign IP Addresses: Allocate IP addresses within each subnet's range.

Subnetting an enterprise network with multiple departments

To understand subnetting clearly, let's focus on the requirements in the image above. The enterprise network comprises four departments, each with 20 to 50 users, all within the same network (192.168.1.0/24), providing 256 IP addresses, of which 254 are usable (excluding network and broadcast IPs).

You must create four subnets, each offering 64 IP addresses to achieve separate independent networks. To do this, you must borrow bits from the host portion, which consists of 8 bits. Remember that borrowing bits involves changing the values of the corresponding host bits in the subnet mask from 0s to 1s.

Graphical representation of subnetting steps

But how many bits should we borrow? It depends on the number of subnets required. You calculate the total number of subnets using the 2^X formula, where X represents the number of borrowed bits. In our case, borrowing two bits creates four subnets (2^2=4), and this change shifts the prefix from /24 to /26. 

Once you have the subnets, you can determine the number of IPs each subnet will provide. This calculation is also based on the same 2^X formula, but now X represents the number of host ID bits left in the subnet mask, which in our case is six, resulting in each subnet providing 64 IPs (2^6=64). After excluding network and broadcast IPs, each subnet offers a usable IP address range of 62.

Now that you have calculated the number of subnets and IP addresses per subnet, you can document and apply them to each department:

Subnet 

Network Address

Host Address Range

Broadcast Address

192.168.1.0/26

192.168.1.0

192.168.1.1-192.168.1.62

192.168.1.63

192.168.1.64/26

192.168.1.64

192.168.1.65-192.168.1.126

192.168.1.127

192.168.1.128/26

192.168.1.128

192.168.1.129-192.168.1.190

192.168.1.191

192.168.1.192/26

192.168.1.192

192.168.1.193-192.168.1.254

192.168.1.255

The same procedure applies to subnetting Class B and Class C networks, including Variable Length Subnet Masking (VLSM) for further subnetting, and achieving optimized IP addressing in the network.