Skip to content
uencoder

CIDR

CIDR (Classless Inter-Domain Routing) expresses a network as IP/prefix length (e.g., 10.0.0.0/8), replacing IPv4 address classes with flexible network partitioning.

Purpose

It provides more flexible network partitioning and route aggregation than address classes, reducing routing table bloat.

Mechanism

CIDR notation is IP/n, where n is the number of network prefix bits (0-32 for IPv4, 0-128 for IPv6); for example, /24 means the first 24 bits form the network number. Route aggregation (supernetting) merges multiple /24s into a /23 to shrink routing table entries.

Use cases

  • Routing tables and route aggregation
  • Firewall rules
  • Cloud security groups
  • IP allowlists

Examples

  • Input
    10.0.0.0/8
    Output
    10.0.0.0 - 10.255.255.255

    16.77 million addresses

Common errors

Prefix length exceeds the address bit count
Keep it within 32 for IPv4 and 128 for IPv6

Related terms

Related tools

References