CIDR (Classless Inter-Domain Routing) is an addressing method introduced in the 1990s that allocates IP addresses and aggregates routes using variable-length prefixes in the format address/prefix-length (such as 192.0.2.0/24), replacing the fixed classful A, B, and C scheme to solve IPv4 address exhaustion and routing table growth. The prefix length indicates how many leading bits identify the network while remaining bits identify individual hosts, allowing flexible block sizing on bit boundaries for both IPv4 and IPv6. Poor CIDR management causes concrete failures including overlapping prefixes, misaligned block boundaries, and broken aggregation that complicate routing, VPNs, firewall rules, and peering setups, making accurate address planning essential for network operations.
How CIDR works
CIDR expresses a network as an IP address plus a prefix length that states how many leading bits identify the network. The remaining bits identify hosts within that network.
- Choose a prefix length: The prefix length, written after a slash, sets the size of the block. A /24 in IPv4 fixes 24 network bits and leaves 8 host bits, so the block holds 256 addresses.
- Allocate the block: A registry or provider assigns a block that fits the need, rather than a full class A, B or C network. Blocks can be any size on a bit boundary.
- Subdivide as needed: An organization splits its block into longer prefixes for individual subnets. A /24 can become two /25 blocks or four /26 blocks.
- Aggregate for routing: Contiguous blocks that share a common leading bit pattern are advertised as one shorter prefix. Two adjacent /24 blocks can be summarized as a single /23 when they align.
- Forward by longest match: A router compares a destination address to its table and uses the matching entry with the longest prefix, so a more specific route overrides a broader one.
CIDR notation applies equally to IPv6, where prefixes such as /64 are common for subnets. The prefix length replaces the implied class boundaries and works alongside the subnet mask, which is simply another way to write the same bit count.
Common CIDR issues
Two teams allocate blocks that overlap, such as a /23 and a /24 inside it, and traffic reaches the wrong network or fails intermittently. The problem often surfaces when VPNs, peering or cloud networks are connected and routes conflict.
A block is written with a host address that does not sit on the prefix boundary, such as 10.1.1.64/24 when 10.1.1.0/24 was meant. Some platforms reject it and others silently normalize it, which causes confusing mismatches in route and firewall entries.
Planners forget that the first and last addresses in an IPv4 subnet are normally reserved for the network and broadcast, and that cloud platforms reserve more. A subnet sized to fit exactly runs out of usable addresses at deployment.
Allocating blocks without regard to topology leaves addresses scattered across sites, so they cannot be summarized into one route. Routing tables grow and summary routes either cannot be used or attract traffic for addresses that are not present.
A DHCP scope, firewall object and IPAM record each carry a different prefix length for the same network. Hosts get the wrong mask or rules miss part of the range, and the fault is hard to trace because each system looks internally consistent.