← Field Guide

01 / THE PREFIX · 4 MIN READ

Read a CIDR with Confidence.

A CIDR is an address plus a slash and a prefix length. The prefix tells you where the network portion ends.

The Boundary Is in the Bits

An IPv4 address contains 32 bits. In a /26, 26 identify the network and 6 remain for addresses within it. Those 6 bits describe 64 combinations. A larger prefix number creates a smaller block: /27 has half as many addresses as /26.

The network address clears the host bits to zero. The inclusive end sets those same bits to one. The calculator’s colored cells show the entered address, so a host portion may contain both zeros and ones.

Work Through 192.0.2.77/26

FieldValueInterpretation
Normalized network192.0.2.64/26The containing block starts at .64, not .77.
Inclusive range192.0.2.64–192.0.2.127All 64 addresses in the block.
Subnet mask255.255.255.19226 one bits followed by 6 zero bits.
Wildcard mask0.0.0.63The bitwise inverse of the IPv4 subnet mask.
Conventional host range192.0.2.65–192.0.2.12662 conventional endpoints before other reservations.
Directed broadcast192.0.2.127The all-ones host value for this conventional subnet.

This uses documentation address space. It is an arithmetic example, not a range to deploy on the public internet.

Why “Subtract Two” Has Exceptions

For ordinary broadcast-style IPv4 prefixes through /30, the conventional host count excludes the network and directed-broadcast addresses. On an RFC 3021 point-to-point /31 link, both addresses can be endpoints. A /32 identifies a single address, commonly as a host route. Do not apply a /31 model to an arbitrary multi-access LAN without checking support.

Reference: RFC 3021 — IPv4 /31 point-to-point links.

Do Not Infer the Gateway

The first conventional host is not automatically the router. It could be reserved, assigned to another device, or excluded from DHCP. The calculator reports mathematical bounds; your configuration and provider rules determine the assignments.

A dotted mask is not accepted in the input field. Convert your known mask to its prefix length first. Use the planning reference for common IPv4 sizes.

Reference: RFC 4632 §3.1 — classless prefixes and notation.