Convert between CIDR notation and subnet masks

CIDR Summarizer

Optimize mixed IP addresses, CIDR blocks, and ranges into minimal CIDR prefixes

CIDR Split

Split a network into N equal child subnets or to a target prefix length

Next Available Subnet

Find available subnets from pools minus allocations with first-fit or best-fit policies

Free Space Finder

List all free blocks in pool CIDRs minus allocations, filterable by target prefix length

CIDR Deaggregate

Decompose CIDR blocks and ranges into uniform target prefix subnets (e.g., break into /24s)

CIDR Compare

Compare two lists of CIDR blocks to identify added, removed, and unchanged entries after normalization

CIDR Allocator

Pack requested subnet sizes into network pools using bin-packing algorithms (first-fit, best-fit)

CIDR Alignment

Check if IP addresses and ranges align to CIDR prefix boundaries with optimization suggestions

Wildcard Mask Converter

Convert between CIDR, subnet masks, and wildcard masks with ACL rule generation

Essential CIDR Concepts

CIDR Notation

The slash notation (like /24) tells you how many bits identify the network portion of an IP address.

192.168.1.0/24 = 24 network bits, 8 host bits

Subnet Masks

Binary masks that define which part of an IP address is network and which is host.

/24 = 255.255.255.0 in decimal

Route Aggregation

Combining multiple networks into fewer, larger prefixes for efficient routing.

192.168.0.0/24 + 192.168.1.0/24 = 192.168.0.0/23

Network Division

Breaking larger networks into smaller subnets for better organization.

10.0.0.0/16 can be split into 256 /24 subnets

What is CIDR?

CIDR (Classless Inter-Domain Routing) revolutionized how we handle IP addresses. Before CIDR, networks were stuck with fixed class sizes (Class A, B, C). CIDR lets you create networks of any size by specifying exactly how many bits identify the network.

The key insight: instead of wasting addresses with oversized networks or running out with undersized ones, you can right-size your networks to match your actual needs.

Why CIDR Matters

Flexible Addressing: Create networks of any size, not limited to class boundaries
Efficient Allocation: Reduce IP address waste with right-sized subnets
Route Aggregation: Combine multiple routes into summaries for smaller routing tables
Hierarchical Design: Build scalable network architectures with logical addressing

Common CIDR Block Sizes

CIDRSubnet MaskHostsCommon Use
/8255.0.0.016,777,214ISP allocations
/16255.255.0.065,534Large organizations
/24255.255.255.0254Department networks
/25255.255.255.128126Small offices
/26255.255.255.19262VLANs
/28255.255.255.24014Point-to-point
/30255.255.255.2522Router links
/31255.255.255.2542*P2P (RFC 3021)

* /31 networks use special point-to-point addressing (RFC 3021) where both addresses are usable without network/broadcast addresses.

How CIDR Works

Network vs Host Bits

A /24 network means the first 24 bits identify the network, leaving 8 bits for hosts. That gives you 2^8 = 256 total addresses, minus 2 for network and broadcast = 254 usable hosts.

11000000.10101000.00000001.
00000000
Network (24 bits) Host (8 bits)

Route Summarization

Instead of advertising 4 separate /24 networks, you can summarize them into one /22. This reduces routing table size and improves network performance.

Before: 4 routes
192.168.0.0/24, 192.168.1.0/24
192.168.2.0/24, 192.168.3.0/24
After: 1 route
192.168.0.0/22
(covers all 4 networks)

Subnet Planning

Always plan for growth and align to binary boundaries. A /25 gives you room to split into two /26s later, but a /27 doesn't divide evenly into /25s.

Pro tip: Start with larger subnets and subdivide as needed. It's easier to split than to merge.

Quick Reference

Binary to CIDR

  • Count consecutive 1s from the left
  • 11111111.11111111.11111111.00000000 = /24
  • 11111111.11111111.11111100.00000000 = /22

Host Calculation

  • Host bits = 32 - CIDR prefix
  • Total addresses = 2^(host bits)
  • Usable hosts = Total - 2

Common Patterns

  • /24 = 254 hosts (standard office)
  • /30 = 2 hosts (point-to-point links)
  • /16 = 65k hosts (large campus)