CIDR and subnetting turn address ranges into prefixes
A slash prefix says how many leading bits identify the network. Everything after those bits is available to distinguish addresses inside that network.
Learn to read slash notation, calculate network boundaries, and avoid the most common subnet planning errors.
Reading the prefix
In IPv4, /24 fixes the first 24 of 32 bits and leaves eight variable bits, producing 256 addresses. In IPv6, /64 leaves an enormous interface-identifier field and is the normal size for many local links.
Network boundaries matter
A CIDR block starts only where its host bits are zero. Writing 192.0.2.18/24 describes the same network as 192.0.2.0/24; a calculator normalizes the input so firewall rules and route announcements are easier to review.
Address counts need context
Traditional IPv4 subnets reserve network and broadcast addresses, but /31 point-to-point links are a defined exception and /32 names one address. IPv6 does not use broadcast. Blanket ‘subtract two’ advice is therefore incomplete.
Carry the prefix into routing and policy review
Range mathematics becomes useful when the normalized endpoints are compared with actual routes, firewall rules, VPN pools, and allocation context.
- Calculate a CIDR range or host subnet to clear host bits and inspect the network, mask, endpoints, and total size.
- Compare public and private address space to distinguish reusable local ranges from globally routed prefixes.
- Connect prefixes to autonomous systems to understand how networks announce reachability without identifying an end user.
A practical checklist
- Normalize every proposed block before adding it to a rule.
- Check for overlap with existing VPN and cloud ranges.
- Document whether a count means total or conventionally usable IPv4 addresses.
Questions readers ask next
What is the mask for /24?
In IPv4 it is 255.255.255.0.
Is a smaller slash number a smaller network?
No. Fewer fixed bits leave more addresses, so /16 is larger than /24.
Sources and further reading
The key ideas and how they connect
CIDR joins an address with a count of fixed leading bits. The resulting prefix defines a range that routers and policies can handle as one unit.
Slash length counts network bits
In IPv4, /24 leaves eight changing bits and 256 total values.
Boundaries must align
Host bits are cleared to find the true start of the network.
Address-family rules differ
IPv6 has no broadcast address and does not follow every IPv4 host-count shortcut.
A host address can still describe a whole block
The input 192.0.2.18/24 is not the first address, but it belongs to 192.0.2.0/24. Normalization makes the covered range clear. Try it in the subnet calculator, then compare an existing access rule in the CIDR range tool.
Core semantic relationships
| Subject | Relationship | Object |
|---|---|---|
| CIDR slash length | counts | fixed leading bits |
| Host bits | vary within | the network prefix |
| Route or rule | covers | the normalized address range |