Subnet Reference Table
CIDR | Subnet Mask | Subnet Mask (HEX) | # of IPs | Wildcard Mask | Host Bits | Class |
---|---|---|---|---|---|---|
/32 | 255.255.255.255 | FF.FF.FF.FF | 1 | 0.0.0.0 | 0 | Single Host |
/31 | 255.255.255.254 | FF.FF.FF.FE | 2 | 0.0.0.1 | 1 | 1/1 C |
/30 | 255.255.255.252 | FF.FF.FF.FC | 4 | 0.0.0.3 | 2 | 1/2 C |
/29 | 255.255.255.248 | FF.FF.FF.F8 | 8 | 0.0.0.7 | 3 | 1/4 C |
/28 | 255.255.255.240 | FF.FF.FF.F0 | 16 | 0.0.0.15 | 4 | 1/8 C |
/27 | 255.255.255.224 | FF.FF.FF.E0 | 32 | 0.0.0.31 | 5 | 1/16 C |
/26 | 255.255.255.192 | FF.FF.FF.C0 | 64 | 0.0.0.63 | 6 | 1/32 C |
/25 | 255.255.255.128 | FF.FF.FF.80 | 128 | 0.0.0.127 | 7 | 1/64 C |
/24 | 255.255.255.0 | FF.FF.FF.00 | 256 | 0.0.0.255 | 8 | 1 C |
/23 | 255.255.254.0 | FF.FF.FE.00 | 512 | 0.0.1.255 | 9 | 2 C |
/22 | 255.255.252.0 | FF.FF.FC.00 | 1,024 | 0.0.3.255 | 10 | 4 C |
/21 | 255.255.248.0 | FF.FF.F8.00 | 2,048 | 0.0.7.255 | 11 | 8 C |
/20 | 255.255.240.0 | FF.FF.F0.00 | 4,096 | 0.0.15.255 | 12 | 16 C |
/19 | 255.255.224.0 | FF.FF.E0.00 | 8,192 | 0.0.31.255 | 13 | 32 C |
/18 | 255.255.192.0 | FF.FF.C0.00 | 16,384 | 0.0.63.255 | 14 | 64 C |
/17 | 255.255.128.0 | FF.FF.80.00 | 32,768 | 0.0.127.255 | 15 | 128 C |
/16 | 255.255.0.0 | FF.FF.00.00 | 65,536 | 0.0.255.255 | 16 | 1 B |
/15 | 255.254.0.0 | FF.FE.00.00 | 131,072 | 0.1.255.255 | 17 | 2 B |
/14 | 255.252.0.0 | FF.FC.00.00 | 262,144 | 0.3.255.255 | 18 | 4 B |
/13 | 255.248.0.0 | FF.F8.00.00 | 524,288 | 0.7.255.255 | 19 | 8 B |
/12 | 255.240.0.0 | FF.F0.00.00 | 1,048,576 | 0.15.255.255 | 20 | 16 B |
/11 | 255.224.0.0 | FF.E0.00.00 | 2,097,152 | 0.31.255.255 | 21 | 32 B |
/10 | 255.192.0.0 | FF.C0.00.00 | 4,194,304 | 0.63.255.255 | 22 | 64 B |
/9 | 255.128.0.0 | FF.80.00.00 | 8,388,608 | 0.127.255.255 | 23 | 128 B |
/8 | 255.0.0.0 | FF.00.00.00 | 16,777,216 | 0.255.255.255 | 24 | 1 A |
/7 | 254.0.0.0 | FE.00.00.00 | 33,554,432 | 1.255.255.255 | 25 | 2 A |
/6 | 252.0.0.0 | FC.00.00.00 | 67,108,864 | 3.255.255.255 | 26 | 4 A |
/5 | 248.0.0.0 | F8.00.00.00 | 134,217,728 | 7.255.255.255 | 27 | 8 A |
/4 | 240.0.0.0 | F0.00.00.00 | 268,435,456 | 15.255.255.255 | 28 | 16 A |
/3 | 224.0.0.0 | E0.00.00.00 | 536,870,912 | 31.255.255.255 | 29 | 32 A |
/2 | 192.0.0.0 | C0.00.00.00 | 1,073,741,824 | 63.255.255.255 | 30 | 64 A |
/1 | 128.0.0.0 | 80.00.00.00 | 2,147,483,648 | 127.255.255.255 | 31 | 128 A |
/0 | 255.255.255.255 | FF.FF.FF.FF | 4,294,967,296 | 0.0.0.0 | 32 | Default Route |
Note: The number of usable IP addresses is typically 2 less than the total number of IP addresses shown in the table. This is because the first address (network address) and the last address (broadcast address) are reserved for network identification and broadcast communication respectively. For example, in a /24 subnet with 256 total addresses, only 254 addresses are available for host devices.
What is a Subnet Mask?
A subnet mask is a 32-bit number that divides an IP address into network and host portions. The subnet mask cheat sheet provides quick conversions between CIDR notation and traditional subnet mask format.
Understanding the Subnet Mask Cheat Sheet Table
CIDR Notation (/X)
CIDR (Classless Inter-Domain Routing) notation represents the number of bits used for the network portion of the IP address. For example, /24 means the first 24 bits are used for the network, leaving 8 bits for hosts. The subnet mask cheat sheet shows all possible CIDR values from /0 to /32.
Subnet Mask
The subnet mask is the traditional 32-bit number written in dotted decimal notation (e.g., 255.255.255.0). It defines which portion of an IP address belongs to the network and which belongs to the host. You can quickly convert between CIDR notation and subnet mask format using the subnet mask cheat sheet.
Subnet Mask (HEX)
The subnet mask in hexadecimal format provides an alternative representation of the subnet mask using base-16 notation. This format is often used in network programming, hexadecimal-based configurations, and when working with certain network devices that prefer hex notation. For example, a /24 subnet mask (255.255.255.0) is represented as FF.FF.FF.00 in hexadecimal.
Number of IP Addresses
This column shows the total number of IP addresses available in each subnet. For example, a /24 subnet provides 256 total addresses (254 usable for hosts, plus network and broadcast addresses). The subnet mask cheat sheet helps you quickly determine the size of your network.
Wildcard Mask
The wildcard mask is the inverse of the subnet mask and is commonly used in access control lists (ACLs) and routing protocols. It's calculated by subtracting the subnet mask from 255.255.255.255. The subnet mask cheat sheet includes these for quick reference.
Host Bits
This column indicates the number of bits available for host addressing within the subnet. For example, a /24 subnet has 8 host bits, allowing for 2^8 = 256 total addresses. The subnet mask cheat sheet helps you understand the addressing capacity of each subnet.
Class
The network class column shows the traditional IP address class system and how many networks of that class would fit within the given subnet. For example, a /24 subnet is equivalent to 1 Class C network, while a /16 subnet is equivalent to 256 Class C networks or 1 Class B network. This information helps network administrators understand the scale and scope of their subnetting decisions in terms of traditional class-based networking concepts.
Common Subnet Examples
Most Frequently Used Subnets
- /24 (255.255.255.0) - Standard Class C subnet with 256 addresses
- /16 (255.255.0.0) - Class B subnet with 65,536 addresses
- /8 (255.0.0.0) - Class A subnet with 16,777,216 addresses
- /30 (255.255.255.252) - Point-to-point links with 4 addresses (2 usable)
- /32 (255.255.255.255) - Single host route with 1 address
Subnet Mask Calculation
The formula for calculating subnet addresses is: 2^(32-CIDR) = number of addresses. For example, a /24 subnet has 2^(32-24) = 2^8 = 256 addresses.
Example: /24 subnet
2^(32-24) = 2^8 = 256 total addresses
256 - 2 = 254 usable addresses (minus network & broadcast)
References
This subnet mask cheat sheet is based on RFC 1878 - Variable Length Subnet Table For IPv4 (Pummill & Manning, 1995).