Calculates the total number of addresses in the CIDR range.
The total number of addresses in the CIDR range as a BigInt.
Generates IPv6 addresses within the CIDR range. Note: For large CIDR ranges, this may generate an extremely large number of addresses. Use with caution and consider using a limit parameter.
Optionallimit: bigintOptional maximum number of addresses to generate (defaults to all addresses).
A generator that yields each IPv6 address in the CIDR range.
Checks if this CIDR is equal to another CIDR.
The other IPv6 CIDR to compare with.
True if both CIDRs have the same base address and range; otherwise, false.
Gets the first usable address in the CIDR range.
The first usable IPv6 address, or undefined if the range is /128.
Gets the last usable address in the CIDR range.
The last usable IPv6 address, or undefined if the range is /128.
Checks if the given IPv6 address is within the CIDR range.
The IPv6 address to check.
True if the address is within the CIDR range; otherwise, false.
Gets the next sequential CIDR.
The next CIDR, or undefined if there is no next CIDR.
Checks if this CIDR overlaps with another CIDR.
The other IPv6 CIDR to check for overlap.
True if the CIDRs overlap; otherwise, false.
Gets the previous sequential CIDR.
The previous CIDR, or undefined if there is no previous CIDR.
Gets the address and range parts of the IPv6 CIDR.
A tuple containing the IPv6 address and the CIDR range.
Splits the CIDR into smaller subranges of the specified new range.
The new CIDR range for the subnets.
An array of Ipv6Cidr instances representing the subnets.
Splits the CIDR into sequential subranges with the specified CIDR ranges. Each range in the input array creates a subrange starting where the previous one ended.
An array of CIDR range values (e.g., [48, 36, 48]).
An array of Ipv6Cidr instances representing the subnets.
Represents an IPv6 CIDR block with utility methods for subnet operations.
While you can instantiate this class directly, it is recommended to use the ipv6.cidr shorthand method from the
ipv6namespace instead.Example: Creating CIDR blocks (prefer the shorthand)
Example: Getting CIDR properties
Example: Working with usable addresses
Example: Checking containment and overlap
Example: Splitting into subranges
Example: Navigating sequential CIDRs