/21 subnet mask (255.255.248.0)
A /21 is the subnet mask 255.255.248.0: 21 network bits and 11 host bits, giving 2,048 addresses and 2,046 usable hosts. Its wildcard mask is 0.0.7.255 and its block size is 8.
- Subnet mask
- 255.255.248.0
- Wildcard
- 0.0.7.255
- Addresses
- 2,048
- Usable hosts
- 2,046
- Block size
- 8
The /21 mask in binary
The prefix is the number of 1 bits at the start of the mask. Ones mark the network part of an address, zeros the host part.
11111111.11111111.11111000.00000000
21 network bits, 11 host bits.
Every /21 in 172.16.0.0/16
A /16 holds 32 /21 subnets, each starting where the previous one ends.
| Network | First host | Last host | Broadcast |
|---|---|---|---|
| 172.16.0.0/21 | 172.16.0.1 | 172.16.7.254 | 172.16.7.255 |
| 172.16.8.0/21 | 172.16.8.1 | 172.16.15.254 | 172.16.15.255 |
| 172.16.16.0/21 | 172.16.16.1 | 172.16.23.254 | 172.16.23.255 |
| 172.16.24.0/21 | 172.16.24.1 | 172.16.31.254 | 172.16.31.255 |
| 172.16.32.0/21 | 172.16.32.1 | 172.16.39.254 | 172.16.39.255 |
| 172.16.40.0/21 | 172.16.40.1 | 172.16.47.254 | 172.16.47.255 |
| 172.16.48.0/21 | 172.16.48.1 | 172.16.55.254 | 172.16.55.255 |
| 172.16.56.0/21 | 172.16.56.1 | 172.16.63.254 | 172.16.63.255 |
| 172.16.64.0/21 | 172.16.64.1 | 172.16.71.254 | 172.16.71.255 |
| 172.16.72.0/21 | 172.16.72.1 | 172.16.79.254 | 172.16.79.255 |
| 172.16.80.0/21 | 172.16.80.1 | 172.16.87.254 | 172.16.87.255 |
| 172.16.88.0/21 | 172.16.88.1 | 172.16.95.254 | 172.16.95.255 |
| 172.16.96.0/21 | 172.16.96.1 | 172.16.103.254 | 172.16.103.255 |
| 172.16.104.0/21 | 172.16.104.1 | 172.16.111.254 | 172.16.111.255 |
| 172.16.112.0/21 | 172.16.112.1 | 172.16.119.254 | 172.16.119.255 |
| 172.16.120.0/21 | 172.16.120.1 | 172.16.127.254 | 172.16.127.255 |
| 172.16.128.0/21 | 172.16.128.1 | 172.16.135.254 | 172.16.135.255 |
| 172.16.136.0/21 | 172.16.136.1 | 172.16.143.254 | 172.16.143.255 |
| 172.16.144.0/21 | 172.16.144.1 | 172.16.151.254 | 172.16.151.255 |
| 172.16.152.0/21 | 172.16.152.1 | 172.16.159.254 | 172.16.159.255 |
| 172.16.160.0/21 | 172.16.160.1 | 172.16.167.254 | 172.16.167.255 |
| 172.16.168.0/21 | 172.16.168.1 | 172.16.175.254 | 172.16.175.255 |
| 172.16.176.0/21 | 172.16.176.1 | 172.16.183.254 | 172.16.183.255 |
| 172.16.184.0/21 | 172.16.184.1 | 172.16.191.254 | 172.16.191.255 |
| 172.16.192.0/21 | 172.16.192.1 | 172.16.199.254 | 172.16.199.255 |
| 172.16.200.0/21 | 172.16.200.1 | 172.16.207.254 | 172.16.207.255 |
| 172.16.208.0/21 | 172.16.208.1 | 172.16.215.254 | 172.16.215.255 |
| 172.16.216.0/21 | 172.16.216.1 | 172.16.223.254 | 172.16.223.255 |
| 172.16.224.0/21 | 172.16.224.1 | 172.16.231.254 | 172.16.231.255 |
| 172.16.232.0/21 | 172.16.232.1 | 172.16.239.254 | 172.16.239.255 |
| 172.16.240.0/21 | 172.16.240.1 | 172.16.247.254 | 172.16.247.255 |
| 172.16.248.0/21 | 172.16.248.1 | 172.16.255.254 | 172.16.255.255 |
Where a /21 is used
A /21 covers eight consecutive /24 networks, so it is the summary route for a site that has been given eight class C sized blocks.
It is also a common size for a large user or wireless network that has outgrown a /22, at 2,046 usable hosts.
| Where | Usable addresses |
|---|---|
| Ordinary network | 2,046 |
| AWS VPC subnet (5 reserved) | 2,043 |
| Azure subnet (5 reserved) | 2,043 |
Worked example: 172.16.45.9/21
The block-size method, the way you would do it in an exam without a calculator.
- /21 means a mask of 255.255.248.0.
- The interesting octet is the third one, where the mask is 248. Block size = 256 − 248 = 8.
- Subnets in that octet start at multiples of 8. 45 falls in the block from 40 to 47.
- Network address = 172.16.40.0; broadcast = the next block minus one = 172.16.47.255.
- Usable hosts run from the network plus one to the broadcast minus one: 172.16.40.1 to 172.16.47.254, which is 2^11 − 2 = 2,046 addresses.
Try another address in the subnet calculator, or practise without one on the subnetting practice questions.