What is CIDR?

CIDR (Classless Inter-Domain Routing) is a way of writing IP addresses that also tells you how many bits are used for the network part of the address. It replaces the old “class A/B/C” system with a more flexible format like 192.168.0.0/24.

Let's break it down

  • IP address - a series of numbers (e.g., 192.168.0.0) that identifies a device on a network.
  • Slash (/) and number - the “/24” means the first 24 bits of the address are the network portion; the remaining bits are for individual hosts.
  • Classless - unlike the old class system, you can choose any size for the network, not just fixed classes A, B, or C.
  • Routing - the process of moving data from one network to another; CIDR helps routers decide the best path.

Why does it matter?

CIDR lets networks use IP addresses more efficiently, preventing waste of address space and making the internet’s routing tables smaller and faster. For anyone managing a network, it means you can create just-right sized sub-networks without running out of addresses.

Where is it used?

  • Home and small-business routers that split a single public IP into many private devices.
  • Cloud providers (AWS, Azure, Google Cloud) when you define virtual private clouds and subnets.
  • Internet Service Providers (ISPs) to allocate address blocks to customers in a flexible way.
  • Large enterprise networks that need many sub-nets for different departments or services.

Good things about it

  • Efficient address use - you can allocate exactly the number of addresses you need.
  • Simpler routing - routers can aggregate multiple networks into a single entry, reducing table size.
  • Scalability - easy to grow or shrink networks without renumbering everything.
  • Flexibility - works with both IPv4 and IPv6, supporting any network size.
  • Better security - smaller subnets limit the broadcast domain and can isolate problems.

Not-so-good things

  • Learning curve - beginners may find the slash notation and binary math confusing at first.
  • Compatibility issues - very old hardware or software may still expect classful addresses.
  • Fragmentation risk - if subnets are sized poorly, you can end up with many tiny networks that are harder to manage.
  • Limited IPv4 space - even with CIDR, the total pool of IPv4 addresses is still finite, leading to scarcity.