Subnetting is one of those skills that every network engineer learns, most forget, and everyone needs when something breaks at 2am. This guide gives you the mental model and the math β once, correctly.
What is CIDR?
CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its associated routing prefix. 192.168.1.0/24 means the first 24 bits are the network portion, and the remaining 8 bits are for hosts.
The Binary Foundation
Every subnet calculation is binary arithmetic. A /24 network has a subnet mask of 11111111.11111111.11111111.00000000 in binary β or 255.255.255.0 in dotted-decimal.
IP Address: 192.168.1.100 β 11000000.10101000.00000001.01100100
Subnet Mask: 255.255.255.0 β 11111111.11111111.11111111.00000000
βββββββββββββββββββββββββββββββββββββ
Network Addr: 192.168.1.0 β 11000000.10101000.00000001.00000000
Broadcast: 192.168.1.255 β 11000000.10101000.00000001.11111111
The Three Key Calculations
- Network Address = IP AND Subnet Mask (bitwise AND)
- Broadcast Address = Network OR (NOT Mask) β all host bits set to 1
- Usable Hosts = 2^(32βprefix) β 2 (minus network and broadcast)
Common CIDR Reference
| CIDR | Subnet Mask | Total Addresses | Usable Hosts | Use Case |
|---|---|---|---|---|
/8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Class A Enterprise |
/16 | 255.255.0.0 | 65,536 | 65,534 | ISP Allocations |
/24 | 255.255.255.0 | 256 | 254 | Standard Office LAN |
/28 | 255.255.255.240 | 16 | 14 | Small Segments |
/30 | 255.255.255.252 | 4 | 2 | Point-to-Point Links |
/32 | 255.255.255.255 | 1 | 1 | Host Route |
Variable Length Subnet Masking (VLSM)
VLSM allows you to split a network into subnets of different sizes β allocating address space efficiently. A /24 network can be split into multiple /26 networks (62 hosts each), /28 networks (14 hosts), and /30 point-to-point links β all without wasting address space.
Practice with Our Subnet Calculator
Rather than doing the binary math by hand, use our free IP Subnet Calculator to verify your work. Enter any IP and CIDR prefix to instantly get: Network Address, Broadcast, Subnet Mask, Wildcard Mask, Usable Hosts, and full binary notation.
"Every network problem eventually comes down to understanding where the packet is β and subnetting tells you if it should even be there."