Subnetting Fundamentals
A step-by-step guide to breaking down a large network.
Subnetting is the process of taking a large network and splitting it up into smaller networks, called subnets. It's a foundational skill for network engineers, essential for organizing and securing networks.
The "Why" of Subnetting
Before diving into the "how," it's crucial to understand why we do it:
- Reduce Network Congestion: It breaks up large broadcast domains into smaller ones. This means fewer devices receive broadcast traffic, leading to better network performance.
- Improve Security: You can apply security rules (like firewall policies or ACLs) at the boundaries between subnets. For example, you can prevent the Guest Wi-Fi subnet from accessing the corporate servers subnet.
- Simplify Administration: It's easier to manage and troubleshoot smaller, logically-grouped networks than one massive, flat network.
The Magic of Borrowing Bits
Subnetting works by "borrowing" bits from the host portion of an IP address and using them for the network portion. This extends the network part of the address, creating new subnet identifiers.
Let's use an example. We have the network 200.20.1.0/24
. Our Subnet Calculator shows this gives us 254 usable host addresses.
What if we need 4 separate networks from this block?
- Determine Bits to Borrow: The formula is 2n ≥ (number of subnets needed). To get at least 4 subnets, we need to borrow 2 bits from the host part (22 = 4).
- Calculate the New Subnet Mask: The original mask is /24. We add the 2 borrowed bits, so our new mask is
/26
. The decimal representation of a /26 mask is255.255.255.192
. - Determine the Subnet Increment: The "interesting" octet is the last one (where we borrowed from). The value of the last borrowed bit gives us the increment. In a /26 mask (11111111.11111111.11111111.11000000), the second bit's place value is 64. So our networks will increment by 64.
- List the Subnets:
- 200.20.1.0/26
- 200.20.1.64/26
- 200.20.1.128/26
- 200.20.1.192/26
Each of these /26 subnets has 6 host bits (32 - 26 = 6), giving them 26 - 2 = 62 usable IP addresses. This is a classic example of fixed-size subnetting. For more advanced scenarios where you need subnets of different sizes, you would use VLSM, which you can learn about in our VLSM Explained guide.