CIDR Notation Explained
What the slash in 10.0.0.0/22 actually means, how CIDR relates to subnet masks, and why it replaced the old class system.
What CIDR is
CIDR stands for Classless Inter-Domain Routing. It is a notation for writing an IP network as an address followed by a slash and the number of leading bits that belong to the network — for example 192.168.1.0/24. The part after the slash is called the prefix length, and everything it does not cover is host space.
The same information used to be expressed as a dotted subnet mask (255.255.255.0). CIDR and subnet masks are two spellings of one idea: the prefix counts how many 1-bits are in the mask.
Where it came from
CIDR was published in September 1993 in RFC 1518 and RFC 1519. Before that, addresses were handed out in fixed classes — A (/8), B (/16), C (/24). Class B was far too big for most organizations and class C too small, so address space was being consumed at a pace that could not last, and routing tables were filling with thousands of separate class C routes. CIDR let providers allocate blocks of any power-of-two size and aggregate them into single announcements.
Anatomy of 10.0.0.0/22
Take this real-world-style block apart piece by piece:
- Base address (10.0.0.0)
- Identifies the network itself. By convention the host bits are all zero.
- Prefix (/22)
- The first 22 bits are fixed network bits; the remaining 10 bits are host bits.
- Equivalent mask
- 255.255.252.0 — the same 22 ones written as four octets.
- Range
- 10.0.0.0 – 10.0.3.255
- Capacity
- 1,024 addresses, 1,022 usable by the traditional rule.
A quick sanity check: any /22 spans exactly 1024 addresses, so its third octet advances in steps of 4 — which is why this block ends at 10.0.3.255.
CIDR to subnet mask reference (/16–/32)
| CIDR | Dotted-decimal mask | Total addresses | Usable hosts |
|---|---|---|---|
| /16 | 255.255.0.0 | 65,536 | 65534 |
| /17 | 255.255.128.0 | 32,768 | 32766 |
| /18 | 255.255.192.0 | 16,384 | 16382 |
| /19 | 255.255.224.0 | 8,192 | 8190 |
| /20 | 255.255.240.0 | 4,096 | 4094 |
| /21 | 255.255.248.0 | 2,048 | 2046 |
| /22 | 255.255.252.0 | 1,024 | 1022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (RFC 3021) |
| /32 | 255.255.255.255 | 1 | 1 (host route) |
The inverse direction matters too: Cisco-style ACLs use wildcard masks, where the bits are flipped. Convert either way with the wildcard mask calculator.
Why CIDR won: route aggregation
The property that saved the internet's routing tables is supernetting: when consecutive blocks share a common prefix, they can be announced as one bigger block. Four aligned /24 networks:
10.0.0.0/24 10.0.1.0/24 10.0.2.0/24 10.0.3.0/24
together cover exactly the range 10.0.0.0–10.0.3.255, which is a single /22:
Multiply that across thousands of customers per provider and you get the internet-scale benefit: routers forward on prefixes, not individual networks, and allocations can be sized to actual demand instead of a fixed class. You can reproduce this collapse yourself with the IP range to CIDR converter, which always emits the minimal set of covering blocks.
The same idea in IPv6
IPv6 kept the slash syntax but dropped dotted masks entirely — there is no IPv6 equivalent of 255.255.255.0, only prefix lengths. Conventions differ though: a standard LAN subnet is a /64, site allocations are commonly /48 or /56, and a single interface address is a /128. Analyze any v6 prefix with the IPv6 subnet calculator.
FAQ
Is a /24 the same as 255.255.255.0?
Yes. They are two notations for the identical mask: /24 says "the first 24 bits are network bits," and 255.255.255.0 is those 24 ones followed by eight zeros, written in dotted decimal.
What does /32 mean?
A /32 fixes all 32 bits, so the block is a single address. It appears as a host route in routing tables (for example, a loopback or a device-specific route) and holds exactly 1 usable address.
How many addresses are in a /22?
1,024 total addresses, of which 1,022 are usable by the traditional rule (network and broadcast excluded).
Can a subnet mask have gaps, like 255.0.255.0?
No. A valid netmask must be a contiguous run of 1 bits followed by 0 bits, so every mask maps to exactly one prefix length. Masks such as 255.0.255.0 are invalid in CIDR and rejected by well-behaved tooling.
Does CIDR apply to IPv6?
Yes — the slash-prefix syntax carries over unchanged. What changes are the working conventions (a LAN subnet is typically a /64) and that IPv6 has no dotted-decimal mask form at all.
Put it into practice
- IPv4 subnet calculator — full breakdown of any CIDR block you paste in.
- /22 reference page — ranges, binary math and examples for this exact prefix.
- Subnet cheat sheet — every prefix from /0 to /32 on one printable page.
- VLSM calculator — split a block into right-sized subnets using these same rules.