What is CIDR notation?
An address and a prefix length
CIDR notation describes a range of IP addresses in one short value, such as 192.0.2.0/24 or 2001:db8::/32. The number after the slash is the prefix length: how many bits at the start of the address identify the network. The remaining bits identify individual addresses inside it.
Counting the addresses
An IPv4 address has 32 bits and an IPv6 address has 128. Subtract the prefix length from that total, and the range holds 2 to the power of the result. So a /24 in IPv4 leaves 8 bits and holds 256 addresses, and an IPv4 /32 is a single address. Each step shorter doubles the size, so a /23 holds 512. An IPv6 /64 holds 18,446,744,073,709,551,616 addresses.
First and last addresses
The first address in the range has all its remaining bits set to 0, and the last has them all set to 1. In most IPv4 networks, those two are reserved as the network and broadcast addresses, so a /24 has 254 addresses for devices. The exceptions are /31 point-to-point links and /32 single addresses. IPv6 has no broadcast address.
Netmasks say the same thing
A netmask is an older way of writing an IPv4 prefix length. 255.255.255.0 and /24 mean the same thing: the first 24 bits identify the network.
Where you will see it
CIDR ranges appear in routing tables, firewall rules, cloud network settings and IP lookup results. The network prefix shown for an IP address is a CIDR range containing that address.
CIDR calculator · Look up an IP address · All tools and guides