• Subdivides an IPv4 CIDR block into smaller blocks of a specified prefix length.

    Parameters

    • cidr: string

      The CIDR block to subdivide

    • newPrefixLength: number

      The prefix length for the subdivided blocks

    Returns string[]

    Array of subdivided CIDR blocks

    Throws

    If the CIDR is invalid or can't be subdivided as requested