IP ADDRESSING

IPv4 Subnetting Without the Guesswork

A practical guide to network addresses, masks, usable ranges, broadcast addresses and choosing the right IPv4 subnet size.

IP addressing and CIDR illustration

Start with the boundary, not the dotted decimal

Subnetting becomes much easier once you think in terms of network bits and host bits. An IPv4 address is 32 bits. The prefix length tells you how many of those bits identify the network; the remainder identify addresses inside that network. A /24 therefore leaves eight host bits, while a /27 leaves five.

The dotted-decimal mask is simply another way to show that boundary. A /24 is 255.255.255.0. A /27 is 255.255.255.224. Engineers often memorize common masks, but the prefix is the more useful way to reason about route aggregation, ACLs and IPAM.

Network, broadcast and usable addresses

For traditional IPv4 subnets, the first address is the network identifier and the last is the broadcast address. Addresses between them are normally available to hosts. A 192.168.50.0/24 therefore runs from .0 through .255, with .1 through .254 traditionally usable.

The familiar “minus two” host rule has exceptions. /31 is commonly used on point-to-point links under RFC 3021, where both addresses can be used. /32 represents a single host route. Treat those as design cases rather than trying to force every prefix into the same host-count rule.

How to choose a subnet size

Choose the smallest prefix that meets the real host requirement with reasonable growth room. If a segment needs 50 endpoints, a /26 provides 64 total addresses and 62 traditional usable addresses. A /27 is too small because it provides only 30 usable addresses.

Avoid oversized subnets just because address space is available. Large broadcast domains can make troubleshooting noisier and consume more addresses than necessary. At the same time, leaving no growth room creates future renumbering work. The right answer balances capacity, segmentation, routing design and operational simplicity.

A repeatable field method

When you are handed an address such as 10.44.19.78/27, determine the block size first. A /27 creates blocks of 32 in the last octet: 0, 32, 64, 96 and so on. The address 78 falls in the 64–95 block, so the network is 10.44.19.64 and the broadcast is 10.44.19.95.

For larger prefixes that cross octet boundaries, a calculator reduces arithmetic mistakes. The important part is still understanding what the result means so you can recognize a bad route, incorrect gateway or overlapping allocation when you see one.

Common mistakes to catch during review

The most common mistakes are using the wrong prefix on one side of a link, assigning the network or broadcast address to a host, documenting a gateway outside the subnet, and assuming matching first three octets means two addresses are in the same network. None of those assumptions should survive a subnet calculation.

In change review, verify the IP, mask, peer or gateway, VRF context, route advertisement and any ACL or firewall statements together. An address can be mathematically valid and still be wrong for the service design.

← Back to all guidesBrowse network tools →
Use these guides as engineering references, not as a substitute for your network design standards, current vendor documentation or production change review.