Skip to content
Calcrivo
Networking7 min read

What Is CIDR Notation, and Why Did It Replace Network Classes?

CIDR explained from first principles: what the slash number means, why classes A/B/C were abandoned, and how to read any prefix at a glance.


CIDR — Classless Inter-Domain Routing — is the reason modern addresses are written 10.0.0.0/8 rather than "a Class A network". The slash number is simply how many leading bits identify the network.

Before CIDR: the class system

Until 1993, the split between network and host was fixed by the first octet:

ClassFirst octetNetwork bitsHosts per network
A1–126816,777,214
B128–1911665,534
C192–22324254

The problem is visible in that last column. An organisation needing 500 addresses had two options: a Class C with 254 (too few), or a Class B with 65,534 — wasting 65,000 addresses. There was nothing in between.

By the early 1990s this was consuming the IPv4 space fast enough that exhaustion was projected within a few years.

What CIDR changed

CIDR removed the fixed boundaries. The prefix can be any length from 0 to 32, so a network can be sized to what it needs:

  • 500 hosts → /23 (510 usable)
  • 100 hosts → /25 (126 usable)
  • 2 hosts → /30 (2 usable)

It also enabled route aggregation: four adjacent /24s can be advertised as a single /22, so the global routing table carries one entry instead of four. That aggregation is what kept internet routing tractable as the network grew.

Reading a prefix quickly

The prefix tells you the host bits: 32 − prefix. Host bits tell you the size: 2^host_bits.

CIDRMaskAddresses
/8255.0.0.016,777,216
/16255.255.0.065,536
/24255.255.255.0256
/26255.255.255.19264
/30255.255.255.2524

Each extra bit in the prefix halves the network. Each bit removed doubles it.

Where classes survive

Three places, and it is worth knowing which:

  1. Vocabulary. "A class C" usually just means a /24.
  2. Default masks. Some tools still assume a classful default when none is

given, which is why the subnet calculator offers a class selector.

  1. Multicast and reserved space. Class D (224–239) for multicast and Class E

(240–255) as reserved are still meaningful designations.

Critically, a prefix that disagrees with the address's historical class is entirely valid. 10.0.0.0/24 is a perfectly normal network even though 10.x is "Class A". That flexibility is the whole point of CIDR.

CIDR in IPv6

The same notation carries over, with 128 bits instead of 32. A /64 is the standard single-subnet allocation and a /48 a typical site allocation. Because a /64 contains 18 quintillion addresses, IPv6 subnetting is about hierarchy and documentation rather than conserving space.

Calculators used in this guide

More guides