---
title: "IPAM configuration"
description: "Reference for the IP address management configuration resource in Calico Open Source that sets cluster-wide options such as strict affinity."
product: "Calico Open Source"
version: "3.33 (latest)"
section: "Reference"
canonical_url: "https://docs.tigera.io/calico/latest/reference/resources/ipamconfig"
---

# IPAM configuration

An IP address management (IPAM) configuration resource (IPAMConfiguration) represents global IPAM configuration options. IPAMConfiguration is a cluster-scoped resource. There is only one, and its name must be `default`.

For `kubectl` commands, you can use the aliases `ipamconfiguration.projectcalico.org`, `ipamconfigurations.projectcalico.org`, `ipamconfiguration.p`, and `ipamconfigurations.p`.

## Sample YAML

This sample limits each node to four blocks and keeps KubeVirt VM addresses across restarts and migrations.

```yaml
apiVersion: projectcalico.org/v3
kind: IPAMConfiguration
metadata:
  name: default
spec:
  strictAffinity: false
  maxBlocksPerHost: 4
  kubeVirtVMAddressPersistence: Enabled
```

## Definition

### Metadata

| Field  | Description                                    | Accepted Values | Schema | Default |
| ------ | ---------------------------------------------- | --------------- | ------ | ------- |
| `name` | The name of this IPAM configuration. Required. | `default`       | string |         |

### Spec

| Field                          | Description                                                                                                                           | Accepted Values       | Schema  | Default   |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ------- | --------- |
| `strictAffinity`               | When `strictAffinity` is `true`, borrowing IP addresses is not allowed.                                                               | `true`, `false`       | boolean | `false`   |
| `maxBlocksPerHost`             | The max number of blocks that can be affine to each host.                                                                             | `0` to `1000000`      | integer | `20`      |
| `kubeVirtVMAddressPersistence` | Controls whether KubeVirt VMs retain persistent IP addresses across lifecycle events such as restart or migration. Requires KubeVirt. | `Enabled`, `Disabled` | string  | `Enabled` |
| `ipCooldownSeconds`            | The minimum age, in seconds, of a released IP address in a block before it is reused. If `0`, IP addresses can be reused immediately. | `0` to `1200`         | integer | `0`       |

## Additional resources

- [IP pool](https://docs.tigera.io/calico/latest/reference/resources/ippool.md)
- [Block affinity](https://docs.tigera.io/calico/latest/reference/resources/blockaffinity.md)
