Guide
CIDR Notation Explained
CIDR notation describes an IP network by combining a starting address with a prefix length, such as 8.8.8.0/24.
The slash number
The number after the slash is the prefix length. It says how many leading bits belong to the network part of the address.
A larger prefix number means a smaller network. For IPv4, /24 contains 256 addresses while /32 is one address.
Host-prefix input
People often type a host address with a network prefix, for example 8.8.8.8/24. The canonical network is 8.8.8.0/24 because the host bits are cleared.
ShowIP accepts host-prefix input and normalizes it before calculating first address, last address, netmask, broadcast, and total address count.
Key terms
- CIDR
- Classless Inter-Domain Routing
- Prefix length
- Number of fixed leading network bits
- Host bits
- Remaining address bits inside the network
Examples
IPv4 network
8.8.8.0/24
256 IPv4 addresses from 8.8.8.0 to 8.8.8.255.
Calculate this network
Single IPv4 address
8.8.8.8/32
Exactly one IPv4 address.
Calculate this single-address range
IPv6 documentation prefix
2001:db8::/32
A reserved IPv6 documentation range used in examples.
Calculate this IPv6 prefix
Related guides and tools
FAQ
Is 8.8.8.8/24 the same as 8.8.8.0/24?
For network calculations, yes. 8.8.8.8/24 is host-prefix input that normalizes to the canonical network 8.8.8.0/24.
Does IPv6 use netmasks and broadcast addresses?
IPv6 uses prefix lengths, but IPv4-style netmasks and broadcast addresses are not used in the same way.