Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IPv4 Subnetting Cheat Sheet

Subnetting is one of the most fundamental yet challenging concepts in networking. This cheat sheet provides quick references to help you master IPv4 subnetting for certifications, administration, and network design.


IPv4 Subnets

Subnetting allows a host to determine if the destination machine is local or remote. The subnet mask determines how many IPv4 addresses are assignable within a network.

CIDRSubnet Mask# of AddressesWildcard
/32255.255.255.25510.0.0.0
/31255.255.255.25420.0.0.1
/30255.255.255.25240.0.0.3
/29255.255.255.24880.0.0.7
/28255.255.255.240160.0.0.15
/27255.255.255.224320.0.0.31
/26255.255.255.192640.0.0.63
/25255.255.255.1281280.0.0.127
/24255.255.255.02560.0.0.255
/23255.255.254.05120.0.1.255
/22255.255.252.010240.0.3.255
/21255.255.248.02,0480.0.7.255
/20255.255.240.04,0960.0.15.255
/19255.255.224.08,1920.0.31.255
/18255.255.192.016,3840.0.63.255
/17255.255.128.032,7680.0.127.255
/16255.255.0.065,5360.0.255.255
/15255.254.0.0131,0720.1.255.255
/14255.252.0.0262,1440.3.255.255
/13255.248.0.0524,2880.7.255.255
/12255.240.0.01,048,5760.15.255.255
/11255.224.0.02,097,1520.31.255.255
/10255.192.0.04,194,3040.63.255.255
/9255.128.0.08,388,6080.127.255.255
/8255.0.0.016,777,2160.255.255.255
/7254.0.0.033,554,4321.255.255.255
/6252.0.0.067,108,8643.255.255.255
/5248.0.0.0134,217,7287.255.255.255
/4240.0.0.0268,435,45615.255.255.255
/3224.0.0.0536,870,91231.255.255.255
/2192.0.0.01,073,741,82463.255.255.255
/1128.0.0.02,147,483,648127.255.255.255
/00.0.0.04,294,967,296255.255.255.255

Decimal to Binary Conversion

IPv4 addresses are actually 32-bit binary numbers. Subnet masks in binary show which part is the network and which part is the host.

Subnet MaskBinaryWildcardBinary Wildcard
2551111 111100000 0000
2541111 111010000 0001
2521111 110030000 0011
2481111 100070000 0111
2401111 0000150000 1111
2241110 0000310001 1111
1921100 0000630011 1111
1281000 00001270111 1111
00000 00002551111 1111

Why Learn Binary?

  • 1 = Network portion
  • 0 = Host portion
  • Subnet masks must have all ones followed by all zeros.

Example: A /24 (255.255.255.0) subnet reserves 24 bits for network and 8 bits for hosts → 254 usable IPs.

/28 Example: If ISP gives 199.44.6.80/28, you calculate host addresses by binary increments → usable range = .81 - .94.


IPv4 Address Classes

ClassRange
A0.0.0.0 – 127.255.255.255
B128.0.0.0 – 191.255.255.255
C192.0.0.0 – 223.255.255.255
D224.0.0.0 – 239.255.255.255
E240.0.0.0 – 255.255.255.255

Reserved (Private) Ranges

Range TypeIP Range
Class A10.0.0.0 – 10.255.255.255
Class B172.16.0.0 – 172.31.255.255
Class C192.168.0.0 – 192.168.255.255
Localhost127.0.0.0 – 127.255.255.255
Zeroconf (APIPA)169.254.0.0 – 169.254.255.255

Key Terminology

  • Wildcard Mask: Indicates available address bits for matching.
  • CIDR: Classless Inter-Domain Routing, uses /XX notation.
  • Network Portion: Fixed part of IP determined by subnet mask.
  • Host Portion: Variable part of IP usable for devices.

Conclusion

IPv4 subnetting can seem complex, but with practice and binary understanding, it becomes second nature. Keep this sheet handy for quick reference during exams, troubleshooting, or design work.