CIDR & Subnetting Speed Challenge
Master IPv4 subnet masks, usable host calculations, and VPC CIDR design under time pressure. Built for DevOps engineers, SREs, and CCNA/AWS candidates.
Click individual bits below to toggle between 1 (network) and 0 (host). Watch the CIDR, Subnet Mask, and Usable Hosts calculate in real time.
☁️ Scenario: AWS 3-Tier Multi-AZ VPC Design
You have been assigned the CIDR block 10.0.0.0/22 (1,024 total IPs). You need to allocate non-overlapping subnets to satisfy the infrastructure capacity requirements below.
Needs at least 100 usable IPs
Needs at least 200 usable IPs
Needs at least 25 usable IPs
⚡ IPv4 Subnetting & CIDR Cheat Sheet
Quick reference table for common subnet masks used in production Kubernetes CNI planning, AWS VPCs, and Docker overlay networks.
| CIDR Prefix | Subnet Mask | Wildcard Mask | Total IP Addresses | Usable Hosts (RFC 1918) | AWS VPC Usable |
|---|---|---|---|---|---|
/32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 (Host route) | 0 |
/30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 (Point-to-Point) | 0 (AWS min is /28) |
/29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 0 |
/28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 11 (16 - 5) |
/27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 27 (32 - 5) |
/26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 59 (64 - 5) |
/25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 123 (128 - 5) |
/24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 251 (256 - 5) |
/23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 507 |
/22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 1,019 |
/20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 4,091 |
/16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 65,531 |
How the Math Works in Your Head
The secret to fast mental subnetting is remembering the Magic Number:
Magic Number = 256 - Interesting Octet.
For instance, in /27, the last octet mask is 224.
256 - 224 = 32.
The subnets jump in increments of 32: .0, .32, .64, .96, .128...
Any IP between .0 and .31 belongs to the .0 network with broadcast .31!
❓ Frequently Asked Questions
Magic Number = 256 - mask of interesting octet. For a /27 subnet, the mask is 224, giving 256 - 224 = 32. Subnets increment by 32. For IP 10.0.0.75/27, the nearest lower multiple of 32 is 64, making 10.0.0.64 the network address, and 64 + 32 - 1 = 10.0.0.95 the broadcast address!
10.0.0.0/8(10.0.0.0 – 10.255.255.255, 16.7M IPs) — Used for large enterprise networks and complex cloud VPC topologies.172.16.0.0/12(172.16.0.0 – 172.31.255.255, 1M IPs) — Default range for Docker bridge networks and Kubernetes pod CIDRs.192.168.0.0/16(192.168.0.0 – 192.168.255.255, 65,536 IPs) — Common home, lab, and small office networks.
/24 (251 usable IPs in AWS) per availability zone ensures adequate headroom for 50–100 pods and node auto-scaling. Subnets smaller than /26 frequently cause FailedCreatePodSandBox outages during traffic spikes.