---
title: "calicoctl ipam split"
description: "Reference for the calicoctl IPAM split command in Calico Open Source, used to split an existing IP pool into smaller pools."
product: "Calico Open Source"
version: "3.32 (latest)"
section: "Reference"
canonical_url: "https://docs.tigera.io/calico/latest/reference/calicoctl/ipam/split"
---

# calicoctl ipam split

This section describes the `calicoctl ipam split` command.

Read the [calicoctlOverview](https://docs.tigera.io/calico/latest/reference/calicoctl/overview.md) for a full list of calicoctl commands.

## Display the help text for `calicoctl ipam split` command

Run `calicoctl ipam split --help` to display the following help menu for the command.

```text
Usage:
  <BINARY_NAME> ipam split <NUMBER> [--cidr=<CIDR>] [--name=<POOL_NAME>] [--config=<CONFIG>] [--allow-version-mismatch]

Options:
  -h --help                    Show this screen.
  -c --config=<CONFIG>         Path to the file containing connection configuration in
                               YAML or JSON format.
                               [default: /etc/calico/calicoctl.cfg]
     --cidr=<CIDR>             CIDR of the IP pool to split.
     --name=<POOL_NAME>        Name of the IP pool to split.
     --allow-version-mismatch  Allow client and cluster versions mismatch.

Description:
  The ipam split command splits an IP pool specified by the specified CIDR or name
  into the specified number of smaller IP pools. Each child IP pool will be of equal
  size. IP pools can only be split into a number of smaller pools that is a power
  of 2.

Examples:
  # Split the IP pool specified by 172.0.0.0/8 into 2 smaller pools
  <BINARY_NAME> ipam split --cidr=172.0.0.0/8 2
```

### Prerequisites

To split an IP pool, you will first need to lock the Calico database so that no IPAM data can change during the split. This is accomplished by using the [`calicoctl datastore migrate lock` command](https://docs.tigera.io/calico/latest/reference/calicoctl/datastore/migrate/lock.md). To continue normal IPAM operation, you will need to unlock the calico datastore after the split with the [`calicoctl datastore migrate unlock` command](https://docs.tigera.io/calico/latest/reference/calicoctl/datastore/migrate/unlock.md).

### Examples

Lock the Calico datastore.

```bash
calicoctl datastore migrate lock
```

Split the IP pool specified by 172.0.0.0/15 into 2 smaller pools.

```bash
calicoctl ipam split --cidr=172.0.0.0/15 2
```

This should create 2 IP pools, one covering CIDR `172.0.0.0/16` and one covering CIDR `172.1.0.0/16`.

Unlock the Calico datastore to restore normal IPAM operation.

```bash
calicoctl datastore migrate unlock
```

### General options

```text
  -c --config=<CONFIG>         Path to the file containing connection configuration in
                               YAML or JSON format.
                               [default: /etc/calico/calicoctl.cfg]
```

## See also

- [Install calicoctl](https://docs.tigera.io/calico/latest/operations/calicoctl/install.md)
- [Resources](https://docs.tigera.io/calico/latest/reference/resources/overview.md) for details on all valid resources, including file format and schema
