Skip to main content
Last updated on

Network Interface on a VM

Each VM can have multiple Network Interfaces (NICs) to connect to several Networks/Subnets at the same time. Useful when:

  • Separating internal and public traffic onto two different interfaces.
  • A VM acts as a gateway or NAT between networks.
  • You need several internal IPs on the same VM (e.g. multiple services on the same host).

The Network tab on the VM detail page shows every Floating IP and Network Interface currently attached:

Network tab with Floating IP and Network Interfaces

Attach a new Network Interface

Step 1. Open the VM detail page

Go to Cloud Server → Servers → click the VM, then open the Network tab. In the Network interface section, click Gắn interface.

Network interface section with the Gắn interface button

Step 2. Pick the Network and how to attach

  • Network — pick the network to connect to.
  • Gắn theo (Attach by) — Subnet (default): the system allocates an IP from the subnet you pick, or Port: attach to an existing port on that network (e.g. one already configured with a static IP).

Click Gắn interface.

Attach Network Interface dialog — Network and Subnet/Port

The new interface appears in the list. Inside the OS, you may need to run dhclient, netplan apply or the equivalent for the OS to pick up the new interface.

Other actions on a Network Interface

Click next to any interface to:

  • Đổi số lượng IP (Change IP count) — increase or decrease the number of IPs assigned to the interface.
  • Cho phép address pair (Allow address pair) — declare an extra IP/CIDR (with an optional MAC) allowed to pass through this interface unfiltered — used for keepalived/VRRP-style setups or NAT pass-through.
  • Gỡ interface (Detach) — only detaches the interface from the VM; the port itself stays and can be re-attached later.
  • Gỡ và xoá interface (Detach and delete) — detaches and permanently deletes the interface.

Action menu on a Network Interface

Both detach actions ask for confirmation before proceeding.

Confirmation dialog to detach the Network Interface

You may lose your SSH session

If you detach the interface carrying your SSH session, you lose the connection immediately. Make sure at least one of these is still available:

See also