CIDR Gaps

Find missing ranges within a set, optionally constrained by an envelope.

About This Tool

The CIDR Gaps Finder identifies unallocated IP address ranges within a set of CIDR blocks. This tool is essential for IP address management (IPAM), helping network administrators discover available address space for new allocations, identify fragmentation in subnet assignments, and optimize address utilization. It supports both unconstrained gap detection (finding all gaps between provided ranges) and envelope-constrained detection (finding gaps only within a specified boundary), making it versatile for various network planning scenarios.

How to Use

  1. Enter one or more allocated CIDR blocks in the "Set" field, one per line
  2. Optionally, enter an envelope CIDR block to constrain gap detection to a specific range
  3. Leave the envelope empty to find all gaps between the provided ranges
  4. Click "Compute" to calculate the gaps
  5. View separate results for IPv4 and IPv6 gaps
  6. The tool returns the minimal set of CIDR blocks representing unallocated space
  7. Empty results (—) indicate no gaps exist within the specified constraints

Features

  • Identifies unallocated IP address ranges (gaps) in CIDR sets
  • Supports both unconstrained and envelope-constrained gap detection
  • Returns minimal CIDR representation of gaps
  • Handles both IPv4 and IPv6 addresses
  • Processes multiple CIDR blocks simultaneously
  • Separate output for IPv4 and IPv6 ranges
  • Real-time calculation with compute button
  • Validates all CIDR notation inputs

Common Use Cases

  • Finding available IP space for new subnet allocations
  • Identifying fragmented address space in existing networks
  • Discovering unallocated ranges within ISP-assigned blocks
  • Planning subnet expansion by finding contiguous gaps
  • Auditing IP address utilization and waste
  • Optimizing address space by identifying consolidation opportunities
  • Documenting available capacity in IPAM systems
  • Finding space for new VLANs or security zones
  • Identifying gaps in cloud VPC subnet assignments
  • Planning address reclamation projects

Technical Details

The CIDR Gaps finder identifies the complement of a set of IP ranges, either globally or within a specified envelope. Gaps represent addresses that are not covered by any of the provided CIDR blocks.

Unconstrained Gap Detection (No Envelope):

  • Input: 10.0.0.0/30, 10.0.0.8/30
  • Gaps: 10.0.0.4/30 (addresses .4 to .7 between the two ranges)
  • Result shows only gaps between provided ranges

Envelope-Constrained Gap Detection:

  • Set: 192.168.1.0/26, 192.168.1.64/26 (first and second quarters)
  • Envelope: 192.168.1.0/24 (entire /24)
  • Gaps: 192.168.1.128/25 (third and fourth quarters, addresses .128 to .255)
  • Result shows all unallocated space within the envelope

Example - Complete Coverage (No Gaps):

  • Set: 192.168.1.0/25, 192.168.1.128/25
  • Envelope: 192.168.1.0/24
  • Gaps: None (—)
  • The two /25 blocks completely cover the /24 envelope

Algorithm:

  1. Parse and validate all input CIDR blocks
  2. If envelope provided, calculate address range to search within
  3. Merge and consolidate the input set to eliminate overlaps
  4. Identify all addresses within envelope (or between ranges) not in the set
  5. Convert gap addresses to minimal CIDR representation
  6. Separate results by IPv4 and IPv6

Practical Applications:

Gap detection is crucial for efficient IP address management. Common scenarios include finding available space in a /16 that's been subdivided into multiple /24s, identifying where new data center racks can be allocated addresses, or discovering unused ranges in legacy network allocations that can be reclaimed for modern use.

Performance Note:

For very large IPv6 envelopes with small allocated blocks, gap calculation can be computationally intensive. The tool optimizes by working with CIDR representations rather than individual addresses whenever possible.