Glossary Networking

CIDR

CIDR (Classless Inter-Domain Routing) is the notation that writes an IP network as an address plus a prefix length, such as 192.168.1.0/24.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

The prefix length says how many leading bits identify the network, so a /24 leaves 8 bits (256 addresses) for hosts. A block holds 2^(32 − prefix) addresses: a /22 has 1,024 and a /30 has 4. CIDR replaced the old fixed A, B and C address classes and lets blocks of any power-of-two size be allocated and combined (route aggregation). A block must start on a multiple of its size, so 198.51.100.0/22 is valid but 198.51.101.0/22 is not.

Why it matters

Firewall rules, cloud security groups, VPN routes and allow-lists are all written in CIDR. One bit of difference doubles or halves the range: /23 instead of /24 opens 512 addresses instead of 256. IPv6 uses the same notation, such as 2001:db8::/32.

Example

198.51.100.0/22 covers 198.51.100.0 to 198.51.103.255, which is 1,024 addresses. The two adjacent halves 192.0.2.0/25 and 192.0.2.128/25 aggregate into the single route 192.0.2.0/24.

AdSense Placeholder
Slot: footer_leaderboard