Understanding Subnetting in Computer Networking | A Simple Practical Explanation.


What would happen if a large building had no separate rooms and was just one huge hall? Everyone’s sounds and activities would mix together, creating a big mess, and no one would be able to work freely. However, if walls were built in the middle of that hall and it was divided into several smaller rooms, the work inside each room could be carried out in a much more organized, controlled, and secure manner. In computer networking, Subnetting is something similar to this. Simply put, Subnetting is the technique of dividing a large computer network (IP Network) into several smaller sub-networks (Subnets) so that the network can be managed more efficiently, securely, and easily. By doing this, unnecessary data traffic within the network can be reduced and speed can be improved, while also preventing IP addresses from being wasted and increasing network security. For example, in a large company, the network can be divided into separate networks for departments such as IT, HR, Finance, Admin, and Marketing.

Let’s take a sample IP address: 192.168.1.25. This clearly has four parts. They are the 192 part, the 168 part, the 1 part, and the 25 part. Each of these parts is made up of 8 bits, making a total of 32 bits. In 192.168.1.25 / 24, which is an IPv4 address, 192.168.1 is the network portion. The last part, .25, is the host portion. /24 is called CIDR notation. Here, its value is 24. This means that out of the total 32 bits, 24 bits belong to the network portion. Therefore, the remaining 8 bits belong to the host portion. That means 28 = 256 addresses are available for this IP address. This means that the network ranges from 192.168.1.0 to 192.168.1.255, giving a total of 256 IP addresses. However, we cannot actually use all of them for devices. This is because two IP addresses are reserved for two special purposes. They are:

192.168.1.0 — Network IP

192.168.1.255 — Broadcast IP

After removing those two addresses, 254 hosts can be connected using 192.168.1.1 to 192.168.1.254.

The difference between a Subnet and a Subnet Mask is that a Subnet is a particular portion of a network, while a Subnet Mask is the value used to identify the boundary of that network. In the 192.168.1.0/24 subnet, the subnet mask is 255.255.255.0. Similarly, the CIDR Notation is the value placed at the end of an IP address. Here, CIDR stands for Classless Inter-Domain Routing. In the IP address 192.168.1.0 / 24, the /24 part indicates that 24 bits of this IP address belong to the network portion. Therefore, only the remaining 8 bits belong to the host portion. That means 254 devices can be connected to that network. Two more IP addresses are reserved for the Network Address and Broadcast Address. As another example, in 192.168.1.0 / 28, out of the 32 bits, the first 28 bits belong to the Network Portion, while only 4 bits belong to the Host Portion. 2⁴ = 16. This means that 14 devices can be connected to this network (however, practically, all 14 cannot be connected because one address is reserved for the Gateway). Two more IP addresses are reserved for the Network Address and Broadcast Address.

Let’s look at this using an example. A company has 4 departments and one LAB. The IT department has 6 PCs, the Finance Department has 8 PCs, the HR Department has 12 PCs, the Admin department has 8 PCs, and the LAB has 30 PCs. For this, let’s use 5 VLANs and 5 subnets for these five sections.

First, let’s look at the LAB. It has 30 PCs. First, let’s determine how many Host Bits are required to connect 30 PCs. Let’s initially take 4 Host Bits. Then, 2⁴ = 16. This means we cannot connect 30 PCs. Next, let’s look at 5 Host Bits. Then, 25 = 32. This provides enough IP addresses for 30 PCs, the Network Address, and the Broadcast Address. However, there will not be enough addresses for the Gateway. Next, let’s look at 6 Host Bits. Then, 2⁶ = 64. This means there are enough IP addresses for 30 PCs, the Gateway, the Network Address, and the Broadcast Address. Additional PCs can also be connected if required. Therefore, 6 Host Bits are required for this network. 32–6 = 26. That means 26 bits are allocated to the Network Portion. Therefore, we can assign the 192.168.1.0 / 26 network to this. 2⁶ = 64. The maximum value of one octet in a subnet mask is 256. 256–64 = 192. Therefore, the subnet mask of this network is 255.255.255.192. This allows us to find the Block Size. The Block Size is 256–192 = 64. Now, when assigning IP addresses to this network, we can use the range from 192.168.1.0 to 192.168.1.63. From this:

192.168.1.0 — Network Address

192.168.1.1 — First IP

192.168.1.62 — Last IP

192.168.1.63 — Broadcast Address

