CIDR IPv4 Subnet Cheat Sheet

For number of addresses, I always used this formula:
32 – (cidr) = X
then 2^x = number of addresses
To get the number of hosts, subtract with 2 (network and subnet mask)

Example: (to get # of addresses and hosts of /24)
32 – 24 = 8
2^8 = 256 (total number of addresses)
256 -2 = 254 (total number of hosts)

CIDR Addresses Netmask Wildcard
/32 1 255.255.255.255 0.0.0.0
/31 2 255.255.255.254 0.0.0.1
/30 4 255.255.255.252 0.0.0.3
/29 8 255.255.255.248 0.0.0.7
/28 16 255.255.255.240 0.0.0.15
/27 32 255.255.255.224 0.0.0.31
/26 64 255.255.255.192 0.0.0.63
/25 128 255.255.255.128 0.0.0.127
/24 256 255.255.255.0 0.0.0.255
/23 512 255.255.254.0 0.0.1.255
/22 1,024 255.255.252.0 0.0.3.255
/21 2,048 255.255.248.0 0.0.7.255
/20 4,096 255.255.240.0 0.0.15.255
/19 8,192 255.255.224.0 0.0.31.255
/18 16,384 255.255.192.0 0.0.63.255
/17 32,768 255.255.128.0 0.0.127.255
/16 65,536 255.255.0.0 0.0.255.255
/15 131,072 255.254.0.0 0.1.255.255
/14 262,144 255.252.0.0 0.3.255.255
/13 524,288 255.248.0.0 0.7.255.255
/12 1,048,576 255.240.0.0 0.15.255.255
/11 2,097,152 255.224.0.0 0.31.255.255
/10 4,194,304 255.192.0.0 0.63.255.255
/9 8,388,608 255.128.0.0 0.127.255.255
/8 16,777,216 255.0.0.0 0.255.255.255
/7 33,554,432 254.0.0.0 1.255.255.255
/6 67,108,864 252.0.0.0 3.255.255.255
/5 134,217,728 248.0.0.0 7.255.255.255
/4 268,435,456 240.0.0.0 15.255.255.255
/3 536,870,912 224.0.0.0 31.255.255.255
/2 1,073,741,824 192.0.0.0 63.255.255.255
/1 2,147,483,648 128.0.0.0 127.255.255.255
/0 4,294,967,296 0.0.0.0 255.255.255.255

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *