What is a Subnet and How Does It Work?

What is a Subnet
5 min read
What is a Subnet

In this post, I’m going to talk about the concept of network IP address subnets and the benefits of subnetting. Let’s begin by answering the main question of this blog post. What is a subnet? A subnetwork or subnet is a logical subdivision of an IP network. The practice of dividing a network into two or more networks is called subnetting. In other words, a subnet or subnetwork is just a small network inside a larger network.

As a result of subnetting networks tend to work more efficiently. Most importantly, the idea of subnetting is to reduce network traffic by traveling shorter distances. This is done by avoiding unnecessary routes, therefore, shortening the destination path.

Undoubtedly, subnetting is a very important part of a network infrastructure. Consequently, IT certification exams like Cisco CCNA and CompTIA Network+ emphasize the importance of this topic. Throughout this article, I will provide few descriptive examples that will help you get a better understanding of subnets. Although at first, understanding all this information may seem too difficult, don’t give up! All it takes is some time and practice!

Subnet High Level View
Subnet High Level View

IP Address and Subnet Mask

Before we begin learning subnetting calculations let’s understand the basics. First, we need to learn about the 3 most used IP Address classes. These commonly used classes are Class A, Class B, and Class C.

As a reminder, the common IPv4 address consists of 32 binary bits. These bits can be separated into a network portion and host portion followed by the subnet mask broken into four 8-bit octets. On the other hand, IPv6 addresses are longer and also include letters as well as numbers.

It’s important to know that every IP address consists of two parts. The first part defines the network. The second part of the IP address defines the device ID. However, the length of the Network might vary depending on the network’s class.

As a result, of the challenge that represents the binary number. We tend to convert each octet into dot-decimal combinations. For example, 192.15.201.1. The range of values in decimal is 0 to 255 because that represents 00000000 to 11111111 in binary.

Classful Subnetting

Definition of the network address – All 0’s in the host portion of an address

Broadcast address – All 1’s in the host portion of an address

Class A network: In a Class A IP address, everything before the first period signifies the network (N.H.H.H). Therefore, everything after the first period is classified as the device’s ID. For example, in a “10.14.1.57” IP Address, the network is indicated by “10” and the device within that network by “14.1.57”.

  • Public IP Range: 1.0.0.0 to 127.0.0.0
  • First octet value range from 1 to 127
  • Subnet Mask: 255.0.0.0 (8 bits)
  • Number of Networks: 128
  • Number of Hosts per Network: 16,777,214

Class B network: In a Class B IP address, everything before the second period signifies the network (N.N.H.H). Therefore, everything after the second period is classified as the device’s ID. For example, in a “172.16.25.122” IP Address, the network is indicated by “172.16” and the device within that network by “25.122”.

  • Public IP Range: 128.0.0.0 to 191.255.255.255
  • First octet value range from 128 to 191
  • Subnet Mask: 255.255.0.0 (16 bits)
  • Number of Networks: 16,384
  • Number of Hosts per Network: 65,534

Class C network: In a Class C IP address, everything before the third period signifies the network (N.N.N.H) Therefore, everything after the third period is classified as the device’s ID. For example, in a “192.168.114.109” IP Address, the network is indicated by “192.168.114” and the device within that network by “109”.

  • Public IP Range: 192.0.0.0 to 223.255.255.255
  • First octet value range from 192 to 223
  • Subnet Mask: 255.255.255.0 (24 bits)
  • Number of Networks: 2,097,152
  • Number of Hosts per Network: 254
Subnet Classes

Why use subnetting?

One of the greatest advancements of network technology is the introduction of the IP system. However, when larger networks start adopting this system the need for speed became the next challenge. As a result, subnets became the new way to solve this problem. This was achieved by separating larger networks into smaller networks. Consequently, reducing congestion and better data flow.

For instance, network administrators can utilize IP subnets to divide larger networks for logical reasons. In addition, network security also represented an improvement in network security. Certainly, the divisions between subnet allow system administrators to enforce access controls. Consequently, help contain or stop the spread of malicious malware attacks.

Subnetting Rule of Thumb

As you know, subnetting is a foundational skill that may find on one of the computer networking certification exams like Network+ or CCNA. Below is a very interesting video by Professor Messer that will help you solve the subnetting questions. This is called the Seven Second Subnetting Rule.

The Bottom Line

To summarise in simple words, a subnet is just a small network inside a larger network. In addition, subnetting helps to efficiently allocate IP addresses. Therefore, prevents large numbers of IP addresses from going unused. This is very important because it allows dividing the flow of network traffic into logical groups. Consequently, improving performance and network security.

vhs

Victor Hugo Solis

Master’s Degree in Information Security, a Bachelor’s Degree in Database Administration, and experience as a WordPress Web Designer & Developer.