I've tried asking on ServerFault (https://serverfault.com/questions/1134269/where-to-put-vlan-interface) because it's not strictly a proxmox question. But I received no answers, only a suggestion to post on this forum, so I'm reposting here.
I have 2 x 1 Gbps network interfaces. On top of them I have Linux bond (LACP mode, but probably unimportant here). Then, on top of bond0 I have Linux bridge vmbr0, that is "VLAN aware". vmbr0 is primarily used for VM-s. A VLAN interface will be used to access the host (host management) and it needs to be in another VLAN.
Where should I put a Linux VLAN interface for host management ? There's basically 3 ways to do it, I can:
If I instead put a VLAN interface on vmbr0 then everything works, including having a default gateway there. So, sure, I can just go on with that - but. I'm here because I need some expert help to understand why putting a VLAN on one interface or the other is better/preferred/etc and why it doesn't work if I put it directly on bond0 ?
Anyways, where would you put it ? What place should be preferred (and why).
Thanks in advance
This is my config:
I have 2 x 1 Gbps network interfaces. On top of them I have Linux bond (LACP mode, but probably unimportant here). Then, on top of bond0 I have Linux bridge vmbr0, that is "VLAN aware". vmbr0 is primarily used for VM-s. A VLAN interface will be used to access the host (host management) and it needs to be in another VLAN.
Where should I put a Linux VLAN interface for host management ? There's basically 3 ways to do it, I can:
- put it on a bond0 (with bond0.VLAN_ID)
- put it on vmbr0 (with vmbr0.VLAN_ID)
- install a separate Linux VLAN interface (vlanX) with raw device that is either bond0 or vmbr0.
If I instead put a VLAN interface on vmbr0 then everything works, including having a default gateway there. So, sure, I can just go on with that - but. I'm here because I need some expert help to understand why putting a VLAN on one interface or the other is better/preferred/etc and why it doesn't work if I put it directly on bond0 ?
Anyways, where would you put it ? What place should be preferred (and why).
Thanks in advance
This is my config:
Bash:
auto lo
iface lo inet loopback
auto enp11s0
iface enp11s0 inet manual
mtu 9000
#Onboard port 1 (only IMM)
iface enx02215e6bcbe5 inet manual
mtu 9000
auto enp16s0f0
iface enp16s0f0 inet manual
mtu 9000
#Intel PCIEx port 1
auto enp16s0f1
iface enp16s0f1 inet manual
mtu 9000
#Intel PCIEx port 2
auto enp21s0
iface enp21s0 inet manual
mtu 9000
#Onboard port 2
auto bond0
iface bond0 inet manual
bond-slaves enp16s0f0 enp16s0f1
bond-miimon 100
bond-mode 802.3ad
bond-xmit-hash-policy layer3+4
mtu 9000
#LACP link
auto vmbr0
iface vmbr0 inet static
address 10.10.40.42/23
bridge-ports bond0
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094
mtu 9000
auto vmbr0.23
iface vmbr0.23 inet static
address 10.10.23.2/24
gateway 10.10.23.254
mtu 8000
#host management