> Documentation index for agents: /hcp/3.3/en/llms.txt

# Assign a network to a VDC

Assign a network to a VDC (virtual data center) when its virtual machines (VMs) need this network. A VM connects only to the networks of its VDC.

## Before you begin

- You need the **Cluster master** role or the **VDC admin** role in this VDC. **VDC admin** assigns only the networks they created; a network created by another user is assigned by **Cluster master**.
- The network is already created — [Create a network](/hcp/3.3/en/networks/create-network/index.md).

## Assign the network

1. In the left menu, select **Virtual Data Centers** → the VDC → **Networks**. By default, the networks already assigned to this VDC come first in the table.
2. Open the **Primary** tab if the **IP Data** tab is open.
3. Find the network. The **Assigned** column shows **Yes** for an assigned network and a dash for the others.
4. Click ⋯ in the network row and select **Assign**. If the item is missing, you do not have the rights to assign this network.

## Check the result

The web interface shows the notification **Network \<network number> is successfully assigned to vdc \<VDC number>**, and the **Assigned** column of the network shows **Yes**. The network appears in the **Name** field of the **Network 1** block on the **Networks** step of the **Create a Virtual Machine** window in this VDC.

If the network could not be assigned, the web interface shows a notification with the error, and the network stays unassigned. The error "You ain't the creator of network id \<number>" means that another user created the network: **Cluster master** assigns it.

## More

- A network created on the **Networks** page of a VDC with the **Add network** button is assigned to this VDC right away — [Create a network](/hcp/3.3/en/networks/create-network/index.md).
- You can assign one network to several VDCs. The VMs of these VDCs are then in the same network.
- To remove the assignment, click ⋯ in the network row and select **Deassign**. Center rejects the request while VMs of this VDC are connected to the network: the error "There are \<number> ports assigned to VMs". Center lists the VMs that hold the ports in the error data of the `vdc-deassign-network` API method; the web interface shows only the number of ports. Disconnect these VMs from the network first — [Connect a VM to a network](/hcp/3.3/en/vms/connect-vm-network/index.md).
- A network with an error is neither assigned nor deassigned: its row menu has the **Resolve network** item.
- Clicking a network row opens the network panel. In it, you change the network name and, for an assigned network, **Addrs limit** — how many addresses of the network the VMs of this VDC can use, if the address limit is enabled on the cluster.

## Next

- [Create a VM](/hcp/3.3/en/vms/create-vm/index.md)
- [Networks and IP pools](/hcp/3.3/en/networks/index.md) — how networks work.
- [VDCs](/hcp/3.3/en/vdcs/index.md) — what a VDC includes.

API methods: `vdc-assign-network`, `vdc-deassign-network` — in the [API reference](/hcp/3.3/en/api/methods/index.md).
