intermediate3 min readPart 1 of 1

Proxmox Bond NICs and VLANs

In the video below, we show how to configure Proxmox to use multiple network interfaces and support VLANs

TechLogHub
·

Prerequisites

  • •Basic Linux knowledge
  • •Virtualization fundamentals

What You'll Learn

  • Configure and manage Proxmox VE
  • Understand Proxmox VE architecture and features

Proxmox Bond NICs and VLANs

Apr 17, 2022

· 3 mins read

_

#### In the video below, we show how to configure Proxmox to use multiple network interfaces and support VLANs

We show how to bind multiple interfaces together for more network throughput or network redundancy

And cover how to re-configure the management interface so it’s in your management VLAN

NOTE: Because we are switching to VLANs, the hypervisor will now no longer be accessible. However, connectivity will be restored in the next step so make sure you have the means to modify the network switch attached to the hypervisor

We show how to configure a network switch to support VLAN tagging for Proxmox

And how to add additional VLAN interfaces to Proxmox as well as how to configure virtual machines to support VLAN tagging

Useful links:

https://pve.proxmox.com/wiki/Network_Configuration#_vlan_802_1q

Steps taken

-

Configure Proxmox

The default installation creates a dedicated management interface so we need to reconfigure Proxmox to bind the physical interfaces into a bond

The quickest way is to edit the /etc/network/interfaces

cp /etc/network/interfaces /etc/network/interfaces.bak
nano /etc/network/interfaces

To load balance traffic, the recommendation is to use LACP, for example

auto lo
iface lo inet loopback

iface enp0s25 inet manual

iface enp7s0 inet manual

auto bond0 iface bond0 inet manual bond-slaves enp0s25 enp7s0 bond-miimon 100 bond-xmit-hash-policy layer2+3 bond-mode 802.3ad

NOTE: If your switches support technology such as MLAG, you can connect the interfaces to different switches. Otherwise they need to be connected to the same switch

To support network redundancy, an example would be

auto lo  
iface lo inet loopback  

iface enp0s25 inet manual

iface enp7s0 inet manual

auto bond0 iface bond0 inet manual bond-slaves enp0s25 enp7s0 bond-miimon 100 bond-xmit-hash-policy layer2+3 bond-mode 802.3ad bond-mode active-backup bond-primary enp0s25

Either way, we need to reconfigure Proxmox with a management VLAN interface and make the Linux bridge VLAN aware. For example, to use VLAN 100

auto vmbr0.100  
iface vmbr0.100 inet static  
	address 192.168.100.10/24
	gateway 192.168.100.254
       
auto vmbr0  
iface vmbr0 inet manual  
	bridge-ports bond0
	bridge-stp off
	bridge-fd 0
	bridge-vlan-aware yes
	bridge-vids 2-4092

Then we reboot Proxmox to make sure the changes are applied

-

Configure Switch

Because Proxmox is now doing VLAN tagging but the network switch is not, we cannot access Proxmox remotely anymore so we need to reconfigure the switch ports

We need to turn the port into a trunk port i.e. one which supports multiple VLANs and set the default, PVID or native VLAN to something unused

Once this is done, the switch will send VLAN tagged traffic to Proxmox and our connection will be restored

-

Add VLAN interfaces to Proxmox

Proxmox now has a VLAN aware bridge, so we can add VLAN interfaces to it for direct access to a storage VLAN for instance

To do this select the computer in the left hand pane, navigate to System | Network and from the Create drop down menu select Linux VLAN

Change the name to match the bridge and VLAN ID, for example for VLAN 200, we’d use vmbr0.200

Give the interface an IP address and mask, for example, 192.168.200.10/24

Then click Create

On the switch, update the port connected to Proxmox to allow this VLAN

Proxmox should now have access to other computers on your network in this VLAN

-

Assign VMs to VLANs

Because Proxmox and the switch are using VLAN tagging, virtual machines will need to support VLANs

For existing virtual machines, select the VM in the left hand pane then select Hardware

Click on the Network Device and click Edit

In the VLAN Tag field, enter the VLAN ID then click OK

On the switch, update the port connected to Proxmox to allow this VLAN

Repeat this for any other interfaces the VM has

For new VMs, add the VLAN tag as part of the installation process

Sharing is caring!_

Please enable JavaScript to view the comments powered by Disqus.

virtualizationproxmoxhypervisorhome-labvlannic-bond

Keep the references coming

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.