Intro

Proxmox has two kinds of virtual switches that can be utilised. Linux bridges (the default) and Open vSwitch (OVS). Linux Bridges are generally fine unless you want to configure a lot of VLANs and/or do port mirroring. I have a use-case for both, so in this post, I will show you how to configure Proxmox to use Open vSwitch.

The following software was used in this post.

  • Proxmox - 7.0-11
Note
All commands run on the Proxmox host will be executed as the root user.

Requried Packages

In order to utilise Open vSwitch you need to install the openvswitch-switch package.

cmd
apt install openvswitch-switch

Network Config

The /etc/network/interfaces file is used to configure the networking for Proxmox nodes. The below is the config I use for my LAB node.

file
# /etc/network/interfaces
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet manual
	ovs_type OVSPort
	ovs_bridge vmbr0

auto enp1s0
iface enp1s0 inet manual
	ovs_type OVSPort
	ovs_bridge vmbr1

auto vlan10
iface vlan10 inet static
	address 172.16.255.12/24
	gateway 172.16.255.1
	ovs_type OVSIntPort
	ovs_bridge vmbr0
	ovs_options tag=10

auto vmbr0
iface vmbr0 inet manual
	ovs_type OVSBridge
	ovs_ports eno1 vlan10

auto vmbr1
iface vmbr1 inet manual
	ovs_type OVSBridge
	ovs_ports enp1s0

The above config can be summarised as follows.

Physical Interfaces

My Proxmox node has two physical interfaces: eno1 and enp1s0 . Physical interfaces are assigned the OVSPort interface type. The ports are mapped to OVS bridges as follows:

  • eno1 - vmbr0
  • enp1s0 - vmbr1

For my setup, management and guest VLANs are trunked to vmbr0 and vmbr1 is used as a port mirror destination.

OVS Bridges

OVS bridges are a virtual switch and are assigned the OVSBridge type.

VLAN Interfaces

VLAN interfaces are used to assign IP addresses to the Proxmox host. I have a single vlan10 interface which is used for management of the host. VLAN interfaces are assigned the OVSIntPort interface type.

Apply Config

When the /etc/network/interfaces file is updated the networking service needs to be restarted for the config to take effect.

cmd
systemctl restart networking.service

Sometimes, that is not enough and you may also need to restart the host.

cmd
reboot now
Important
I found that more ofthen than not, the host needs to be restarted after changing from Linux bridges to OVS. To be safe, before attempting anything, migrate the VMs to another host, or shut them down.

Thats it! Now, when you create a VM, you can assign it a VLAN ID and there is nothing to do on the host. The VLAN will be trunked through to the network switch.

Outro

In this post, I showed you how to configure Proxmox to utilise Open vSwitch instead of Linux Bridges. In a future post, I will show you how to enable port mirroring on Open vSwitch bridges.