Subnet Mask Cheat Sheet

Technical Reference & CIDR Lookup Table

Subnet Reference Table

The subnet mask reference table provides a comprehensive overview of CIDR notation, subnet masks, and address counts. This subnet cheat sheet and CIDR calculator serves as an essential tool for network administrators to quickly identify network boundaries and host capacities. Use this subnet cheat sheet to perform quick subnet calculations and IP address lookups.

CIDRSubnet MaskTotal IPsUsableClass
/32255.255.255.25511Host
/31255.255.255.254221/1 C
/30255.255.255.252421/2 C
/29255.255.255.248861/4 C
/28255.255.255.24016141/8 C
/27255.255.255.22432301/16 C
/26255.255.255.19264621/32 C
/25255.255.255.1281281261/64 C
/24255.255.255.02562541 C
/23255.255.254.05125102 C
/22255.255.252.01,0241,0224 C
/21255.255.248.02,0482,0468 C
/20255.255.240.04,0964,09416 C
/19255.255.224.08,1928,19032 C
/18255.255.192.016,38416,38264 C
/17255.255.128.032,76832,766128 C
/16255.255.0.065,53665,5341 B
/15255.254.0.0131,072131,0702 B
/14255.252.0.0262,144262,1424 B
/13255.248.0.0524,288524,2868 B
/12255.240.0.01,048,5761,048,57416 B
/11255.224.0.02,097,1522,097,15032 B
/10255.192.0.04,194,3044,194,30264 B
/9255.128.0.08,388,6088,388,606128 B
/8255.0.0.016,777,21616,777,2141 A
/7254.0.0.033,554,43233,554,4302 A
/6252.0.0.067,108,86467,108,8624 A
/5248.0.0.0134,217,728134,217,7268 A
/4240.0.0.0268,435,456268,435,45416 A
/3224.0.0.0536,870,912536,870,91032 A
/2192.0.0.01,073,741,8241,073,741,82264 A
/1128.0.0.02,147,483,6482,147,483,646128 A
/00.0.0.04,294,967,2964,294,967,294Default

Calculation Logic

Total IPs: 2^(32 - prefix)

Usable Hosts: 2^(32 - prefix) - 2

* Usable formula usually excludes Network and Broadcast addresses. This subnet cheat sheet provides quick reference for these calculations.

Private Ranges (RFC 1918)

10.0.0.0 - 10.255.255.255 (/8)

172.16.0.0 - 172.31.255.255 (/12)

192.168.0.0 - 192.168.255.255 (/16)

Reference this subnet cheat sheet for private IP ranges.

Common Masks

/32Host
/30P2P
/24Class C
/16Class B
/8Class A
/0Default

Understanding Subnet Masks & CIDR

This subnet mask cheat sheet provides a comprehensive reference for network engineers working with IPv4 addressing. A subnet mask is a 32-bit number that masks an IP address and divides the IP address into network address and host address. It is used by the TCP/IP protocol to determine whether a host is on the local subnet or on a remote network. Whether you're calculating network ranges or configuring routing tables, this CIDR calculator and subnet cheat sheet offers quick access to essential subnetting information.

CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and IP routing. It was introduced in 1993 to replace the previous addressing architecture of Class A, Class B, and Class C networks. This CIDR calculator and subnet cheat sheet uses CIDR notation, which employs a slash followed by a number (e.g., /24) to represent the number of bits in the subnet mask. The subnet mask cheat sheet format allows engineers to quickly identify subnet boundaries and calculate available host addresses. This CIDR calculator simplifies complex subnet calculations for network professionals.

IPv4 Address Classes (Legacy)

Our CIDR calculator and subnet mask cheat sheet includes legacy classful addressing information for historical reference and compatibility purposes.

ClassRangeDefault Mask
Class A1.0.0.0 - 126.255.255.255255.0.0.0 (/8)
Class B128.0.0.0 - 191.255.255.255255.255.0.0 (/16)
Class C192.0.0.0 - 223.255.255.255255.255.255.0 (/24)

Classful addressing was the original method for allocating IP addresses before CIDR was introduced. Each class had a fixed default subnet mask, which led to inefficient address space utilization. Class A networks supported over 16 million hosts, Class B networks supported 65,534 hosts, and Class C networks supported 254 hosts. This subnet cheat sheet documents all classful addressing details for reference.

Modern networks use CIDR (Classless Inter-Domain Routing) instead, which allows for variable-length subnet masks and more efficient address allocation. However, understanding classful addressing remains important for legacy system compatibility and network troubleshooting. This CIDR calculator and subnet mask cheat sheet provides both classful and classless addressing information.

Wildcard Mask

A wildcard mask is essentially the inverse of a subnet mask. This CIDR calculator and subnet cheat sheet includes wildcard values for use in Access Control Lists (ACLs) and routing protocols like OSPF to specify which parts of an IP address should be examined for a match. To calculate it, subtract the subnet mask from 255.255.255.255. The subnet mask cheat sheet provides both subnet mask and wildcard mask values for all CIDR prefixes from /0 to /32.

The /31 Exception

According to RFC 3021, a 31-bit prefix is often used for point-to-point links. In a /31 subnet, only two addresses are available, and both are used as host addresses (no network or broadcast addresses), effectively doubling the address efficiency for router-to-router links. Our subnet mask cheat sheet documents this exception. When using this subnet cheat sheet for /31 networks, note that the usable host count differs from the standard -2 rule. This subnet cheat sheet provides accurate information for all edge cases.

Private IP Addresses

RFC 1918 defines three blocks of IP addresses for private, internal networks: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These addresses are not routable on the public internet. This CIDR calculator and subnet cheat sheet helps identify private address ranges. Network administrators frequently reference this CIDR calculator when designing internal network architectures using these private ranges.

Frequently Asked Questions About Subnet Mask Cheat Sheets

What is CIDR notation?

CIDR notation is a compact way to represent an IP address and its associated routing prefix. It consists of the IP address, a slash character ('/'), and a decimal number representing the count of leading continuous bits for the routing prefix. This CIDR calculator and subnet mask cheat sheet uses CIDR notation throughout. When using a CIDR calculator, CIDR notation provides the most efficient way to reference subnet configurations.

Why use /30 for point-to-point links?

Historically, /30 subnets were used for point-to-point connections because they provide 4 IP addresses: one for the network, one for the broadcast, and two for the host interfaces. This minimizes wasted IP space. Our subnet cheat sheet provides quick reference for these common configurations. The subnet mask cheat sheet clearly shows that /30 provides exactly 2 usable host addresses, ideal for router-to-router connections. This subnet cheat sheet is essential for network design planning.

What is the difference between /24 and 255.255.255.0?

There is no technical difference. /24 is the CIDR shorthand notation, while 255.255.255.0 is the dotted-decimal representation of the same 24-bit subnet mask. This subnet mask cheat sheet displays both formats for convenience. A comprehensive subnet cheat sheet should always include both CIDR and dotted-decimal formats to accommodate different network documentation standards. This subnet cheat sheet format ensures compatibility across various network tools and documentation systems.

How many usable hosts are in a /23?

A /23 subnet contains 512 total IP addresses. Subtracting the network and broadcast addresses leaves 510 usable host addresses. Use this subnet cheat sheet and CIDR calculator to quickly calculate host counts for any CIDR prefix. The subnet cheat sheet provides instant lookup for all 33 possible CIDR values, eliminating the need for manual calculations during network design.