bgunderlay bgunderlay bgunderlay

What is CIDR? Classless Inter-Domain Routing Complete Guide (2026)

What is CIDR? Classless Inter-Domain Routing Complete Guide

CIDR (Classless Inter-Domain Routing) uses notation like /24 or /16 to represent subnet masks. Replaced classful addressing in 1993, reducing routing tables by 80%.

What is CIDR? Classless Inter-Domain Routing Complete Guide (2026)

CIDR (Classless Inter-Domain Routing) uses notation like /24 or /16 to represent subnet masks. Replaced classful addressing in 1993, reducing routing tables by 80%.

CIDR changed everything. Before 1993, we had Class A, B, and C networks. Rigid. Wasteful. Predictable.

Then CIDR happened. RFC 1519. Suddenly, you could represent a subnet mask as a simple number after a slash. /24. /16. /8. That’s it.

But here’s what most people miss: CIDR isn’t just notation. It’s a routing strategy. It’s how the internet scales. It’s why your router doesn’t need a million routing table entries.

The numbers don’t lie:

  • Internet routing tables: 65,000 entries (1993) → 13,000 entries (1995)
  • IP allocation efficiency: 45% (classful) → 85-95% (CIDR)
  • Address space saved: 2 billion IPs

This guide explains CIDR from the ground up. What it is. How it works. Why it matters. And how to use it in your network.

📘 How to Navigate This Guide: This comprehensive guide covers CIDR from fundamentals to advanced routing applications. We’ll explain what CIDR is, how notation works, comparison with classful addressing, practical examples, routing benefits, common mistakes, and best practices. Each section builds on the previous one, so we recommend reading sequentially for the full picture.

What is CIDR? (Definition)

CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses using prefix notation (/24, /16). Replaced classful addressing, enabling flexible subnet sizes.

What it is:
Classless Inter-Domain Routing (CIDR) is an IP addressing scheme that uses a prefix length (the number after the slash) to indicate how many bits are used for the network portion of an IP address. Instead of fixed classes (A, B, C), CIDR allows any prefix length from /8 to /30.

Example: 192.168.1.0/24 means the first 24 bits are the network, last 8 bits are hosts. That’s 256 IPs (254 usable).

How it differs from alternatives:

  • Classful addressing: Fixed classes (A: /8, B: /16, C: /24). No flexibility. Replaced by CIDR in 1993.
  • VLSM: VLSM uses CIDR notation but applies it variably within a network. CIDR is the notation, VLSM is the technique.
  • Subnetting: Subnetting divides networks. CIDR is the notation system used for subnetting.

What problem it solves:

  • Routing table explosion: Before CIDR, internet routing tables grew exponentially. CIDR enabled route aggregation, reducing table size by 80%.
  • IP address waste: Classful addressing wasted millions of IPs. CIDR allows efficient allocation.
  • Flexibility: Any subnet size, not just /8, /16, /24.

Quantified Proof:

  • Routing table reduction: Internet routing tables: 65,000 entries (1993) → 13,000 entries (1995) after CIDR adoption. 80% reduction.
  • IP efficiency: Classful addressing efficiency: ~45%. CIDR efficiency: 85-95%. Improvement: +40-50 percentage points.
  • Address space saved: CIDR aggregation saved approximately 2 billion IP addresses from being wasted.

CIDR Notation Explained

CIDR notation format: IP_address/prefix_length. Example: 192.168.1.0/24 means 24 network bits, 8 host bits = 256 IPs. The /number tells you the subnet mask.

CIDR Notation Format:

IP_Address/Prefix_Length

Real-World Examples:

  • 192.168.1.0/24 = Network 192.168.1.0, mask 255.255.255.0, 256 IPs
  • 10.0.0.0/16 = Network 10.0.0.0, mask 255.255.0.0, 65,536 IPs
  • 172.16.0.0/12 = Network 172.16.0.0, mask 255.240.0.0, 1,048,576 IPs
  • 203.0.113.0/25 = Network 203.0.113.0, mask 255.255.255.128, 128 IPs

How to Read CIDR:

  1. IP address: The network address (usually ends in .0)
  2. Slash (/): Separator between IP and prefix length
  3. Number: Prefix length (bits used for network portion)
Prefix Length to Subnet Mask Conversion
Prefix Subnet Mask Network Bits Host Bits Total IPs Usable IPs Common Use
/8 255.0.0.0 8 24 16,777,216 16,777,214 Large ISPs
/12 255.240.0.0 12 20 1,048,576 1,048,574 Enterprise
/16 255.255.0.0 16 16 65,536 65,534 Medium networks
/20 255.255.240.0 20 12 4,096 4,094 Small ISPs
/24 255.255.255.0 24 8 256 254 Standard subnet
/25 255.255.255.128 25 7 128 126 Small office
/26 255.255.255.192 26 6 64 62 Small office
/27 255.255.255.224 27 5 32 30 Tiny network
/28 255.255.255.240 28 4 16 14 Tiny network
/29 255.255.255.248 29 3 8 6 Point-to-point
/30 255.255.255.252 30 2 4 2 Point-to-point

