CIDR Cheat Sheet
CIDR notation is one of those things every infrastructure team uses constantly, but few people want to recalculate from memory in the middle of a design review.
This page gives you a fast CIDR reference for:
- Subnet masks
- Total IP addresses
- Usable hosts
- Common cloud subnet sizes
- Kubernetes planning context
If you just need the quick answer, start with the table below.
Quick CIDR Reference Table
| CIDR | Subnet Mask | Total IPs | Usable Hosts |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 |
| /31 | 255.255.255.254 | 2 | 2 |
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /27 | 255.255.255.224 | 32 | 30 |
| /26 | 255.255.255.192 | 64 | 62 |
| /25 | 255.255.255.128 | 128 | 126 |
| /24 | 255.255.255.0 | 256 | 254 |
| /23 | 255.255.254.0 | 512 | 510 |
| /22 | 255.255.252.0 | 1024 | 1022 |
| /21 | 255.255.248.0 | 2048 | 2046 |
| /20 | 255.255.240.0 | 4096 | 4094 |
| /19 | 255.255.224.0 | 8192 | 8190 |
| /18 | 255.255.192.0 | 16384 | 16382 |
| /17 | 255.255.128.0 | 32768 | 32766 |
| /16 | 255.255.0.0 | 65536 | 65534 |
These usable host counts reflect classic IPv4 subnetting:
- network address reserved
- broadcast address reserved
Cloud platforms reserve additional IPs inside subnets, so actual usable capacity is lower in Azure, AWS, and GCP.
How to Read CIDR Quickly
CIDR notation tells you how many bits belong to the network portion of the address.
Examples:
/24= 24 network bits, 8 host bits/20= 20 network bits, 12 host bits/16= 16 network bits, 16 host bits
The smaller the prefix number:
- the larger the subnet
- the more total IP addresses it contains
The larger the prefix number:
- the smaller the subnet
- the fewer available host addresses it contains
Most Common Subnet Sizes in Practice
These are the prefixes most teams use regularly:
/24
- 256 total IPs
- 254 usable hosts
Very common in classic networking, but often too small for production Kubernetes clusters in shared-subnet models.
/23
- 512 total IPs
- 510 usable hosts
Often used as a safer starting point when /24 feels too tight.
/22
- 1024 total IPs
- 1022 usable hosts
A common production subnet size for Kubernetes worker nodes or application subnets with growth headroom.
/21
- 2048 total IPs
- 2046 usable hosts
A good fit when high pod density, multiple node pools, or future growth are likely.
/20
- 4096 total IPs
- 4094 usable hosts
Frequently used for larger pod ranges, GKE secondary ranges, or long-lived platform environments.
Cloud CIDR Cheat Sheet Note
Classic subnetting tables are useful, but cloud networking changes the usable count:
- Azure reserves 5 IPs per subnet
- AWS reserves 5 IPs per subnet
- GCP reserves 4 IPs per subnet
That means:
/24in Azure or AWS = 251 usable/24in GCP = 252 usable
This matters a lot when sizing:
- AKS worker subnets
- EKS node subnets
- internal load balancer subnets
- private endpoint or proxy-only subnets
For cloud-aware usable capacity, use:
CIDR Cheat Sheet for Kubernetes
CIDR sizing gets more complicated in Kubernetes because you may need to size:
- node subnet
- pod CIDR
- service CIDR
And the answer changes depending on how the cluster allocates pod IPs.
Shared-subnet models
Examples:
- AKS Azure CNI (flat)
- EKS with AWS VPC CNI
Pods and nodes consume addresses from the same subnet.
This is why /24 frequently fails in production clusters.
Separate pod CIDR models
Examples:
- AKS Overlay
- Kubenet
- ARO cluster network
Pods use a separate range, which reduces subnet pressure on the node subnet.
Secondary range models
Example:
- GKE VPC-native
Nodes, pods, and services may all use different ranges.
This is cleaner operationally, but still requires deliberate CIDR planning.
For Kubernetes-specific sizing:
Quick Rule of Thumb
If you are choosing between common subnet sizes:
/24= often too small for production Kubernetes/23= safer small production starting point/22= common practical baseline/21or larger = better for growth-heavy clusters
The exact answer still depends on:
- max pods per node
- autoscaler behavior
- cloud reserved IPs
- whether pods use the node subnet
Related Tools
- → CIDR to IP Range Calculator
- → Cloud Usable IP Calculator
- → Kubernetes Pod CIDR Calculator
- → Cloud Kubernetes Subnet Planner