The /21 prefix means the first 21 bits of the address identify the network and the remaining 11 identify the host. Written out, the mask is 255.255.248.0, in binary 11111111.11111111.11111000.00000000, and its Cisco wildcard or inverse form is 0.0.7.255. It covers 2,048 addresses, of which 2,046 can be given to hosts.
| CIDR prefix | /21 |
|---|---|
| Subnet mask | 255.255.248.0 |
| Mask in binary | 11111111.11111111.11111000.00000000 |
| Wildcard (inverse) mask | 0.0.7.255 |
| Host bits | 11 |
| Total addresses | 2,048 |
| Usable hosts | 2,046 |
| Block size (magic number) | 8 in octet 3 |
A 172.16.0.0/16 contains 32 subnets of /21. Here are the first 8, which is enough to see the pattern: each one starts 8 after the last in octet 3.
| 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 |
Take the interesting octet of the mask, the one that is neither 255 nor 0. For /21 that is 248 in octet 3. Subtract it from 256:
256 - 248 = 8
That is the block size. Every /21 network address is a multiple of 8 in octet 3, so you can list them by counting: 0, 8, 16, 24, and so on. No binary needed once you know the number.
A /21 gives 2,046 usable addresses. It is the size reached for when a wireless guest network or a large DHCP scope has outgrown a /22 and nobody wants to renumber again in a year.
A /21 holds 2,048 addresses in total. After reserving the network and broadcast addresses, 2,046 are usable by hosts.
The /21 subnet mask is 255.255.248.0 in dotted-decimal notation.
The wildcard mask, also called the inverse mask, is 0.0.7.255. It is the bitwise inverse of 255.255.248.0 and is what Cisco access lists and OSPF network statements expect.
The /21 mask written out bit by bit is 11111111.11111111.11111000.00000000: 21 ones followed by 11 zeros.