Management interface on tagged VLAN, on bond0

athompso

Renowned Member
Sep 13, 2013
129
8
83
Half question, half how-to...

I want a simple network configuration: 2 x 1Gbps Ethernet, bonded using 802.3AD (LACP), management interface on a VLAN.

As long as the management interface is NOT on a tagged VLAN, this is simple to set up. However, the policy here is to always have the untagged PVID = 1, and no IP subnets ever exist on VLAN 1. (This prevents all sorts of problems when mixing Cisco and non-Cisco switches.)

The only way I've found to accomplish this so far (using PVE 3.1) is to manually edit /etc/network/interfaces, and there's one "gotcha" to be aware of.

In my case, the management network is VLAN 4, and I *also* have a VM that needs access to VLAN 4. All the other VMs are on separate VLANs. The ethernet interfaces are named "eth0" and "eth1" (thankfully).

This is what /etc/network/interfaces looks like:
Code:
# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual
iface eth1 inet manual

auto bond0
iface bond0 inet manual
        slaves eth0 eth1
        bond_miimon 100
        bond_mode 802.3ad

auto bond0.4
iface bond0.4 inet manual
        vlan-raw-dev bond0

auto vmbr0
iface vmbr0 inet manual
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0

auto vmbr4
iface vmbr4 inet static
        address  192.168.X.Y
        netmask  255.255.255.0
        gateway  192.168.X.1
        bridge_ports bond0.4
        bridge_stp off
        bridge_fd 0

The catch is that I have to pre-create two bridges; vmbr0 so there's something for the VMs to attach to, but vmbr4 had to be manually pre-created. (I think the name is irrelevant, PVE appears to manage bridge names on the fly as of v3.1.) Well, actually, the catch is that I can attach a VM to any VLAN on vmbr0 *except* VLAN 4; if I want to reach VLAN 4, I have to attach the VM to vmbr4 instead of vmbr0.

Has anyone else found a better way of doing this?

-Adam Thompson
athompso@athompso.net
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!