Subnet Cheat Sheet

Complete reference guide for CIDR notation, subnet masks, IP ranges, and private networks. Your essential quick reference for network engineering.

CIDR Notation Quick Reference

CIDR Subnet Mask Wildcard Mask Total IPs Usable IPs
/32 255.255.255.255 0.0.0.0 1 1
/31 255.255.255.254 0.0.0.1 2 2*
/30 255.255.255.252 0.0.0.3 4 2
/29 255.255.255.248 0.0.0.7 8 6
/28 255.255.255.240 0.0.0.15 16 14
/27 255.255.255.224 0.0.0.31 32 30
/26 255.255.255.192 0.0.0.63 64 62
/25 255.255.255.128 0.0.0.127 128 126
/24 255.255.255.0 0.0.0.255 256 254
/23 255.255.254.0 0.0.1.255 512 510
/22 255.255.252.0 0.0.3.255 1,024 1,022
/21 255.255.248.0 0.0.7.255 2,048 2,046
/20 255.255.240.0 0.0.15.255 4,096 4,094
/19 255.255.224.0 0.0.31.255 8,192 8,190
/18 255.255.192.0 0.0.63.255 16,384 16,382
/17 255.255.128.0 0.0.127.255 32,768 32,766
/16 255.255.0.0 0.0.255.255 65,536 65,534
/15 255.254.0.0 0.1.255.255 131,072 131,070
/14 255.252.0.0 0.3.255.255 262,144 262,142
/13 255.248.0.0 0.7.255.255 524,288 524,286
/12 255.240.0.0 0.15.255.255 1,048,576 1,048,574
/11 255.224.0.0 0.31.255.255 2,097,152 2,097,150
/10 255.192.0.0 0.63.255.255 4,194,304 4,194,302
/9 255.128.0.0 0.127.255.255 8,388,608 8,388,606
/8 255.0.0.0 0.255.255.255 16,777,216 16,777,214
Note: /31 networks (RFC 3021) can use both IPs for point-to-point links without network/broadcast addresses.

Private IP Address Ranges (RFC 1918)

Class CIDR Block IP Range Total IPs Typical Use
Class A 10.0.0.0/8 10.0.0.0 - 10.255.255.255 16,777,216 Large enterprises
Class B 172.16.0.0/12 172.16.0.0 - 172.31.255.255 1,048,576 Medium organizations
Class C 192.168.0.0/16 192.168.0.0 - 192.168.255.255 65,536 Home/small office

Special Use IP Addresses

CIDR Block Purpose RFC
0.0.0.0/8 Current network (only valid as source) RFC 1122
127.0.0.0/8 Loopback addresses RFC 1122
169.254.0.0/16 Link-local (APIPA) RFC 3927
192.0.0.0/24 IETF Protocol Assignments RFC 6890
192.0.2.0/24 Documentation (TEST-NET-1) RFC 5737
198.18.0.0/15 Benchmark testing RFC 2544
198.51.100.0/24 Documentation (TEST-NET-2) RFC 5737
203.0.113.0/24 Documentation (TEST-NET-3) RFC 5737
224.0.0.0/4 Multicast RFC 5771
240.0.0.0/4 Reserved for future use RFC 1112
255.255.255.255/32 Limited broadcast RFC 919

IPv6 Quick Reference

Prefix Purpose Scope
::/128 Unspecified address -
::1/128 Loopback Host
fe80::/10 Link-local unicast Link
fc00::/7 Unique local address (ULA) Site
2000::/3 Global unicast Global
ff00::/8 Multicast Various

Common Subnet Sizes

Hosts Needed CIDR Subnet Mask Usable IPs
2 /30 255.255.255.252 2
6 /29 255.255.255.248 6
14 /28 255.255.255.240 14
30 /27 255.255.255.224 30
62 /26 255.255.255.192 62
126 /25 255.255.255.128 126
254 /24 255.255.255.0 254
510 /23 255.255.254.0 510
1,022 /22 255.255.252.0 1,022

Quick Formulas

Number of Subnets: 2borrowed bits

Hosts per Subnet: 2host bits - 2

CIDR to Hosts: 2(32 - CIDR) - 2

Hosts to CIDR: 32 - log₂(hosts + 2)