[SOLVED] issue with VLAN

pagirard

New Member
Aug 19, 2024
3
0
1
Hi all, I've searched and googled and tried so many ideas before posting this thread, please excuse me if the problem is simple but I simply can't figure it out

I have several VLANs on my home network but the key ones for my problem are:
1. VLAN 1 default
2. VLAN 60 Homelab

My proxmox server has 3 NICs:
* one for iLo/ipmi (on the homelab VLAN)
* 2 Gb nics that I have bridged onto my switch

So the proxmox host has a bond, is made VLAN aware and I'm allowing (I think) all other VLANs to pass, see my /etc/network/interfaces:
Code:
auto eno1np0
iface eno1np0 inet manual


auto eno1np1
iface eno1np1 inet manual


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


auto vmbr0
iface vmbr0 inet static
        address 192.168.60.11/24
        gateway 192.168.60.1
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 0-4094

On the switch side (unifi): I made an aggregation for the 2 ports that connects to these NICs, I have assigned the homelab VLAN for the native VLAN (60):
1724460712162.png

so far so good, the host gets his IP in the 192.168.60.0/24 subnet and I can ping and so forth.

My first few VMS (intended to stay in the VLAN 60 ) also work perfectly, they get an ip in the VLAN 60, everything is perfect.

Now, I would like to have one VM (ubuntu server 24.04) on that proxmox host that resides in my default VLAN (1).


If I configure the network of the VLAN as bridge with VLAN tag=1, the VM doesn't get an IP. If I don't tag a VLAN, it gets the default VLAN 60.
1724461199808.png

vm is not getting the default VLAN IP:
1724461286315.png

Worse case scenario, I will break the bond on the host and have one NIC on default VLAN and the other on the homelab one (60) but that seems dumb and is only a solution for 2 VLANs...

Any help would be very much appreciated.
 
Last edited:
is the default VLAN of vmbr0 still 1 (PVID 1) ? Should be 60 too, if...

Code:
:~# bridge vlan show | grep vmbr0 | grep Untagged
vmbr0             1 PVID Egress Untagged
 
vlan 1 (0 too for diff reasons) are special cases and linux bridges and/or some switches do not work well using it tagged. one of the reasons bridge-vids 2-4094 is the the default and I assume you manually edited to bridge-vids 0-4094 .

Suggest moving to the way Proxmox documentation states.
Example: Use VLAN 5 for the Proxmox VE management IP with VLAN aware Linux bridge
1. make vlan 1 the native vlan on the unifi switch bond
2. change /etc/network/interfaces
  • Code:
    auto eno1np0
    iface eno1np0 inet manual
    
    
    auto eno1np1
    iface eno1np1 inet manual
    
    
    auto bond0
    iface bond0 inet manual
            bond-slaves eno1np0 eno1np1
            bond-miimon 100
            bond-mode 802.3ad
            bond-xmit-hash-policy layer2+3
    
    auto vmbr0.60
    iface vmbr0.60 inet static
            address 192.168.60.11/24
            gateway 192.168.60.1
    
    auto vmbr0
    iface vmbr0 inet manual
            bridge-ports bond0
            bridge-stp off
            bridge-fd 0
            bridge-vlan-aware yes
            bridge-vids 2-4094
  • Use vmbr0.60 as the Bridgeport for all VM/LXC you want in HOMELAB vlan60 (no vlan tag required on the Proxmox side network device)
  • Use vmbr0 as the Bridgeport for all VM/LXC you want in the default vlan1, i.e. the new Ubuntu VM (again no vlan tag in the VM/LXC network device)
 
  • Like
Reactions: aschrijver
vlan 1 (0 too for diff reasons) are special cases and linux bridges and/or some switches do not work well using it tagged. one of the reasons bridge-vids 2-4094 is the the default and I assume you manually edited to bridge-vids 0-4094 .

Suggest moving to the way Proxmox documentation states.
Example: Use VLAN 5 for the Proxmox VE management IP with VLAN aware Linux bridge
1. make vlan 1 the native vlan on the unifi switch bond
2. change /etc/network/interfaces
  • Code:
    auto eno1np0
    iface eno1np0 inet manual
    
    
    auto eno1np1
    iface eno1np1 inet manual
    
    
    auto bond0
    iface bond0 inet manual
            bond-slaves eno1np0 eno1np1
            bond-miimon 100
            bond-mode 802.3ad
            bond-xmit-hash-policy layer2+3
    
    auto vmbr0.60
    iface vmbr0.60 inet static
            address 192.168.60.11/24
            gateway 192.168.60.1
    
    auto vmbr0
    iface vmbr0 inet manual
            bridge-ports bond0
            bridge-stp off
            bridge-fd 0
            bridge-vlan-aware yes
            bridge-vids 2-4094
  • Use vmbr0.60 as the Bridgeport for all VM/LXC you want in HOMELAB vlan60 (no vlan tag required on the Proxmox side network device)
  • Use vmbr0 as the Bridgeport for all VM/LXC you want in the default vlan1, i.e. the new Ubuntu VM (again no vlan tag in the VM/LXC network device)
Bingo, this worked wonders. And thanks for the explanation as well.
 

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!