Ultimate Subnet Mask Cheat Sheets
A subnet mask cheat sheet simplifies the process of subnetting and ensures efficient use of IP address spaces. Whether working with IPv4 or IPv6, these tools enhance productivity and accuracy in network design and troubleshooting.
A subnet mask cheat sheet simplifies the process of subnetting and ensures efficient use of IP address spaces. The cheat sheets provide a quick reference for understanding subnet masks, addressing ranges, and CIDR notations. This guide explains key concepts related to subnetting and includes an IPv4 cheat sheet and IPv6 cheat sheet to simplify these tasks.
For additional technical details, consult RFC 1878, the authoritative guide to IPv4 subnetting.
Jump to the Cheat Sheets
What is a subnet?
A subnet, or subnetwork, is a segment of a larger network. It allows network admins to organize and manage IP addresses efficiently by dividing a network into smaller parts. Subnetting improves routing efficiency, enhances security, and conserves IP addresses.
Related resource: [Video] What are subnet routers?
What is a subnet mask?
The subnet mask is a 32-bit number that resembles an IP address, distinguishing the network portion of an IP address from its host portion. A binary subnet mask is the representation of the subnet mask in binary form, which helps in identifying the network and host bits in an IP address.
By “masking” bits, it reveals which part of the IP address identifies the network and which part identifies the device.
What is a subnet mask cheat sheet?
A subnet mask cheat sheet is a reference tool used by network administrators to simplify subnetting tasks. It lists subnet masks, Classless Inter-Domain Routing (CIDR) notations, and their corresponding address ranges, available hosts, and wildcard masks.
With this cheat sheet, IT professionals can easily determine the number of usable addresses and the division of networks.
The cheat sheet also includes various subnet mask values, which are essential for determining the address ranges of usable IP addresses within a network.
What are IPv4 addresses?
IPv4 (Internet Protocol version 4) addresses are 32-bit numerical labels assigned to devices on a network. They use the dot-decimal format (e.g., 192.168.1.1) and support approximately 4.3 billion unique addresses.
Subnetting is essential in IPv4 networks due to the limited address space. Each class of IPv4 addresses has a default subnet mask that defines the size of the subnetwork and the number of usable addresses.
What are IPv6 addresses?
IPv6 (Internet Protocol version 6) addresses are the successor to IPv4. They are 128-bit addresses written in hexadecimal format (e.g., 2001:0db8::1) and offer a vastly expanded address pool.
IPv6 supports advanced features like improved routing and built-in security, making it suitable for modern networking.
Understanding IP Addresses
IP addresses are unique numerical labels assigned to devices on a network, enabling them to communicate with each other over the internet or a local network. Typically written in dotted decimal notation, an IP address consists of four numbers separated by dots, such as 192.168.1.1. Each number, or octet, can range from 0 to 255, allowing for a total of 4,294,967,296 possible unique IP addresses. This structure ensures that each device on a network has a unique IP address, facilitating accurate data transmission and network management.
Subnetting Fundamentals
Subnetting is the process of dividing a network into smaller, more manageable subnetworks, or subnets. This technique enhances network efficiency, security, and scalability by optimizing the use of IP addresses. Subnetting involves breaking down the host portion of an IP address into smaller segments, allowing for a more efficient allocation of IP addresses. By creating a hierarchical structure of subnets, network administrators can better manage and secure their networks, ensuring that each subnet operates smoothly and efficiently.
Subnet Masks and CIDR Notation
A subnet mask is a 32-bit number used to divide an IP address into its network and host parts. By applying the subnet mask, network administrators can determine which portion of the IP address identifies the network and which part identifies the host. CIDR (Classless Inter-Domain Routing) notation simplifies this process by representing the subnet mask as a prefix length (e.g., /24). This notation helps determine the number of available IP addresses in a network, making it easier to plan and manage IP address allocation.
Reserved and Private IP Addresses
Reserved IP addresses are specific ranges of IP addresses that are not assigned to any particular device or network. Examples include 0.0.0.0/8, 10.0.0.0/8, and 127.0.0.0/8. These addresses serve special purposes, such as network identification and loopback testing.
Private IP addresses, on the other hand, are used within private networks and are not routable on the public internet. The ranges for private IPv4 addresses include 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These addresses enable devices within a local network to communicate without conflicting with public IP addresses, ensuring network security and efficient IP address management.
Subnet Mask Cheat Sheet
See also RFC 1878.
CIDR | Addresses | Hosts | Netmask | Amount of a Class C |
---|---|---|---|---|
/30 | 4 | 2 | 255.255.255.252 | 1/64 |
/29 | 8 | 6 | 255.255.255.248 | 1/32 |
/28 | 16 | 14 | 255.255.255.240 | 1/16 |
/27 | 32 | 30 | 255.255.255.224 | 1/8 |
/26 | 64 | 62 | 255.255.255.192 | 1/4 |
/25 | 128 | 126 | 255.255.255.128 | 1/2 |
/24 | 256 | 254 | 255.255.255.0 | 1 |
/23 | 512 | 510 | 255.255.254.0 | 2 |
/22 | 1024 | 1022 | 255.255.252.0 | 4 |
/21 | 2048 | 2046 | 255.255.248.0 | 8 |
/20 | 4096 | 4094 | 255.255.240.0 | 16 |
/19 | 8192 | 8190 | 255.255.224.0 | 32 |
/18 | 16384 | 16382 | 255.255.192.0 | 64 |
/17 | 32768 | 32766 | 255.255.128.0 | 128 |
/16 | 65536 | 65534 | 255.255.0.0 | 256 |
IPv4 subnet mask cheat sheet
The following table provides a quick reference for IPv4 subnet masks, their CIDR notation, the number of usable host addresses, and wildcard masks.
CIDR | Subnet Mask | # of Addresses | Usable Hosts | Wildcard Mask |
---|---|---|---|---|
/32 | 255.255.255.255 | 1 | 0 | 0.0.0.0 |
/31 | 255.255.255.254 | 2 | 0 | 0.0.0.1 |
/30 | 255.255.255.252 | 4 | 2 | 0.0.0.3 |
/29 | 255.255.255.248 | 8 | 6 | 0.0.0.7 |
/28 | 255.255.255.240 | 16 | 14 | 0.0.0.15 |
/27 | 255.255.255.224 | 32 | 30 | 0.0.0.31 |
/26 | 255.255.255.192 | 64 | 62 | 0.0.0.63 |
/25 | 255.255.255.128 | 128 | 126 | 0.0.0.127 |
/24 | 255.255.255.0 | 256 | 254 | 0.0.0.255 |
/23 | 255.255.254.0 | 512 | 510 | 0.0.1.255 |
/22 | 255.255.252.0 | 1,024 | 1,022 | 0.0.3.255 |
/21 | 255.255.248.0 | 2,048 | 2,046 | 0.0.7.255 |
/20 | 255.255.240.0 | 4,096 | 4,094 | 0.0.15.255 |
IPv6 subnet cheat sheet
IPv6 networks offer a vastly larger address space. The following table provides a reference for IPv6 prefix lengths and address counts:
Prefix Length | # of Subnets | Addresses per Subnet |
---|---|---|
/48 | 1 | 1.2 septillion |
/56 | 256 | 4.7 quadrillion |
/64 | 65,536 | 18 quintillion |
/127 | 340 undecillion | 1 |
IPv6 cheat sheets are designed for large-scale networks. For detailed planning, refer to official resources like the IPv6 Subnetting Guide.
Related Subnet Resources
[Blog] Subnet routers: How do they work?
[Docs] Subnet routers
[Guide] Configure a subnet router
How Tailscale can help
Tailscale is a peer-to-peer mesh VPN alternative that streamlines connecting devices and services securely across different networks. Using the Wireguard protocol, it enables point-to-point connections so only devices on your private network are able to communicate with each other.
Understand who we built Tailscale for in this article, and watch how easy it is to get started with Tailscale for free in this quick start guide.