IPv6 CIDR parse
ipv6-cidr-parse · version 1.0.0 · URLs & IP addresses · free, no key needed
Parse an IPv6 CIDR block into its canonical network address, prefix, first/last address, and total address count.
Use when you need to: ipv6 cidr parse · ipv6 subnet info · ipv6 cidr to network details.
Supported
- ipv6 cidr parse
- ipv6 subnet info
- ipv6 cidr to network details
Not supported
- IPv4
- host-address CIDR notation (host bits must be zero)
- subnet-router anycast/usable-host distinctions
Behavior
- cidr is address/prefix (address in any RFC 4291 textual form) with prefix a canonical decimal integer 0-128 and no leading zeros except 0.
- The network address must have host bits zero; otherwise the tool throws "cidr host bits must be zero".
- network, first_address and last_address are RFC 5952 canonical strings; network equals first_address.
- total_count is the canonical decimal string 2^(128-prefix), the number of addresses in the block. IPv6 has no broadcast address and this tool draws no usable/reserved distinction.
Input
cidr(string, required): max length 49
Output
network(string, required): max length 45prefix(integer, required): min 0; max 128first_address(string, required): max length 45last_address(string, required): max length 45total_count(string, required): max length 39; pattern^(0|[1-9][0-9]*)$
Limits
- max cidr length: 49
- prefix min: 0
- prefix max: 128
Example
Request input:
{
"cidr": "2001:db8::/32"
}
Response:
{
"result": {
"network": "2001:db8::",
"prefix": 32,
"first_address": "2001:db8::",
"last_address": "2001:db8:ffff:ffff:ffff:ffff:ffff:ffff",
"total_count": "79228162514264337593543950336"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "ipv6-cidr-parse",
"version": "1.0.0",
"input": {
"cidr": "2001:db8::/32"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/ipv6-cidr-parse/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"cidr":"2001:db8::/32"}'
The machine-readable contract is at /v1/tools/ipv6-cidr-parse/versions/1.0.0.
CLI
node cli.mjs run ipv6-cidr-parse 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- IPv4 CIDR parse: Parse an IPv4 CIDR block into its network, broadcast, netmask, wildcard mask, usable host range and address counts.
- IPv6 CIDR contains: Test whether one IPv6 CIDR block fully contains another IPv6 CIDR block.
- IPv6 CIDR overlap: Test whether two IPv6 CIDR blocks overlap (share at least one address).
- 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.
- IPv6 range to cidrs: Convert an arbitrary IPv6 address range into the minimal list of CIDR blocks that exactly covers it.