Home IPv4 subnet /22
/22 subnet mask: how many hosts?
Answer
255.255.252.0 /22 · 1,022 usable hosts
A /22 prefix is the mask 255.255.252.0 . It leaves 10 host bits: 1,024 addresses in total and 1,022 usable hosts (network and broadcast excluded).
subnet4 · adjust the values
Copy result Copy link
Close-up of a network switch with ports and lights. Photo: Jonathan Castañeda / Unsplash
/22 at a glance Item Value Mask 255.255.252.0 Wildcard 0.0.3.255 Addresses 1,024 Usable hosts 1,022 Mask in binary 11111111.11111111.11111100.00000000Example network 172.16.0.0/22
Neighboring prefixes Prefix Mask Usable hosts /21 255.255.248.0 2,046 /22 255.255.252.0 1,022 /23 255.255.254.0 510
To work out another address with this prefix, change the IP in the calculator above: you get network, broadcast and range in binary.
Step by step Host bits: 32 − 22 = 10. Addresses: 210 = 1,024. Usable hosts: 1,024 − 2 (network and broadcast) = 1,022 . Octet 3 has 6 bits set: 256 − 4 = 252. Networks step by 4 in that octet. Example with 172.16.0.0/22 Item Address Network 172.16.0.0/22 First host 172.16.0.1 Last host 172.16.3.254 Broadcast 172.16.3.255
Nearby prefixes Prefix Mask Usable hosts /19 255.255.224.0 8,190 /20 255.255.240.0 4,094 /21 255.255.248.0 2,046 /22 255.255.252.0 1,022 /23 255.255.254.0 510 /24 255.255.255.0 254 /25 255.255.255.128 126
In practice A /22 contains 4 /24 networks of 254 hosts each: that is how many typical LANs fit in the block. Going from /22 to /21 doubles the block to 2,048 addresses (2,046 usable hosts); going to /23 halves it to 510 usable hosts.
To try other values, open the IPv4 subnet calculator with these numbers already filled in.
Frequently asked questions Why subtract 2 hosts? The first address identifies the network and the last is the broadcast; neither can be assigned to a device. On /31 links (RFC 3021) both are used.
How do I configure it on Cisco? With the dotted mask: ip address 192.168.10.1 255.255.252.0. ACLs and OSPF use the wildcard 0.0.3.255.