[SOLVED] ifupdown2 bond vlan bridge config

Claudiu Popescu

Active Member
Jul 24, 2018
15
0
41
Hi,

In proxmox 7 the old network config does not work anymore.

So what worked before:
Code:
auto lo
iface lo inet loopback
 
auto enp175s0f0
iface enp175s0f0 inet manual
 
auto enp175s0f1
iface enp175s0f1 inet manual

# Bond for network HA
auto bond0
iface bond0 inet manual
        bond-slaves enp175s0f0 enp175s0f1
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer2+3

# Bridge for VMs with public IP
auto vmbr0
iface vmbr0 inet manual
        bridge-ports bond0.26
        bridge-stp off
        bridge-fd 0

# Internal network
auto vmbr1
iface vmbr1 inet static
    address  10.10.0.10/21
    gateway  10.10.0.1
    bridge_ports bond0.2
    bridge_stp off
    bridge_fd 0

This kind of config does not work anymore with a fresh proxmox 7 install. Here is what I ended up with but it does not detect a usable bridge interface for VMs:

Code:
auto lo
iface lo inet loopback

iface enp129s0f0 inet manual

iface enp129s0f1 inet manual

auto bond0
iface bond0
    bond-slaves enp129s0f0 enp129s0f1
    bond-mode 802.3ad
    bond-miimon 100
    bond-use-carrier 1
    bond-lacp-rate 1
    bond-min-links 1
    bond-xmit-hash-policy layer3+4
    bridge-vids 2 26

auto vmbr
iface vmbr
    bridge-ports bond0
    bridge-vlan-aware yes
    bridge-stp off
    bridge-fd 0

auto vmbr.2
iface vmbr.2
    # This does not work, IP is not added on the interface
    address 10.10.0.10/21
    gateway 10.10.0.1
    # Using post-up to add IP and gateway
    post-up ip a a 10.10.0.10/21 dev vmbr.2
    post-up ip r a default via 10.10.0.1

auto vmbr.26
iface vmbr.26

I am sure I am doing something wrong but I can't figure out what.
 
That was a mistake indeed but it is not solving the problem. It will allow me to select vmbr0 as bridge interface for VMs but none of vmbr0.2 or vmbr0.26. Testing proxmox web configuration again, even though last time it broke the network entirely.
 
That was a mistake indeed but it is not solving the problem. It will allow me to select vmbr0 as bridge interface for VMs but none of vmbr0.2 or vmbr0.26. Testing proxmox web configuration again, even though last time it broke the network entirely.

the vmbr0.2 interface is not a bridge, it's an internal vlan interface to setup an ip in your hypervisor for this bridge.

to use vlan you can:
- use vlan tag on your vm nic directly

if you want to create "vlan bridge":

- don't use vlan-aware bridge, and create a bridge with bond.X as bridge ports
- use the new sdn feature (works with vlanware or non vlanware bridge): https://pve.proxmox.com/pve-docs/chapter-pvesdn.html
 
Yes, for some reason the proxmox web interface has an issue. At least editing an existing network config file.
This is how the updated diff looks in web UI:
Screenshot 2022-08-31 at 10.35.55.png
 
A working updated version:

Code:
auto lo
iface lo inet loopback

iface enp129s0f0 inet manual

iface enp129s0f1 inet manual

iface bond0
    bond-slaves enp129s0f0 enp129s0f1
    bond-mode 802.3ad
    bond-miimon 100
    bond-use-carrier 1
    bond-lacp-rate 1
    bond-min-links 1
    bond-xmit-hash-policy layer3+4
    mtu 9000

auto vmbr0
iface vmbr0 inet static
        address 192.168.0.3/24
        bridge-ports bond0.26
        bridge-stp off
        bridge-fd 0
        mtu 9000

auto vmbr2
iface vmbr2 inet static
        address 10.10.0.3/21
        gateway 10.10.0.1
        bridge-ports bond0.2
        bridge-stp off
        bridge-fd 0
        mtu 9000


source /etc/network/interfaces.d/*

Will play with it a bit more and see how it behaves. Thank you.
 
does the below not work? All your VM/LXC would use vmbr0 and with either the vlan2 or vlan26 (or whatever vlan you add) defined at the proxmox/vm/network-device level or within the VM itself.

Code:
auto lo
iface lo inet loopback

iface enp129s0f0 inet manual

iface enp129s0f1 inet manual

iface bond0
    bond-slaves enp129s0f0 enp129s0f1
    bond-mode 802.3ad
    bond-miimon 100
    bond-use-carrier 1
    bond-lacp-rate 1
    bond-min-links 1
    bond-xmit-hash-policy layer3+4
    mtu 9000

auto vmbr0
iface vmbr0 inet manual
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094 # you could limit usable VLAN for VM/LXC here if you would like
        mtu 9000

auto vmbr0.2
iface vmbr0.2 inet static
        address 10.10.0.3/21
        gateway 10.10.0.1

auto vmbr0.26
iface vmbr0.26 inet static
        address 192.168.0.3/24

source /etc/network/interfaces.d/*
 
Last edited:

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!