published: 13th of November 2021
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.
In order to utilise Open vSwitch you need to install the openvswitch-switch package.
apt install openvswitch-switch
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.
# /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.
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:
For my setup, management and guest VLANs are trunked to vmbr0 and vmbr1 is used as a port mirror destination.
OVS bridges are a virtual switch and are assigned the OVSBridge type.
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.
When the /etc/network/interfaces file is updated the networking service needs to be restarted for the config to take effect.
systemctl restart networking.service
Sometimes, that is not enough and you may also need to restart the host.
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.
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.