IP Subnetting Fundamentals & CIDR Notation Explained
Subnetting is the process of splitting a large network into smaller, manageable sub-networks (subnets). Understanding how IP addresses interact with subnet masks and Classless Inter-Domain Routing (CIDR) is the single most critical skill for passing network administration exams.
The Anatomy of an IP Address
An IPv4 address consists of 32 bits divided into 4 octets (8 bits per octet). Every single IP address has two distinct parts:
- Network ID: Identifies the specific street or neighborhood the network lives on.
- Host ID: Identifies the specific house or device sitting on that street.
The **subnet mask** is what draws the line in the sand between these two parts. Where there are 1s in binary, it represents the network; where there are 0s, it represents available host spaces.
What is CIDR Notation?
Historically, networks were divided rigidly into Class A, B, and C. This wasted millions of addresses. In 1993, **Classless Inter-Domain Routing (CIDR)** was introduced to allow flexible allocation.
Instead of writing out a long mask like 255.255.255.0, CIDR notation uses a forward slash followed by the exact count of network bits. For example, a mask of 255.255.255.0 has 24 continuous binary bits turned on, so it is cleanly written as /24.
The Golden Formulas of Subnetting
When you are sitting in an exam room trying to figure out how many subnets or hosts you can fit inside a given mask range, you only need to memorize two simple algebraic formulas:
where $n$ is the number of borrowed bits
where $h$ is the remaining host bits
⚠️ Why do we subtract 2 from the host calculation? On every subnet, two addresses are legally reserved: the very first address (which acts as the Network Identifier address) and the absolute last address (which serves as the Broadcast address for sending data packets to all nodes simultaneously). You cannot assign these to real PCs or servers!
A Practical Cheat Sheet
| CIDR Mask | Subnet Mask | Total Usable Hosts | Block Size (Increment) |
|---|---|---|---|
| /24 | 255.255.255.0 | 254 | 256 |
| /25 | 255.255.255.128 | 126 | 128 |
| /26 | 255.255.255.192 | 62 | 64 |
| /27 | 255.255.255.224 | 30 | 32 |
| /28 | 255.255.255.240 | 14 | 16 |
| /30 | 255.255.255.252 | 2 | 4 |
Want to calculate custom parameters instantly without counting complex binary string splits manually? Use our fully responsive Subnet Calculator Engine to safely break down inputs in real time.