# IPv6 CIDR aggregate

`ipv6-cidr-aggregate` · version 1.0.0 · URLs & IP addresses · free, no key needed

Merge a list of IPv6 CIDR blocks into the minimal equivalent list of non-overlapping CIDR blocks.

**Use when you need to: ipv6 cidr aggregate · summarize ipv6 cidr list · collapse ipv6 subnets.**

## Supported

- ipv6 cidr aggregate
- summarize ipv6 cidr list
- collapse ipv6 subnets
- ipv6 cidr supernet merge

## Not supported

- IPv4
- preserving input order or duplicate entries

## Behavior

- cidrs is a non-empty array of at most 512 address/prefix strings (address in any RFC 4291 textual form), each with host bits zero.
- Overlapping and directly adjacent blocks are merged; a block fully covered by another is absorbed into it.
- aggregated is the minimal ordered (ascending network address) list of CIDR blocks whose union equals the union of the input blocks.
- Throws if the result would exceed 4096 blocks.

## Input

- `cidrs` (array of string, required): min items 1; max items 512; each max length 49

## Output

- `aggregated` (array of string, required): max items 4096; each max length 49
- `count` (integer, required): min 1; max 4096

## Limits

- max cidr length: 49
- max input cidrs: 512
- max output blocks: 4096

## Example

Request input:

```json
{
  "cidrs": [
    "2001:db8::/33",
    "2001:db8:8000::/33"
  ]
}
```

Response:

```json
{
  "result": {
    "aggregated": [
      "2001:db8::/32"
    ],
    "count": 1
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "ipv6-cidr-aggregate",
  "version": "1.0.0",
  "input": {
    "cidrs": [
      "2001:db8::/33",
      "2001:db8:8000::/33"
    ]
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/ipv6-cidr-aggregate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"cidrs":["2001:db8::/33","2001:db8:8000::/33"]}'
```

The machine-readable contract is at [/v1/tools/ipv6-cidr-aggregate/versions/1.0.0](/v1/tools/ipv6-cidr-aggregate/versions/1.0.0).

### CLI

```sh
node cli.mjs run ipv6-cidr-aggregate 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [IPv4 CIDR aggregate](/tools/ipv4-cidr-aggregate): Merge a list of IPv4 CIDR blocks into the minimal equivalent list of non-overlapping CIDR blocks.
- [IPv6 CIDR subnets](/tools/ipv6-cidr-subnets): Split an IPv6 CIDR block into the full ordered list of equal-size subnets at a given longer prefix.
- [IPv6 range to cidrs](/tools/ipv6-range-to-cidrs): Convert an arbitrary IPv6 address range into the minimal list of CIDR blocks that exactly covers it.
- [IPv4 CIDR subnets](/tools/ipv4-cidr-subnets): Split an IPv4 CIDR block into the full ordered list of equal-size subnets at a given longer prefix.
- [IPv4 range to cidrs](/tools/ipv4-range-to-cidrs): Convert an arbitrary IPv4 address range into the minimal list of CIDR blocks that exactly covers it.
- [IPv6 CIDR contains](/tools/ipv6-cidr-contains): Test whether one IPv6 CIDR block fully contains another IPv6 CIDR block.
