Glossary · Networking

CIDR (Classless Inter-Domain Routing)

CIDR is the notation and method for writing IP ranges as an address plus a prefix length, such as 203.0.113.0/24, instead of fixed address classes.

Updated October 6, 2026

CIDR (Classless Inter-Domain Routing) describes an IP block as a base address followed by a slash and the number of leading bits that identify the network. A /24 fixes 24 bits and leaves 8 for hosts.

Why it matters

CIDR replaced the old class A, B and C system, which wasted huge numbers of addresses. It lets providers allocate any size block and lets routers aggregate many routes into one, which keeps the global routing table smaller. You will meet CIDR in firewall rules, cloud security groups, allowlists and route tables.

Example

CIDRAddressesSubnet mask
/321255.255.255.255
/24256255.255.255.0
/1665,536255.255.0.0
/816,777,216255.0.0.0

The rule is 2 raised to (32 minus prefix). So 198.51.100.0/22 covers 1,024 addresses, from 198.51.100.0 to 198.51.103.255.

Common mistakes

  • Mixing up direction: a larger prefix number means a smaller block.
  • Allowing 0.0.0.0/0 in a firewall rule when you meant a single address, which opens the service to the whole Internet.
  • Writing a prefix whose host bits are not zero, such as 10.0.0.5/24, and assuming it means the whole block.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.