/21 Subnet Mask ReferenceIPv4
Eight neighboring /24s summarized as one: mask <code>255.255.248.0</code>, 2,048 addresses. Operators like the /21 as a unit for handing out public space in politely aggregatable chunks.
/21 facts at a glance
- Subnet mask
- 255.255.248.0
- Wildcard mask
- 0.0.7.255
- Binary mask
- 11111111.11111111.11111000.00000000
- Total addresses
- 2,048
- Usable hosts
- 2,046 (excludes network & broadcast)
- Block size
- 2,048 addresses (211)
- Typical role
- Mid-size networks and ISP allocations
Example /21 networks
Three consecutive /21 blocks, starting at the /21 boundary that contains 198.51.100.0:
| Network | Usable range | Usable hosts |
|---|---|---|
| 198.51.96.0/21 | 198.51.96.1 – 198.51.103.254 | 2,046 |
| 198.51.104.0/21 | 198.51.104.1 – 198.51.111.254 | 2,046 |
| 198.51.112.0/21 | 198.51.112.1 – 198.51.119.254 | 2,046 |
How to calculate a /21 mask
A /21 mask sets the first 21 bits of a 32-bit number to 1 and leaves the remaining 11 bits as 0. In binary that reads 11111111.11111111.11111000.00000000, which converts to dotted decimal 255.255.248.0. Each block covers a contiguous run of 211 = 2,048 addresses, and every block starts at a multiple of that size. The wildcard simply flips every bit, giving 0.0.7.255.
Where /21 is used
- ISP customer blocks that fold back into one upstream announcement.
- Mid-size sites needing several VLANs under a single allocation.
- Compact public ranges for hosting clusters.
Documentation landmark: TEST-NET-3, <code>203.0.113.0/24</code> from RFC 5737, sits inside the aligned block <code>203.0.112.0/21</code>.
Frequently asked questions
What is the subnet mask for /21?
<code>255.255.248.0</code>, wildcard <code>0.0.7.255</code>.
How many addresses are in a /21?
2,048 total and 2,046 usable after the standard two-address deduction.
How many /24s are in a /21?
Eight; the third octet steps through multiples of eight within the block.
Open this block in a calculator
Open the /21 block in the subnet calculator