CIDR Notation Explained: What the Slash Really Means
CIDR notation compresses two pieces of information — an IP address and a subnet mask — into a single readable string. Here's exactly what that slash number means and why it replaced classful addressing.
If you have ever configured a firewall rule, set up a VPC, or read network documentation, you have seen notation like 192.168.1.0/24 or 10.0.0.0/8. That slash and the number after it — the prefix length — is the core of CIDR notation. Understanding it unlocks your ability to reason about any IP network.
What CIDR Stands For
CIDR stands for Classless Inter-Domain Routing. Introduced in 1993 (RFC 1519), it replaced the rigid classful addressing system that divided the entire IPv4 space into fixed Class A, B, and C blocks. CIDR lets network operators define blocks of any size — not just 256-address or 65,536-address chunks.
Reading the Prefix Length
A CIDR address has two parts separated by a slash:
- The IP address — identifies the network (e.g.
192.168.1.0) - The prefix length — the number of bits used for the network portion (e.g.
/24)
An IPv4 address is 32 bits long. A /24 prefix means the first 24 bits identify the network and the remaining 8 bits identify individual hosts. Those 8 host bits give you 28 = 256 addresses — from .0 (network address) to .255 (broadcast), with 254 usable for hosts.
The Math Behind the Slash
The prefix length maps directly to a subnet mask. A /24 is equivalent to 255.255.255.0 — 24 ones followed by 8 zeros in binary:
11111111.11111111.11111111.00000000
Any bit position set to 1 in the mask is part of the network; any 0 bit is part of the host range. Our subnet mask vs CIDR guide covers the full conversion table if you need to switch between the two representations.
How Many Addresses in Each Block?
The number of IP addresses in a CIDR block is always 2 raised to the power of (32 minus the prefix length):
/8— 224 = 16,777,216 addresses — see the /8 reference page/16— 216 = 65,536 addresses — see the /16 reference page/24— 28 = 256 addresses — see the /24 reference page/32— 20 = 1 address (a single host)
Use the CIDR calculator to explore any prefix instantly — it shows the network address, broadcast, usable host range, subnet mask, and all IPs for small blocks.
Why CIDR Replaced Classful Addressing
Before CIDR, IP addresses came in three fixed sizes: Class A (/8, 16 million addresses), Class B (/16, 65,536 addresses), and Class C (/24, 256 addresses). A company needing 1,000 addresses would receive a Class B block of 65,536, leaving 64,500 unused. CIDR's variable-length prefix lets allocations match actual need, making global routing tables dramatically more efficient.
Practical Application
When you create an AWS VPC, you assign it a CIDR block like 10.0.0.0/16 — 65,536 IP addresses to subdivide into subnets. A public subnet might get 10.0.1.0/24 (256 addresses) while a private database subnet gets 10.0.16.0/20 (4,096 addresses). The prefix length is precisely how you control how many addresses each network segment receives.