Say goodbye to your legacy VPNMake the switch to Tailscale
Get started - it's free!
Login
WireGuard is a registered trademark of Jason A. Donenfeld.
© 2025 Tailscale Inc. All rights reserved. Tailscale is a registered trademark of Tailscale Inc.
Go back

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 provides a quick reference for understanding subnet masks, addressing ranges, and CIDR notations. This guide explains key concepts related to subnetting and includes both IPv4 and IPv6 cheat sheets to simplify these tasks.

For additional technical details, consult RFC 1878, the authoritative guide to IPv4 subnetting.

What is a subnet?

A subnet, or subnetwork, is a segment of a larger network. It allows network administrators 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?

[Watch] What are subnet routers: Tailscale Explained

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. 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.

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.

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.

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.

[Blog] Subnet routers: How do they work?

[Docs] Subnet routers

[Guide] Configure a subnet router

How Tailscale can help

Tailscale is a 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.

Try Tailscale for free

Schedule a demo
Contact sales
cta phone
mercury
instacrt
Retool
duolingo
Hugging Face