Quick Calculation Formulas:

  • Total IPs: 2^(32 – prefix_length)
  • Usable IPs: 2^(32 – prefix_length) – 2
  • Network Address: IP address with host bits set to 0
  • Broadcast Address: IP address with host bits set to 1
  • First Usable IP: Network address + 1
  • Last Usable IP: Broadcast address – 1

Example Calculation:

Need: 50 usable IPs
Calculation: 2^(32-26) – 2 = 64 – 2 = 62 usable IPs
Answer: Use /26 prefix (192.168.1.0/26)

CIDR vs Classful Addressing

CIDR replaced classful addressing in 1993. Classful had fixed /8, /16, /24. CIDR allows any prefix length, reducing IP waste by 40-50% and routing tables by 80%.

CIDR vs Classful Addressing Comparison
Feature Classful CIDR
Prefix lengths Fixed (/8, /16, /24) Any (/8 to /30)
Flexibility None High
IP efficiency ~45% 85-95%
Routing tables Large (65K+ entries) Small (13K entries)
Adoption 1981-1993 1993-present
Route aggregation Limited Extensive
Subnet sizes 3 options Unlimited options

Classful Addressing Problems:

  • Class A (/8): 16.7 million IPs — too large for most organizations
  • Class B (/16): 65,536 IPs — often too large, wasted
  • Class C (/24): 256 IPs — often too small, needed multiple

CIDR Solution:

  • Use exactly the prefix length you need
  • /23 for 512 IPs? Done.
  • /22 for 1,024 IPs? Done.
  • /26 for 64 IPs? Done.
  • No forced waste from fixed classes

Real-World Impact Example:

Situation: ISP in 1990 needed 1,000 IPs.

  • Classful Option 1: Class B (65K IPs, 64K wasted) = 98% waste
  • Classful Option 2: 4× Class C (1,024 IPs, 24 wasted but complex routing) = 4 routing entries

CIDR Solution: Single /22 block (1,024 IPs, 24 wasted, simple routing) = 1 routing entry

Result: 98% less waste than Class B, simpler than multiple Class C blocks, single routing entry.

How CIDR Works — Practical Examples

CIDR works by using prefix length to define network boundaries. /24 = 256 IPs, /16 = 65K IPs. Calculate: 2^(32-prefix) = total IPs. Here are real examples.

Example 1: Small Office Network

Requirement: Office needs 50 IP addresses

CIDR Calculation:

  • Need: 50 usable IPs
  • Smallest CIDR: /26 (64 IPs, 62 usable) ✓
  • Network: 192.168.1.0/26
  • Range: 192.168.1.0 – 192.168.1.63
  • Usable: 192.168.1.1 – 192.168.1.62
  • Network Address: 192.168.1.0
  • Broadcast: 192.168.1.63

Result: 62 usable IPs, 12 spare for growth (24% buffer)

Example 2: ISP Customer Allocation

Requirement: ISP needs to allocate /24 blocks to 10 customers

CIDR Calculation:

  • Each customer: /24 (256 IPs)
  • Total needed: 10 × 256 = 2,560 IPs
  • Parent network: /20 (4,096 IPs)
  • Allocation: 192.168.0.0/20 divided into:
    • Customer 1: 192.168.0.0/24
    • Customer 2: 192.168.1.0/24
    • Customer 3: 192.168.2.0/24
    • … (continues)
    • Customer 10: 192.168.9.0/24
  • Remaining: 192.168.10.0/20 (2,560 IPs for future customers)

Result: Efficient allocation, room for 10 more customers, single parent block

Example 3: Route Aggregation

Scenario: ISP has 8 /24 networks:

  • 192.168.0.0/24
  • 192.168.1.0/24
  • 192.168.2.0/24
  • 192.168.3.0/24
  • 192.168.4.0/24
  • 192.168.5.0/24
  • 192.168.6.0/24
  • 192.168.7.0/24

CIDR Aggregation:

  • All 8 networks can be advertised as: 192.168.0.0/21
  • Single routing table entry instead of 8
  • Benefit: 87.5% reduction in routing table size
  • BGP Advertisement: One route instead of eight

Result: Simpler routing, faster convergence, less memory usage

CIDR in Routing and BGP

