Skip to main content

Proxmox VE 9.0 - Network Interfaces

Introduction

Proxmox VE is using the Linux network stack. The configuration can be done either via the GUI, or by manually editing the file /etc/network/interfaces, which contains the whole network configuration. All Proxmox VE tools try hard to keep direct user modifications, but using the GUI is still preferable, because it protects you from errors.

A Linux bridge interface (commonly called vmbrX) is needed to connect guests to the underlying physical network. It can be thought of as a virtual switch which the guests and physical interfaces are connected to.

Apply Network Changes

Proxmox VE does not write changes directly to /etc/network/interfaces. Instead, we write into a temporary file called /etc/network/interfaces.new, this way you can do many related changes at once. This also allows to ensure your changes are correct before applying, as a wrong network configuration may render a node inaccessible.

If you change the network configuration via the GUI, you can click the Apply Configuration button. This will move changes from the staging interfaces.new file to /etc/network/interfaces and apply them live.

If you made manual changes directly to the /etc/network/interfaces file, you can apply them by running ifreload -a.

Another way to apply a new network configuration is to reboot the node.

Naming Conventions
  • Ethernet devices: en*
  • Bridge names: vmbr[N], where 0 ≤ N ≤ 4094
  • Bonds: bond[N], where 0 ≤ N
  • VLANs: Simply add the VLAN number to the device name, separated by a period (enp1s0.50, bond1.0)
Default Configuration using a Bridge

The Bridged model is the default mode on new Proxmox VE installations. Each guest system will have a virtual interface attached to the Proxmox VE bridge. This is similar in effect to having the Guest network card directly connected to a new switch on your LAN, the Proxmox VE host playing the role of the switch.

Bridges are like physical network switches implemented in software. All virtual guests can share a single bridge, or you can create multiple bridges to separate network domains. Each host can have up to 4094 bridges.

The installation program creates a single bridge named vmbr0, which is connected to the first Ethernet card. The corresponding configuration in /etc/network/interfaces might look like this:

auto lo
iface lo inet loopback

iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.10.2/24
        gateway 192.168.10.1
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0
VLANs

The networking layer supports different modes to implement VLANs, depending on the bridge configuration.

VLANs for Guest Networks

  • VLAN awareness on the Linux bridge: In this case, each guest's virtual network card is assigned to a VLAN tag, which is transparently supported by the Linux bridge. Trunk mode is also possible, but that makes configuration in the guest necessary.

  • Guest configured VLAN: VLANs are assigned inside the guest. In this case, the setup is completely done inside the guest and can not be influenced from the outside. The benefit is that you can use more than one VLAN on a single virtual NIC.

VLANs on the Host

To allow host communication with an isolated network. It is possible to apply VLAN tags to any network device (NIC, Bond, Bridge). In general, you should configure the VLAN on the interface with the least abstraction layers between itself and the physical NIC.


Sources

Fichero /etc/network/interfaces en Debian - Eduardo Collado
https://www.eduardocollado.com/2020/03/22/fichero-etc-network-interfaces-en-debian/

Network Configuration
https://pve.proxmox.com/wiki/Network_Configuration