Next, let’s look at the HR Department. It has 12 PCs. First, let’s determine how many Host Bits are required to connect 12 PCs. Let’s initially take 3 Host Bits. Then, 2³ = 8. This means we cannot connect 12 PCs. Next, let’s look at 4 Host Bits. Then, 2⁴ = 16. This provides enough IP addresses for 12 PCs, the Gateway, the Network Address, and the Broadcast Address. Additional 2 PCs can be connected if required (Usable IPs = 16–2 = 14). Therefore, 4 Host Bits are required for this. 32–4 = 28. That means 28 bits are allocated to the Network Portion. Therefore, we can assign the 192.168.1.64 / 28 network to this. 2⁴ = 16. The maximum value of one octet in a subnet mask is 256. 256–16 = 240. Therefore, the subnet mask of this network is 255.255.255.240. This also allows us to find the Block Size. The Block Size is 256–240 = 16. Now, when assigning IP addresses to this network, we can use the range from 192.168.1.64 to 192.168.1.79. From this:

192.168.1.64 — Network Address

192.168.1.65 — First IP


192.168.1.78 — Last IP

192.168.1.79 — Broadcast Address

Next, let’s look at the Finance Department. It has 8 PCs. First, let’s determine how many Host Bits are required to connect 8 PCs. Let’s initially look at 4 Host Bits. Then, 2⁴ = 16. This provides enough IP addresses for 8 PCs, the Gateway, the Network Address, and the Broadcast Address. Therefore, 4 Host Bits are required for this. 32–4 = 28. That means 28 bits are allocated to the Network Portion. Therefore, we can assign the 192.168.1.80 / 28 network to this. 2⁴ = 16. The maximum value of one octet in a subnet mask is 256. 256–16 = 240. Therefore, the subnet mask of this network is 255.255.255.240. This also allows us to find the Block Size. The Block Size is 256–240 = 16. Now, when assigning IP addresses to this network, we can use the range from 192.168.1.80 to 192.168.1.95. From this:

192.168.1.80 — Network Address

192.168.1.81 — First IP

192.168.1.94 — Last IP

192.168.1.95 — Broadcast Address

Next, let’s look at the Admin department, which has 8 PCs. First, let’s determine how many Host Bits are required to connect 8 PCs. Let’s look at 4 Host Bits. Then, 2⁴ = 16. This provides enough IP addresses for 8 PCs, the Gateway, the Network Address, and the Broadcast Address. Therefore, 4 Host Bits are required for this. 32–4 = 28. That means 28 bits are allocated to the Network Portion. Therefore, we can assign the 192.168.1.96 / 28 network to this. 2⁴ = 16. The maximum value of one octet in a subnet mask is 256. 256–16 = 240. Therefore, the subnet mask of this network is 255.255.255.240. The Block Size is 256–240 = 16. Now, when assigning IP addresses to this network, we can use the range from 192.168.1.96 to 192.168.1.111. From this:

192.168.1.96 — Network Address

192.168.1.97 — First IP

192.168.1.110 — Last IP

192.168.1.111 — Broadcast Address

The IT Department has 6 PCs. First, let’s determine how many Host Bits are required to connect 6 PCs. Let’s initially take 3 Host Bits. Then, 2³ = 8. This provides enough IP addresses for 6 PCs, the Network Address, and the Broadcast Address. However, there will not be enough addresses for the Gateway (8–2 = 6 Usable IPs). Next, let’s look at 4 Host Bits. Then, 2⁴ = 16. This means there are enough IP addresses for 6 PCs, the Gateway, the Network Address, and the Broadcast Address. Therefore, 4 Host Bits are required for this. 32–4 = 28. That means 28 bits are allocated to the Network Portion. Therefore, we can assign the 192.168.1.112 / 28 network to this. 2⁴ = 16. The maximum value of one octet in a subnet mask is 256. 256–16 = 240. Therefore, the subnet mask of this network is 255.255.255.240. This allows us to find the Block Size. The Block Size is 256–240 = 16. Now, when assigning IP addresses to this network, we can use the range from 192.168.1.112 to 192.168.1.127. From this:

192.168.1.112 — Network Address

192.168.1.113 — First IP

192.168.1.126 — Last IP

192.168.1.127 — Broadcast Address

By using Subnetting technology correctly in this way, an organization’s computer network can be divided and organized in a very systematic, simple, secure, and efficient manner. By minimizing the wastage of IP addresses, controlling unnecessary traffic, and improving the overall speed and performance of the entire network, this practical method provides significant support for achieving an efficient and well-organized network.

Post a Comment

0 Comments