Passing VLAN trunks to VMs while having Proxmox IPs on some VLANs?

vaizki

New Member
May 24, 2024
2
0
1
Moving from ESXi to Proxmox finally.. but the network config has (also) me a bit stumped. Also first post...
I have a bunch of tagged VLANs on the Ethernet to my Proxmox and I need to
  • Get Proxmox to have IPs on a few of these VLANs (management and NFS storage)
  • Pass through full trunks to a few VMs
  • Pass individual VLANs to many VMs
The current config I have is:
  • eno1np0 is the physical interface
  • vmbr0 has eno1np0 as the only slave, naturally no IP, just VMs that need a full trunk
  • eno1np0.1 is VLAN 1
  • vmbr1 has eno1np0.1 as slave and no IP, just many VMs
  • eno1np0.40 is VLAN 40 needed by Proxmox
  • vmbr40 has eno1np0.40 as slave and has IP of 10.0.40.1
The problem is that as soon as I create eno1np0.40, the "trunk" vmbr0 stops receiving traffic for VLAN 40 so the VMs don't get it either. I have confirmed this with tcpdump. If I remove the subinterface, traffic gets to the trunk again.

So how can pass through full trunks into VMs while having a Promox IP also on one or more of them VLANs?

Code:
iface eno1np0 inet manual

auto eno1np0.1
iface eno1np0.1 inet manual

auto eno1np0.40
iface eno1np0.40 inet manual


auto vmbr0
iface vmbr0 inet manual
        bridge-ports eno1np0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094


auto vmbr1
iface vmbr1 inet manual
        bridge-ports eno1np0.1
        bridge-stp off
        bridge-fd 0


auto vmbr40
iface vmbr40 inet manual
        address 10.0.40.112/24
        bridge-ports eno1np0.40
        bridge-stp off
        bridge-fd 0
 
So I bit the bullet, went to the dark side with OpenVSwitch and now everything is nice and tidy.. and works! Even added a bonded backup interface to another switch.

Code:
auto lo
iface lo inet loopback

auto eno1np0
iface eno1np0 inet manual

auto enp96s0f1np1
iface enp96s0f1np1 inet manual

auto bond0
iface bond0 inet manual
        ovs_bonds eno1np0 enp96s0f1np1
        ovs_type OVSBond
        ovs_bridge vmbr0
        ovs_options other_config=bond-primary=eno1np0 vlan_mode=trunk bond_mode=active-backup trunks=1,36,40,42,70,99

auto vmbr0
iface vmbr0 inet manual
        ovs_type OVSBridge
        ovs_ports bond0 vlan36 vlan40

auto vlan36
iface vlan36 inet static
        address 10.0.36.12/24
        gateway 10.0.36.1
        ovs_type OVSIntPort
        ovs_bridge vmbr0
        ovs_options tag=36
# Management VLAN

auto vlan40
iface vlan40 inet static
        address 10.0.40.112/24
        ovs_type OVSIntPort
        ovs_bridge vmbr0
        ovs_options tag=40
#Storage VLAN

source /etc/network/interfaces.d/*
 

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!