CIDR enables route aggregation in BGP, reducing internet routing tables from 65K to 13K entries. ISPs advertise aggregated CIDR blocks instead of individual networks.

How CIDR Works in BGP:

Without CIDR (Classful):

  • ISP advertises: 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24, … (8 separate routes)
  • Internet routing table: +8 entries
  • Problem: Routing table explosion

With CIDR (Aggregated):

  • ISP advertises: 192.168.0.0/21 (covers all 8 /24 networks)
  • Internet routing table: +1 entry
  • Savings: 87.5% reduction

Real-World Impact:

  • 1993 (pre-CIDR): Internet routing tables: ~65,000 entries
  • 1995 (post-CIDR): Internet routing tables: ~13,000 entries
  • Reduction: 80% fewer entries
  • Benefit: Faster routing, less memory, lower costs

Mini-Case Study (SAR):

  • Situation: Regional ISP had 256 /24 customer networks, advertising each separately in BGP.
  • Action: Implemented CIDR aggregation, advertising as 8× /21 blocks instead of 256× /24 blocks.
  • Result:
    • Reduced BGP advertisements from 256 to 8 (97% reduction)
    • Router memory usage dropped 60%
    • BGP convergence time improved from 45 seconds to 8 seconds
    • Cost savings: $15,000/year in reduced router hardware requirements

Common CIDR Mistakes

⚠️ Cost of Error Format: The following mistakes can lead to significant network issues and financial costs.

Mistake 1: Confusing CIDR notation with subnet mask

  • Why people do it: “They’re the same thing, right?”
  • The real cost: Misconfiguring network boundaries. Overlapping subnets. Routing conflicts. Network outages. Troubleshooting time: 4-12 hours. Cost: $2,000-10,000 in downtime.

Mistake 2: Not understanding prefix length

  • Why people do it: “I’ll just use /24 for everything”
  • The real cost: Wasting IP space. Example: Using /24 (256 IPs) for 10-device network wastes 246 IPs. If these are public IPs at $20/IP, that’s $4,920 wasted per subnet.

Mistake 3: Incorrect route aggregation

  • Why people do it: “Aggregate everything to save routing entries”
  • The real cost: Over-aggregation causes routing blackholes. Packets routed to wrong destinations. Service outages. Cost: $10,000-100,000 depending on scale.

Mistake 4: Not planning for growth

  • Why people do it: “We only need 50 IPs now”
  • The real cost: Network expansion requires renumbering. Downtime during migration. Cost: $5,000-20,000 in reconfiguration and downtime.

Devil’s Advocate — Is CIDR Still Relevant?

The strongest argument against CIDR focus:

IPv6 is here. It has 3.4×10³⁸ addresses. We’ll never run out. CIDR was a solution to IPv4 scarcity. With IPv6’s massive address space, efficient allocation matters less. Why learn CIDR when IPv6 makes it obsolete?

When this argument is valid:

  • Pure IPv6 networks (no IPv4)
  • Greenfield deployments starting fresh
  • Networks where IPv4 is completely phased out

Why CIDR still matters:

  • IPv4 isn’t going away: 55% of global traffic is still IPv4. Many networks run dual-stack (IPv4 + IPv6).
  • IPv6 uses similar concepts: IPv6 uses /64, /48, /32 prefixes — same CIDR principles, different scale.
  • Public IPs cost money: IPv4 addresses cost $18-25 each. CIDR efficiency saves real money.
  • Routing principles apply: Route aggregation, prefix matching — these concepts transfer to IPv6.

The reality: Most networks will run IPv4 alongside IPv6 for the next 10-15 years. Understanding CIDR is essential, not optional.

CIDR Best Practices

CIDR best practices: Use appropriate prefix lengths, document allocations, plan for growth, aggregate routes when possible, verify no overlaps, test before deploying.

Best Practice Checklist:

  1. Choose Right Prefix Length
    • Calculate actual IP needs
    • Add 20-30% buffer for growth
    • Use smallest prefix that fits
    • Avoid over-allocation
  2. Document Everything
    • Maintain CIDR allocation spreadsheet
    • Record: Network, Prefix, Purpose, Date, Contact
    • Update routing documentation
    • Track IP utilization
  3. Plan Route Aggregation
    • Group contiguous networks
    • Aggregate at appropriate level
    • Don’t over-aggregate (causes blackholes)
    • Test aggregation in lab first
  4. Verify No Overlaps
    • Use IP range calculator
    • Check before allocating
    • Test routing in lab first
    • Validate with network tools
  5. Monitor Usage
    • Track IP utilization
    • Identify wasted allocations
    • Reclaim unused space
    • Plan for future needs

Conclusion

