Skip to main content

Network interface

Overview

A network interface (Network Interface Card, NIC) is the virtual NIC that connects a VM to a subnet. One is created automatically when you create a VM, but you can also pre-create NICs separately or manage them directly when you need a multi-NIC configuration.

  • A VM can have multiple NICs attached (and they can sit on different subnets)
  • Each NIC carries one IP and one MAC
  • Public IPs attach to the NIC to provide internet access

Creating a NIC

  1. Under Network > Network Interfaces, click Create Network Interface.

  2. Configure the following:

    FieldDescription
    NameAn identifying name (e.g. web-nic-1)
    ZoneMust be the same zone as the VM it will attach to
    SubnetThe subnet the interface belongs to
    IP addressChoose any IP inside the subnet CIDR (leave blank to auto-assign)
    MAC addressAuto-generated when blank; for manual entry, use 00:1B:44:11:3A:B7 format
    Disaster recoveryMust match the VM (DR VMs accept only DR NICs)
    IP forwardingAllow the NIC to send/receive packets not destined to its own IP (off by default) — for NAT/router/VPN use
  3. Click Create.

DR matching rule

DR VMs accept only DR-enabled NICs, and standard VMs accept only standard NICs. Mismatches are rejected at attach time.


Attaching and detaching a NIC

  1. Open the target VM in Compute > Virtual Machines.
  2. Move the VM to the Stopped state.
  3. In the VM edit screen, under Network Interfaces, add the NIC to attach.
  4. Save and restart the VM.

To detach, remove the NIC from the same screen. The NIC resource remains after detachment and can be reattached to a different VM.


Attaching a public IP

Public IPs attach to a VM via the NIC. See Public IP for the detailed procedure.


IP forwarding

By default, a NIC drops packets whose destination IP does not match its own IP. To use a VM as a NAT gateway, software router, or VPN appliance—relaying traffic bound for other destinations—you must enable IP forwarding.

  • When enabled, the NIC can send and receive packets that are not addressed to its own IP.
  • Configure it under the IP forwarding field when creating the NIC.
  • You must also enable kernel IP forwarding inside the VM's OS for packets to actually route (e.g. net.ipv4.ip_forward=1 on Linux).
warning

IP forwarding lets the NIC pass traffic with arbitrary source and destination addresses. Enable it only when necessary, and restrict traffic with Firewall rules.


Managing NICs

The Network > Network Interfaces list shows:

ColumnDescription
NameNIC identifier
IP / MACAssigned private IP and MAC
Attached VMThe VM it's attached to (blank if unattached)
SubnetThe subnet it belongs to
StatusActive / Deleted

To delete a NIC, detach it from both the public IP and the VM first, then remove it.

Network interfaces used by a load balancer cannot be deleted

A network interface registered as a server in a load balancer rule cannot be deleted. The same applies when deleting a VM together with its network interfaces. Remove the server from the load balancer rule or delete the load balancer first.


Next steps

  • Subnet: designing the IP range the NIC will live in
  • Public IP: attaching a public IP to a NIC for internet access
  • Firewall: controlling traffic to the NIC (rules are per virtual network)