The /22 prefix means the first 22 bits of the address identify the network and the remaining 10 identify the host. Written out, the mask is 255.255.252.0, in binary 11111111.11111111.11111100.00000000, and its Cisco wildcard or inverse form is 0.0.3.255. It covers 1,024 addresses, of which 1,022 can be given to hosts.
| CIDR prefix | /22 |
|---|---|
| Subnet mask | 255.255.252.0 |
| Mask in binary | 11111111.11111111.11111100.00000000 |
| Wildcard (inverse) mask | 0.0.3.255 |
| Host bits | 10 |
| Total addresses | 1,024 |
| Usable hosts | 1,022 |
| Block size (magic number) | 4 in octet 3 |
A 172.16.0.0/16 contains 64 subnets of /22. Here are the first 8, which is enough to see the pattern: each one starts 4 after the last in octet 3.
| Network | First host | Last host | Broadcast |
|---|---|---|---|
| 172.16.0.0/22 | 172.16.0.1 | 172.16.3.254 | 172.16.3.255 |
| 172.16.4.0/22 | 172.16.4.1 | 172.16.7.254 | 172.16.7.255 |
| 172.16.8.0/22 | 172.16.8.1 | 172.16.11.254 | 172.16.11.255 |
| 172.16.12.0/22 | 172.16.12.1 | 172.16.15.254 | 172.16.15.255 |
| 172.16.16.0/22 | 172.16.16.1 | 172.16.19.254 | 172.16.19.255 |
| 172.16.20.0/22 | 172.16.20.1 | 172.16.23.254 | 172.16.23.255 |
| 172.16.24.0/22 | 172.16.24.1 | 172.16.27.254 | 172.16.27.255 |
| 172.16.28.0/22 | 172.16.28.1 | 172.16.31.254 | 172.16.31.255 |
Take the interesting octet of the mask, the one that is neither 255 nor 0. For /22 that is 252 in octet 3. Subtract it from 256:
256 - 252 = 4
That is the block size. Every /22 network address is a multiple of 4 in octet 3, so you can list them by counting: 0, 4, 8, 12, and so on. No binary needed once you know the number.
A /22 covers 1,022 usable addresses, four consecutive /24s. It is the standard answer for a busy flat wireless network, and a frequent size for a cloud subnet that needs room for autoscaling.
A /22 holds 1,024 addresses in total. After reserving the network and broadcast addresses, 1,022 are usable by hosts.
The /22 subnet mask is 255.255.252.0 in dotted-decimal notation.
The wildcard mask, also called the inverse mask, is 0.0.3.255. It is the bitwise inverse of 255.255.252.0 and is what Cisco access lists and OSPF network statements expect.
The /22 mask written out bit by bit is 11111111.11111111.11111100.00000000: 22 ones followed by 10 zeros.