Networking  

What Is CIDR Notation in IP Addressing? (With Examples)

Introduction

Every device connected to the internet or a private network has an IP address—a unique identifier that allows machines to communicate. In the early days, IP addresses were assigned using a classful system (Class A, B, and C), but this led to a huge wastage of addresses.

To solve this, CIDR (Classless Inter-Domain Routing) was introduced in 1993. CIDR is a method for allocating IP addresses and routing data efficiently. It replaces rigid class-based addressing with a flexible system that allows networks to be sized according to actual needs.

In this article, we’ll break down what CIDR is, how CIDR notation works, and why it’s used, providing examples for both IPv4 and IPv6.

What Is CIDR?

Classless Inter-Domain Routing (CIDR) is an IP addressing scheme that allows network administrators to:

  • Allocate IP addresses more flexibly.

  • Reduce wastage of IP addresses.

  • Improve routing efficiency by reducing the size of routing tables

👉 In simple terms, CIDR groups IP addresses into blocks (CIDR blocks) instead of fixed classes, and routers can identify networks using prefixes rather than class categories.

CIDR Notation Explained

CIDR notation represents an IP address followed by a slash ( / ) and a number.

📌 Example:

192.168.1.1/24

Here’s the breakdown:

  • 192.168.1.1 → the IP address

  • /24 → means the first 24 bits are the network portion, and the remaining 8 bits are for hosts

So:

  • Network: 192.168.1.0

  • Broadcast: 192.168.1.255

  • Available hosts: 254

This compact notation makes it easier to describe subnets and IP ranges.

Classful Addressing vs CIDR

Before CIDR, IPs were divided into fixed classes:

  • Class A → /8 → 16 million hosts

  • Class B → /16 → 65k hosts

  • Class C → /24 → 254 hosts

🚨 Problem: If you had 300 devices, you couldn’t fit into Class C (too small) and would need a Class B (too large), wasting tens of thousands of IPs.

âś… CIDR fixes this by allowing networks like /23 or /26, perfectly fitting the number of required devices.

Subnetting with CIDR

Subnetting is dividing a large network into smaller, manageable networks.

📌 Example: Start with 192.168.1.0/24 and divide it into 4 subnets:

  • 192.168.1.0/26 → 64 IPs

  • 192.168.1.64/26 → 64 IPs

  • 192.168.1.128/26 → 64 IPs

  • 192.168.1.192/26 → 64 IPs

This way, instead of wasting 254 addresses on one block, you can assign smaller groups to departments, routers, or servers.

Supernetting with CIDR

Just as subnetting splits a block, supernetting combines multiple blocks.

📌 Example:

  • 192.168.0.0/24

  • 192.168.1.0/24

With CIDR, these can be combined into:

192.168.0.0/23

This reduces routing table size and makes routing more efficient.

CIDR and IPv4

  • IPv4 addresses are 32 bits long (about 4.3 billion possible).

  • Many are reserved or wasted under classful addressing.

  • CIDR ensures efficient use by allocating only what’s needed.

👉 Example: 10.0.0.0/12 can represent 1,048,576 IP addresses, perfect for enterprise or cloud use.

CIDR and IPv6

IPv6 uses 128-bit addresses—enough to handle the exploding number of connected devices (IoT, smartphones, servers).

📌 Example IPv6 CIDR:

2001:0db8:85a3::/64
  • /64 means the first 64 bits are for the network

  • Remaining 64 bits are for host addresses

  • Provides trillions of possible hosts per subnet

CIDR works the same way in IPv6, but on a much larger scale.

Benefits of CIDR

✅ Efficient IP allocation → no wastage like classful addressing
✅ Flexible subnetting & supernetting → networks sized as needed
✅ Smaller routing tables → faster routing, better internet performance
✅ Scales with IPv6 → ready for the future of networking
✅ Cloud networking → widely used in AWS VPCs, Azure VNets, GCP subnets

Limitations of CIDR

❌ More complex than class-based addressing (requires subnet calculations)
❌ Older hardware/software may not support CIDR
❌ Security configs (ACLs, firewalls) can be trickier in very large blocks

Real-World Example of CIDR

  • AWS VPC: You must assign a CIDR block (e.g., 10.0.0.0/16) when creating a Virtual Private Cloud.

  • ISPs: Use CIDR to allocate customer ranges.

  • Enterprises: Use CIDR for dividing departments (10.1.0.0/24 for HR, 10.1.1.0/24 for Finance).

FAQs on CIDR

1. What is CIDR notation used for?

CIDR notation is used to represent IP addresses and their subnet masks in a simplified format. It helps efficiently allocate and manage IPs.

2. What does /24 mean in CIDR?

The /24 means that the first 24 bits are reserved for the network, leaving 8 bits for host addresses. This gives 256 total addresses.

3. How is CIDR different from classful addressing?

Classful addressing had fixed blocks (A, B, C), often wasting IPs. CIDR allows variable-length subnet masks, providing flexibility and efficiency.

4. Can CIDR be used in IPv6?

Yes. CIDR works with both IPv4 and IPv6, ensuring scalable and efficient IP allocation. For example: /64 in IPv6 defines the network portion.

Conclusion

CIDR notation is a modern, efficient way of representing IP addresses. Unlike outdated classful addressing, CIDR allows you to size networks exactly to your needs, minimize wasted addresses, and simplify routing.

Whether you’re working with IPv4 or IPv6, subnetting or supernetting, on-premise networks or cloud platforms like AWS and Azure—CIDR is the foundation of today’s internet routing.

Understanding CIDR is not just theory—it’s a must-have skill for every network engineer, cloud architect, or IT professional.

If you want to learn more about networking concepts, check out Networking Category.