What is CIDR notation?
CIDR (Classless Inter-Domain Routing) is the modern way to describe an IP block using a prefix length, like 192.0.2.0/24. It replaced the old class A, B, and C system with something far more flexible.
Before CIDR: the classful system
The original internet split addresses into fixed classes. Class A was a /8, class B a /16, class C a /24. The problem was rigidity: an organisation that needed 2,000 addresses had to take a whole class B of 65,536, wasting most of it, because a class C of 256 was too small.
CIDR, introduced in 1993, threw out the fixed boundaries. Now any prefix length is allowed, so that same organisation can take a /21 (2,048 addresses) that fits its need almost exactly.
How CIDR notation works
CIDR notation is an address followed by a slash and a number: 192.0.2.0/24. The number is the prefix length, the count of leading bits that identify the network. Everything after those bits is available for hosts.
The prefix maps directly to a subnet mask. /24 is 255.255.255.0, /16 is 255.255.0.0, /30 is 255.255.255.252. It also maps to a size: the host portion has 32 minus the prefix bits, so a /24 has 8 host bits and therefore 256 addresses. The CIDR calculator on this site expands any block into its exact range.
CIDR and route aggregation
CIDR's other superpower is summarisation. Several adjacent blocks can be advertised as one shorter prefix. Four contiguous /24s can become a single /22, which keeps the global routing table smaller. That is what supernetting does, and you can try it with the supernet calculator.
This is why CIDR is called classless and inter-domain: it lets providers hand out right-sized blocks and aggregate routes across the whole internet, independent of the old class boundaries.
Frequently asked questions
What does /24 mean in CIDR?
The /24 means the first 24 bits are the network prefix. That leaves 8 bits for hosts, so the block has 256 addresses (254 usable) and the mask 255.255.255.0.
What is a CIDR block?
A CIDR block is a range of IP addresses described by a base address and a prefix, such as 10.0.0.0/8. It represents every address that shares those leading prefix bits.
How do I convert CIDR to an IP range?
The base address with all host bits set to 0 is the first address, and with all host bits set to 1 is the last. The CIDR calculator does this instantly for any block.
Is CIDR the same as a subnet mask?
They describe the same boundary. /24 in CIDR is 255.255.255.0 as a subnet mask. CIDR is just a shorter way to write the prefix length.