IPv4 Subnet Mask Cheat Sheet: A Handy Guide

IPv4 Subnet Mask Cheat Sheet: A Handy Guide


IPv4 Subnet Mask Cheat Sheet

CIDR NotationSubnet MaskTotal SubnetsHosts per Subnet (usable)
/8255.0.0.0116,777,214
/9255.128.0.028,388,606
/10255.192.0.044,194,302
/11255.224.0.082,097,150
/12255.240.0.0161,048,574
/13255.248.0.032524,286
/14255.252.0.064262,142
/15255.254.0.0128131,070
/16255.255.0.025665,534
/17255.255.128.051232,766
/18255.255.192.01,02416,382
/19255.255.224.02,0488,190
/20255.255.240.04,0964,094
/21255.255.248.08,1922,046
/22255.255.252.016,3841,022
/23255.255.254.032,768510
/24255.255.255.065,536254
/25255.255.255.128131,072126
/26255.255.255.192262,14462
/27255.255.255.224524,28830
/28255.255.255.2401,048,57614
/29255.255.255.2482,097,1526
/30255.255.255.2524,194,3042
/31255.255.255.254Special UseSpecial Use
/32255.255.255.255Single HostSingle Host

Understanding IPv4 subnet masks is crucial for anyone working in networking or IT. Subnetting divides networks into smaller, more manageable sections, optimizing performance and security. This cheat sheet briefly references IPv4 subnet masks, their corresponding CIDR notation, total subnets, and the number of hosts available in each subnet. There are many of them out there, so I figured I would add one.

What is a Subnet Mask?

A subnet mask is a 32-bit number that separates the network and host portions of an IP address. The mask ensures that devices can determine whether an IP address belongs to the same network or a different one.

For example, an IP address of 192.168.1.1 with a subnet mask of 255.255.255.0 means the network part is 192.168.1 and the host part is .1.


CIDR Notation Explained

Classless Inter-Domain Routing (CIDR) is a shorthand for subnet masks. Instead of writing 255.255.255.0, CIDR uses a “/” followed by the number of bits set to 1 in the mask (e.g., /24).



Key Points to Remember

  1. Network ID and Broadcast Address: In any subnet, two addresses are reserved:
    • The network ID (first address in the range).
    • The broadcast address (last address in the range).
    This is why the number of usable hosts is always two less than the total addresses in the subnet.
  2. Subnetting Benefits:
    • Efficient IP address management.
    • Enhanced network security.
    • Reduced network traffic congestion.
  3. Choosing the Right Subnet Mask:
    • Use larger masks (e.g., /16 or /8) for networks with many devices.
    • Use smaller masks (e.g., /24 or /30) for tightly controlled environments, such as point-to-point links.

Practice Scenarios

  1. Scenario 1: You need 50 hosts per subnet. Which subnet mask should you use?
    • Answer: /26 (255.255.255.192), which provides 62 usable hosts.
  2. Scenario 2: You’re dividing a /16 network into 64 subnets. What will the new subnet mask be?
    • Answer: /22 (255.255.252.0), dividing the address space into 64 subnets.

Final Thoughts

Subnetting may seem daunting at first, but this cheat sheet simplifies the process. By understanding subnet masks and their implications, you can design efficient, scalable, and secure networks. Keep this guide handy for quick reference, and happy subnetting!

j2networks family of sites
https://j2sw.com
https://startawisp.info
https://indycolo.net
#packetsdownrange #routethelight