๐Ÿฆ IP Animals
๐Ÿ“‹ References & Cheat Sheets

Subnetting Cheat Sheet (CIDR Table)

Every IPv4 prefix from /0 to /32 in one table โ€” subnet mask, wildcard mask, block size, total addresses and usable hosts. Filter to any prefix, and click a value to copy it.

CIDRSubnet maskWildcard maskBlock sizeTotal addressesUsable hosts

Subnetting is the art of slicing a block of IP addresses into smaller networks, and this table is the reference every network engineer keeps within reach. Each row is one CIDR prefix โ€” the /24 in 192.168.1.0/24 โ€” showing exactly how big that network is and what its mask looks like. Instead of doing the binary maths every time, you can just look it up.

The subnet mask marks which bits identify the network and which are free for hosts; a /24 is 255.255.255.0. The wildcard mask is its exact inverse (0.0.0.255), used in Cisco ACLs and OSPF. Total addresses is simply 2 to the power of the host bits, and usable hosts is that number minus 2 โ€” one address reserved for the network itself and one for broadcast.

๐Ÿงฎ The two special cases: /31 and /32

The "minus 2" rule breaks at the bottom. A /32 is a single host with no room for a network or broadcast address, so it counts as 1 usable. A /31 is reserved by RFC 3021 for point-to-point links where both addresses are usable, giving 2 hosts and no broadcast. The table reflects this.

The block size (sometimes called the magic number) is the increment between consecutive subnets in the interesting octet. For a /26 the block size is 64, so subnets begin at .0, .64, .128 and .192. Memorising the block sizes for /25 through /30 โ€” 128, 64, 32, 16, 8, 4 โ€” lets you carve up a network in your head, which is exactly what subnetting exams love to test.

If the concepts feel shaky, read What is a subnet mask? and What is an IP address? first. To crunch a specific network rather than read the table, use our Subnet Calculator or the IP-in-Subnet Checker.

Frequently asked questions

How do I calculate the number of hosts in a subnet?

Total addresses are 2 raised to the power of (32 minus the prefix length). Usable hosts are usually that total minus 2, because the first address is the network address and the last is the broadcast. A /24 has 2^8 = 256 addresses and 254 usable hosts.

Why do /31 and /32 not lose two addresses?

A /32 is a single host, so there is no network or broadcast to subtract. A /31 (RFC 3021) is for point-to-point links, where both addresses are usable and there is no separate broadcast โ€” so the sheet shows a /31 as 2 usable and a /32 as 1.

What is a wildcard mask?

A wildcard mask is the bitwise inverse of the subnet mask โ€” each octet is 255 minus the subnet-mask octet. A /24 mask of 255.255.255.0 has wildcard 0.0.0.255. Wildcard masks are used in Cisco ACLs and OSPF, where a 1 bit means "ignore this bit".

What does the block size (magic number) mean?

It is the increment between consecutive subnets in the interesting octet. For a /26 the block size is 64, so networks start at .0, .64, .128 and .192 โ€” the quickest way to find subnet boundaries in your head.

Want the theory? Read the guides โ†’ ยท Visit the zoo โ†’