---
title: "ezgh compute ipv4-addresses associate"
description: "Associate an IPv4 address with a network interface."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh compute ipv4-addresses associate

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh compute ipv4-addresses associate <address> --network-interface <interface> [--allow-reassociation] [flags]
```

Associate an IPv4 address with a network interface (ID, UUID or name). On an interface that isn't running on a host it's done at once; otherwise its state is associating until the host confirms. An address associated with another interface moves only with `--allow-reassociation`. On a private interface the address is mapped to its private one (the instance never sees it), and the interface's VPC needs a Network Gateway (vpc_has_no_gateway).

Part of [`ezgh compute ipv4-addresses`](/cli/reference/compute-ipv4-addresses).

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--allow-reassociation` | boolean |  | move it if it's associated with another interface |
| `--network-interface` | string |  | the network interface (ID, UUID or name) |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/compute-ipv4-addresses-associate/index.mdx
