/22 Subnet: Mask 255.255.252.0

A /22 is four /24s: 1,024 addresses. The third octet moves in steps of 4. It is a common size for an office floor or a Wi-Fi VLAN that outgrew a /24.

/22 at a glance

Subnet mask
255.255.252.0
Wildcard mask
0.0.3.255
Usable hosts
1,022
Total addresses
1,024 (210)
Block size (third octet)
4
Network / host bits
22 / 10
Mask in hex
0xFFFFFC00

Mask in binary: 11111111.11111111.11111100.00000000

Network bits Host bits

Try it: which /22 is an address in?

Network address
192.168.4.0/22
First usable host
192.168.4.1
Last usable host
192.168.7.254
Broadcast address
192.168.7.255
Next /22 starts at
192.168.8.0

How many /22 networks fit

How /22 relates to /8, /16 and /24 blocks
Parent block Relationship
/8 16,384 × /22 fit inside one /8
/16 64 × /22 fit inside one /16
/24 One /22 covers 4 × /24

A /22 holds 4 × /24. Four /22s make a /20.

Worked example: 192.168.6.31/22

An office moved from 192.168.4.0/24 to a /22 to fit more devices. A laptop at 192.168.6.31 can't reach the printer. Is it even in the same /22?

  1. The mask is 255.255.252.0. The third octet (252) is the "interesting" one — the first that is not 255.
  2. Block size = 256 − 252 = 4. Networks start at multiples of 4 in the third octet: 0, 4, 8, …
  3. The third octet of 192.168.6.31 is 6. 6 ÷ 4 = 1 remainder 2, so the block starts at 1 × 4 = 4.
  4. Network = 192.168.4.0 (octets after the third become 0). Broadcast = 4 + 4 − 1 = 7, giving 192.168.7.255 (octets after it become 255).
  5. Usable hosts: 192.168.4.1 to 192.168.7.254, which is 210 − 2 = 1,022 addresses.

Same thing in binary (network bits | host bits):

Address  11000000.10101000.000001|10.00011111
Mask     11111111.11111111.111111|00.00000000
Network  11000000.10101000.000001|00.00000000

Where /22 is used in real networks

  • Growing past a /24

    When a VLAN runs out of 254 addresses, widening it to a /22 is the usual fix, as long as the four /24s are free and aligned (192.168.4.0 to 192.168.7.255, not 192.168.3.0 to 192.168.6.255).

  • Public IPv4 allocations

    When RIPE NCC ran its "last /8" policy, each new LIR received a single /22 of IPv4. Many small ISPs and hosting companies still run on exactly one /22.

Common /22 mistakes

  • Writing 192.168.1.0/22. The third octet of a /22 must be a multiple of 4, so it is really 192.168.0.0/22 — which includes your old 192.168.0.x and 192.168.1.x networks.
  • Changing the mask on the router but not on statically addressed devices. A printer still on /24 thinks 192.168.6.31 is on another network and sends replies to the gateway.
  • Thinking 192.168.5.0 or 192.168.6.255 can't be used. Inside a /22 only 192.168.4.0 and 192.168.7.255 are reserved; the .0 and .255 in the middle are normal hosts.

/22 FAQ

How many hosts are in a /22?

1,022 usable: 2^10 = 1,024 addresses minus network and broadcast.

How many /24s are in a /22?

Four. A /22 has 2 more host bits than a /24, and 2^2 = 4, so a /22 such as 192.168.4.0/22 covers 192.168.4.x, .5.x, .6.x and .7.x.

What is the subnet mask for /22?

255.255.252.0. The first 22 bits are ones, which fills two octets with 255 and leaves 11111100 (252) in the third. The wildcard is 0.0.3.255.

Related tools