/22 subnet
A /22 has a subnet mask of 255.255.252.0 and 1,022 usable hosts.
The numbers
| Prefix length | /22 |
| Subnet mask | 255.255.252.0 |
| Wildcard mask | 0.0.3.255 |
| Network bits | 22 |
| Host bits | 10 |
| Total addresses | 1,024 |
| Usable hosts | 1,022 |
| /24 networks contained | 4 |
Where a /22 is used
Four /24s worth — 1,022 hosts. A common allocation for a medium office and the smallest block an ISP will usually route to a customer.
Why the usable count is what it is
A /22 leaves 10 bits for hosts, giving 210 = 1,024 addresses. Two of those cannot be assigned to a machine: the one with all host bits set to zero is the network address, which names the subnet itself, and the one with all host bits set to one is the broadcast address. That leaves 1,022.
Binary layout
mask 11111111.11111111.11111100.00000000
^^^^^^^^^^^^^^^^^^^^^^
22 network bits, 10 host bits
Splitting and combining
| Prefix | Usable hosts | Relationship | |
|---|---|---|---|
| Twice the size | /21 | 2,046 | Two /22 networks combine into one /21 |
| This network | /22 | 1,022 | — |
| Half the size | /23 | 510 | One /22 splits into two /23 networks |
| A quarter | /24 | 254 | Four /24 networks fit in a /22 |
Frequently asked questions
How many hosts are in a /22?
1,024 addresses in total, of which 1,022 are usable. The first is the network address and the last is the broadcast address, so two are always lost.
What is the subnet mask for /22?
255.255.252.0. The prefix length is the count of leading 1 bits in the mask, so /22 is 22 ones followed by 10 zeros.
What is the wildcard mask for /22?
0.0.3.255 — the bitwise inverse of the subnet mask. Cisco access lists and OSPF network statements take the wildcard rather than the mask; a zero bit must match and a one bit is ignored.
How does a /22 compare to a /24?
A /22 is 4 times larger than a /24 — it contains 4 of them.