EVERGREEN REFERENCE GUIDE

IPv4 Subnetting Cheat Sheet

A practical, reusable reference for CIDR notation, subnet masks, usable hosts, and planning smaller networks.

What does a CIDR prefix mean?

IPv4 addresses contain 32 bits. In CIDR notation, the number following the slash tells you how many leading bits identify the network. For example, 192.168.10.0/24 uses 24 network bits and has eight bits available for addresses inside that network. Because there are two choices per bit, a /24 contains 28, or 256, total addresses.

For a traditional IPv4 LAN, the all-zero host portion identifies the network, and the all-one host portion is the directed broadcast address. That leaves 254 typically assignable device addresses in a /24. There are important exceptions: a /31 can support two endpoints on a point-to-point link, and a /32 identifies one address.

Useful CIDR subnet table

CIDRSubnet maskTotal addressesTraditional usable hosts
/22255.255.252.01,0241,022
/23255.255.254.0512510
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242

How to calculate a network boundary

Suppose a device has address 192.168.10.135/26. A /26 contains 64 addresses per block, so the boundaries in the last octet are 0, 64, 128, and 192. The device belongs to 192.168.10.128/26. That block ends at 192.168.10.191, with the traditional LAN host range from .129 through .190.

You can also compute the network by a bitwise AND between the address and the subnet mask. The wildcard mask is the inverse of the subnet mask; a /26 wildcard is 0.0.0.63.

Planning networks with VLSM

Variable-Length Subnet Masking (VLSM) allows multiple different-sized subnets inside a single allocation. Design from the largest segment to the smallest. A group needing 120 addresses generally needs a /25 (126 traditional usable hosts). A group needing 60 addresses fits in a /26 (62 hosts). A group of 28 fits a /27 (30 hosts). Remember to include gateways, printers, network appliances, and room for growth when sizing requirements.

What to verify before applying a plan

Make sure networks do not overlap, routing and firewall rules recognize the intended subnet, DHCP scopes exclude infrastructure addresses, and the plan avoids existing VPN, cloud, and remote-office networks. Use a subnet allocation worksheet or the tools below to check your math.