/21 · 255.255.248.0
Open in the calculator
2,048 addresses, eight /24s. A comfortable size for a subnet hosting a node pool that autoscales into the hundreds.
Key numbers
| Prefix length | /21 (21 network bits, 11 host bits) |
| Subnet mask | 255.255.248.0 |
| Mask in binary | 11111111.11111111.11111000.00000000 |
| Wildcard mask | 0.0.7.255 |
| Total addresses | 2,048 |
| Usable hosts | 2,046 (total minus network and broadcast) |
| Contains | 8 × /24 networks |
| Block size | Increments of 8 in octet 3 |
Example ranges
Private (RFC 1918) blocks of this size. Click one to open it in the calculator.
| Block | First address | Last address | Usable hosts |
|---|---|---|---|
| 10.0.0.0/21 | 10.0.0.0 | 10.0.7.255 | 10.0.0.1 – 10.0.7.254 |
| 172.16.0.0/21 | 172.16.0.0 | 172.16.7.255 | 172.16.0.1 – 172.16.7.254 |
| 192.168.0.0/21 | 192.168.0.0 | 192.168.7.255 | 192.168.0.1 – 192.168.7.254 |
Usable addresses in the cloud
Cloud providers reserve a few addresses in every subnet for the router, DNS and future use, so the usable count is lower than the formula gives.
| Provider | Usable in a /21 | Notes |
|---|---|---|
| AWS VPC subnet | 2,043 | Allowed (/16 to /28). AWS reserves the first four addresses and the last one. |
| Azure virtual network subnet | 2,043 | Allowed. Azure reserves the first four addresses and the last one. |
| Google Cloud subnet | 2,044 | Allowed. Google Cloud reserves the first two and the last two addresses. |
How the numbers are derived
An IPv4 address has 32 bits. A /21 uses 21 of them for the network, leaving 11 host bits, so the block has 211 = 2,048 addresses. The first address (all host bits 0) is the network address and the last (all host bits 1) is the broadcast address, which leaves 2,046 for hosts. The subnet mask is 21 ones followed by 11 zeros, written in dotted decimal as 255.255.248.0; the wildcard mask 0.0.7.255 is its inverse, used in Cisco ACLs and OSPF configuration.
FAQ
How many hosts can a /21 have?
2,048 addresses in total, of which 2,046 are usable after removing the network and broadcast addresses. Cloud providers reserve a few more: 2,043 usable in AWS and Azure, 2,044 in Google Cloud.
How many /24 subnets fit in a /21?
8. Each step of the prefix length halves or doubles the block, so a /21 contains 2^(24 − 21) = 8 networks of /24 size.