What Does CIDR Mean?
CIDR stands for Classless Inter-Domain Routing. Instead of relying on the old class A/B/C model, CIDR describes an IPv4 network with an address followed by a prefix length, such as 10.20.0.0/16.
The number after the slash tells you how many of the 32 IPv4 bits belong to the network prefix.
Prefix Length and Subnet Mask
A prefix length can be represented as a dotted-decimal subnet mask. For example:
| CIDR | Subnet mask | Host bits | Total addresses |
|---|---|---|---|
| /8 | 255.0.0.0 | 24 | 16,777,216 |
| /16 | 255.255.0.0 | 16 | 65,536 |
| /24 | 255.255.255.0 | 8 | 256 |
| /25 | 255.255.255.128 | 7 | 128 |
| /26 | 255.255.255.192 | 6 | 64 |
| /27 | 255.255.255.224 | 5 | 32 |
| /28 | 255.255.255.240 | 4 | 16 |
| /30 | 255.255.255.252 | 2 | 4 |
| /32 | 255.255.255.255 | 0 | 1 |
How Prefix Length Controls the Range
IPv4 has 32 bits. A /24 uses 24 bits for the prefix, leaving eight host bits. A /16 leaves 16 host bits, so its address space is much larger.
The total number of addresses is:
2^(32 - prefix length)
For 172.16.0.0/20:
32 - 20 = 12 host bits 2^12 = 4096 addresses
Finding the Network from an IP/CIDR
10.10.37.84/20
The mask is 255.255.240.0. The third-octet block size is 256 - 240 = 16. Valid network boundaries are 0, 16, 32, 48, ...
37 falls into the 32–47 block, so the network is 10.10.32.0/20.
The range is 10.10.32.0 through 10.10.47.255.
CIDR and Route Summarization
CIDR is particularly useful for summarizing multiple contiguous prefixes into a shorter route. For example, four adjacent /24 networks can potentially be summarized as one /22 if they are aligned correctly.
Consider:
10.20.0.0/2410.20.1.0/2410.20.2.0/2410.20.3.0/24
These can be represented by 10.20.0.0/22. The summary covers 1024 addresses.
Summarization reduces routing-table entries and can make routing domains easier to operate, but the summary must not unintentionally include address space that belongs somewhere else.
Longest Prefix Match
When multiple routes match a destination, routers generally select the most specific matching prefix — the route with the longest prefix length.
10.0.0.0/8
10.20.0.0/16
10.20.30.0/24
For destination 10.20.30.45, all three routes match, but /24 is the most specific and therefore wins the longest-prefix comparison.
CIDR Is Not the Same as a VLAN
A CIDR prefix describes an IP address range. A VLAN is a Layer 2 segmentation mechanism. They are commonly associated — for example, one VLAN may use 192.168.50.0/24 — but they are not inherently the same thing.
A routed interface can have a CIDR prefix without being a traditional access VLAN, and a Layer 2 VLAN can exist before an IP subnet is assigned to it.
Private IPv4 CIDR Blocks
RFC 1918 defines three IPv4 ranges reserved for private internetworks:
| Range | CIDR | Addresses |
|---|---|---|
| 10.0.0.0 – 10.255.255.255 | /8 | 16,777,216 |
| 172.16.0.0 – 172.31.255.255 | /12 | 1,048,576 |
| 192.168.0.0 – 192.168.255.255 | /16 | 65,536 |
Private addressing is common inside enterprise networks, but private does not mean globally routable. Internet access normally requires some form of translation, proxying or another edge mechanism.
/31 and /32
Two prefixes deserve special attention in operational networks.
/31: RFC 3021 defines the use of /31 prefixes on point-to-point links. The two addresses can both be used by the endpoints, avoiding the traditional network/broadcast waste.
/32: A /32 identifies exactly one IPv4 address. It is commonly used for host routes, loopbacks and specific routing entries.
Practical CIDR Checklist
- Identify the prefix length.
- Convert it to a mask if needed.
- Determine the host-bit count.
- Calculate total address capacity.
- Find the correct network boundary.
- Check whether the range overlaps existing allocations.
- For routing, verify whether the prefix is more or less specific than competing routes.
Use the NetOpsBench IP / CIDR Explorer
Inspect a parent network, calculate child subnets and explore address ranges without doing the prefix math manually.
Open NetOpsBench →FAQ
Does a larger CIDR number mean a larger network?
No. A larger prefix length means more bits are fixed as the network prefix and therefore fewer host addresses. A /28 is smaller than a /24.
What is the difference between /24 and 255.255.255.0?
They describe the same prefix. CIDR notation is simply the compact form.
Why can't any IP address be used as a network address?
The network address must have all host bits set to zero for that prefix. The valid boundaries therefore depend on the prefix length.
References: RFC 4632 (CIDR), RFC 1812 (IPv4 routing requirements), RFC 1918 (private address space), RFC 3021 (/31 point-to-point addressing).