Allocates CIDR blocks contiguously from a base CIDR. This ensures that all allocations are sequential and non-overlapping.

Constructors

Methods

  • Allocates a CIDR block with the specified prefix length. The allocation is made contiguously from the current position.

    Parameters

    • prefixLength: string

      The prefix length for the new block (format: '/16')

    Returns string

    The allocated CIDR block

    Throws

    If there's not enough space or invalid prefix