CIDR Cheat Sheet

Every prefix from /8 to /30 with its dotted-decimal mask, wildcard mask and usable host count. Highlighted rows are the masks the CCNA exam loves most.

CIDRSubnet maskWildcardUsable hosts/24 subnets
/8255.0.0.00.255.255.25516,777,2141
/9255.128.0.00.127.255.2558,388,606—
/10255.192.0.00.63.255.2554,194,302—
/11255.224.0.00.31.255.2552,097,150—
/12255.240.0.00.15.255.2551,048,574—
/13255.248.0.00.7.255.255524,286—
/14255.252.0.00.3.255.255262,142—
/15255.254.0.00.1.255.255131,070—
/16255.255.0.00.0.255.25565,534256
/17255.255.128.00.0.127.25532,766512
/18255.255.192.00.0.63.25516,3821,024
/19255.255.224.00.0.31.2558,1902,048
/20255.255.240.00.0.15.2554,0944,096
/21255.255.248.00.0.7.2552,0468,192
/22255.255.252.00.0.3.2551,02216,384
/23255.255.254.00.0.1.25551032,768
/24255.255.255.00.0.0.25525465,536
/25 ★255.255.255.1280.0.0.127126—
/26 ★255.255.255.1920.0.0.6362—
/27 ★255.255.255.2240.0.0.3130—
/28 ★255.255.255.2400.0.0.1514—
/29 ★255.255.255.2480.0.0.76—
/30 ★255.255.255.2520.0.0.32—

How to read it: usable hosts = 2^(32 − prefix) − 2 (network and broadcast addresses are reserved; /31 is the point-to-point exception with 2 usable). Wildcard = 255.255.255.255 minus the mask — it's what goes in ACLs and OSPF network statements. The ★ rows are the exam favourites: learn /26, /27 and /28 cold.

The 10-second conversions

Mask ↔ CIDR: count the 1-bits. Block size: 256 − interesting octet of the mask (e.g. /26 → 255.255.255.192 → 256−192 = 64 → subnets step by 64: .0, .64, .128, .192). Wildcard: interesting octet = block size − 1 (e.g. /26 → block size 64 → wildcard .63). Practice until it's reflex with our free subnetting drill.

Memorised the table? Prove it.

The free 25-question CCNA mock test hits subnetting hard — take it now and get your score in minutes.

Start the free mock test