IPv6 address compare
ipv6-address-compare · version 1.0.0 · URLs & IP addresses · free, no key needed
Compare two IPv6 addresses by their numeric 128-bit value.
Use when you need to: ipv6 address compare · compare ipv6 addresses · order ipv6 addresses.
Supported
- ipv6 address compare
- compare ipv6 addresses
- order ipv6 addresses
Not supported
- IPv4
- CIDR-aware comparison
Behavior
- address_a and address_b accept any RFC 4291 textual form (see ipv6-parse).
- order is "less" if address_a < address_b numerically, "greater" if address_a > address_b, "equal" otherwise.
Input
address_a(string, required): max length 45address_b(string, required): max length 45
Output
order(one of "less", "equal", "greater", required)
Limits
- max address length: 45
Example
Request input:
{
"address_a": "2001:db8::1",
"address_b": "2001:db8::2"
}
Response:
{
"result": {
"order": "less"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "ipv6-address-compare",
"version": "1.0.0",
"input": {
"address_a": "2001:db8::1",
"address_b": "2001:db8::2"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/ipv6-address-compare/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"address_a":"2001:db8::1","address_b":"2001:db8::2"}'
The machine-readable contract is at /v1/tools/ipv6-address-compare/versions/1.0.0.
CLI
node cli.mjs run ipv6-address-compare 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- IPv4 address compare: Compare two canonical IPv4 addresses by their numeric uint32 value.
- IPv6 address distance: Compute the signed integer distance between two IPv6 addresses (address_b minus address_a).
- IPv4 address distance: Compute the signed integer distance between two IPv4 addresses (address_b minus address_a).
- IPv6 address classify: Classify an IPv6 address against the static IANA IPv6 special-purpose address registry.
- IPv6 address offset: Add a signed integer offset to an IPv6 address, throwing if the result leaves the IPv6 address space.
- IPv6 in CIDR: Test whether an IPv6 address lies in a CIDR prefix whose host bits are zero.