IPv6 range to cidrs
ipv6-range-to-cidrs · version 1.0.0 · URLs & IP addresses · free, no key needed
Convert an arbitrary IPv6 address range into the minimal list of CIDR blocks that exactly covers it.
Use when you need to: ipv6 range to cidr · convert ipv6 range to cidrs · summarize ipv6 address range.
Supported
- ipv6 range to cidr
- convert ipv6 range to cidrs
- summarize ipv6 address range
Not supported
- IPv4
- hyphenated single-string ranges
Behavior
- first_address and last_address accept any RFC 4291 textual form (see ipv6-parse); first_address must not exceed last_address as a 128-bit value.
- cidrs is the minimal ordered list of non-overlapping CIDR blocks (largest-first at each step) whose union is exactly [first_address, last_address].
- A single address (first_address equal to last_address) yields one /128 block.
Input
first_address(string, required): max length 45last_address(string, required): max length 45
Output
cidrs(array of string, required): max items 256; each max length 49count(integer, required): min 1; max 256
Limits
- max address length: 45
- max output blocks: 256
Example
Request input:
{
"first_address": "2001:db8::9",
"last_address": "2001:db8::b"
}
Response:
{
"result": {
"cidrs": [
"2001:db8::9/128",
"2001:db8::a/127"
],
"count": 2
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "ipv6-range-to-cidrs",
"version": "1.0.0",
"input": {
"first_address": "2001:db8::9",
"last_address": "2001:db8::b"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/ipv6-range-to-cidrs/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"first_address":"2001:db8::9","last_address":"2001:db8::b"}'
The machine-readable contract is at /v1/tools/ipv6-range-to-cidrs/versions/1.0.0.
CLI
node cli.mjs run ipv6-range-to-cidrs 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- IPv4 range to cidrs: Convert an arbitrary IPv4 address range into the minimal list of CIDR blocks that exactly covers it.
- IPv6 address offset: Add a signed integer offset to an IPv6 address, throwing if the result leaves the IPv6 address space.
- IPv6 CIDR aggregate: Merge a list of IPv6 CIDR blocks into the minimal equivalent list of non-overlapping CIDR blocks.
- IPv6 CIDR parse: Parse an IPv6 CIDR block into its canonical network address, prefix, first/last address, and total address count.
- IPv6 in CIDR: Test whether an IPv6 address lies in a CIDR prefix whose host bits are zero.
- IPv6 parse: Parse an IPv6 address (any RFC 4291 textual form) into its 8 hextets and a 128-bit integer string.