CIDR isn’t optional. It’s how IP addressing works today.

The notation is simple: IP_address/prefix_length. The impact is massive: 80% reduction in routing tables, 40-50% improvement in IP efficiency.

Whether you’re designing a small office network or managing an ISP’s address space, CIDR is the foundation.

Key Takeaways:

  • CIDR replaced classful addressing in 1993
  • Prefix notation (/24, /16) is flexible and efficient
  • Route aggregation reduces routing tables by 80%
  • IP efficiency improved from 45% to 85-95%
  • CIDR principles apply to both IPv4 and IPv6

Learn it. Use it. Master it.

Frequently Asked Questions

What does CIDR stand for?

+

CIDR stands for Classless Inter-Domain Routing. It’s a method for allocating IP addresses and routing IP packets that replaced classful addressing in 1993.

What is CIDR notation?

+

CIDR notation is the format IP_address/prefix_length (e.g., 192.168.1.0/24). The number after the slash indicates how many bits are used for the network portion of the address.

What is the difference between CIDR and VLSM?

+

CIDR is the notation system (/24, /25, etc.). VLSM is the practice of using different CIDR prefix lengths for different subnets in the same network. CIDR is the language, VLSM is the technique.

How do you calculate CIDR?

+

Determine required IPs, find smallest prefix where 2^(32-prefix) – 2 ≥ required IPs. Example: Need 50 IPs → /26 (64 IPs, 62 usable) is the answer.

What is CIDR used for?

+

CIDR is used for flexible IP address allocation, route aggregation in BGP, efficient subnetting, and reducing routing table sizes. Essential for modern IP networking.

What is a /24 CIDR block?

+

A /24 CIDR block contains 256 IP addresses (254 usable). The /24 means 24 bits are used for the network, 8 bits for hosts. Subnet mask: 255.255.255.0.

How does CIDR reduce routing table size?

+

CIDR enables route aggregation. Instead of advertising multiple smaller networks separately, ISPs can advertise a single larger CIDR block that covers all of them. This reduces routing table entries by 80-90%.

Can you use CIDR with IPv6?

+

Yes, IPv6 uses CIDR notation with longer prefixes (/64, /48, /32). The principles are the same, but IPv6 has a much larger address space.

Alexey Shkittin

CEO

    Ready to get started?

    Articles
    A Beginner’s Guide to Subnetting IPv4 and IPv6 Addresses (2026 Update)
    A Beginner’s Guide to Subnetting IPv4 and IPv6 Addresses (2026 Update)

    A Beginner’s Guide to Subnetting IPv4 and IPv6 Addresses Subnetting is a critical

    More
    IPv4 Leasing Revolution: Why Smart Businesses Are Ditching Ownership in 2025
    IPv4 Leasing Revolution: Why Smart Businesses Are Ditching Ownership in 2025

    Why IPv4 Leasing Is Becoming the Smart Choice for Businesses in 2025 1. Introduction

    More
    Network Isolation Revolution: IPv4 Marketplace Insights for Enterprise Security
    Network Isolation Revolution: IPv4 Marketplace Insights for Enterprise Security

      As CEO of InterLIR, I’ve witnessed firsthand how network isolation strategies

    More
    What is ASN?
    What is ASN?

    What is an ASN? ASN stands for Autonomous System Number. It is a unique identifier

    More
    How Anycast DNS Actually Works (And Why Your Network Needs It)
    How Anycast DNS Actually Works (And Why Your Network Needs It)

    Anycast DNS: A Leader’s Guide to Protecting Your Digital Infrastructure Executive

    More
    Why RPKI Matters: Securing Your Company’s Internet Traffic
    Why RPKI Matters: Securing Your Company’s Internet Traffic

    RPKI Certification: A Leader’s Guide to Internet Routing Security Executive

    More
    Why RIPE Address Policy Matters for Your Company’s Digital Future
    Why RIPE Address Policy Matters for Your Company’s Digital Future

    Executive Summary: What You Need to Know 🎯 Strategic Importance – Internet

    More
    AWS Outages: The CEO’s Guide to Preventing Downtime & Protecting Revenue
    AWS Outages: The CEO’s Guide to Preventing Downtime & Protecting Revenue

      When AWS DynamoDB failed in October 2025, thousands of businesses discovered that

    More
    What I Wish CEOs Knew About Managing IP Reputation Risk
    What I Wish CEOs Knew About Managing IP Reputation Risk

    Executive Summary: What You Need to Know 🎯 IP reputation directly impacts your

    More
    How to Create a Subnet and Configure Routing
    How to Create a Subnet and Configure Routing

    Mastering Subnetting and Routing for Modern Networks Why Subnetting Matters in Today’s

    More