Using vlan on vmbr with vm on same vlan problems

mikaelkrantz

Member
Apr 28, 2021
4
2
8
50
Hi,
My setup:

vmbr0 is my eno1 nic that is connected to switch with 10Gbit.
On this port I have configured trunk with all the vlans needed.

After that I wish to use 3 vlans lets say.

vlan 2
vlan 3
vlan 4
On this vlans I need to have ips. I have that setup and those works perfectly for cluster communication etc.
But when I try to use one of those vlans in a vm it is not working.
Anyone have any ideas?
I have tried both tagged interface in the linux vm and without then without tag on nic in configuration. And also tried with tag and still not working.

Regards,
Mikael Krantz
No Ack Hosting AB / https://noackhostingab.se/
 
What is your "/etc/network/interfaces" looking like?

Did you use a single vlan aware bridge? If yes, did you set the VLAN tag in the virtual NICs option (WebGUI: Datacenter -> YourNode -> YourVM -> Hardware -> NEtwork Device (netX) -> VLAN tag)? If you set the VLAN tag the virtual NIC will tag/untag all packets so every untagged traffic leaving the VM will be tagged with that VLAN ID and every tagged traffic with that VLAN ID entering the VM will get untagged. So if using this you don't need to care about VLAN inside the guest at all. If you leave that "VLAN tag" option free the VM should receive all tagged traffic instead.
 
What is your "/etc/network/interfaces" looking like?

Did you use a single vlan aware bridge? If yes, did you set the VLAN tag in the virtual NICs option (WebGUI: Datacenter -> YourNode -> YourVM -> Hardware -> NEtwork Device (netX) -> VLAN tag)? If you set the VLAN tag the virtual NIC will tag/untag all packets so every untagged traffic leaving the VM will be tagged with that VLAN ID and every tagged traffic with that VLAN ID entering the VM will get untagged. So if using this you don't need to care about VLAN inside the guest at all. If you leave that "VLAN tag" option free the VM should receive all tagged traffic instead.
Yeah I tried both ways.. The problem I see is when I use a vlan-interface on the host on the same "bridge" as I later wanna have a vm in that vlan. Then the communication is not working in the vm. If I remove the interface from the host it works fine. Or if I have done to resolve it. By using another "nic" in host and put those extra vlans that I have on that one then it works in the normal bridge to have vms in that vlan.
I have multiple nics just not connected yet.
Soo right now I can only use the like nfs-vlan inside the host and not from vms at all. That is abit annoying :( As i have vms using nfsmounted disk for instance inside the vms.

I added pic from webgui how the nics currently is setup. And what I wanna do is use vlan 52 from vms but it breaks. Yesterday I was trying to put the "hosts" behind a seperate vlan that is routed from a firewall. But the firewall is in proxmox running as a cluster. And as soon as I enabled the ips in the hosts. I couldnt ping the fw anymore.
But If I add another vm in the same subnet I was trying to use and remove that vlan from the host it worked fine.

Maybe the solution is to use vmbr0 and put ip/mask there for management and use native-vlan on the trunkport and use access-vlan instead of tagged into the proxmox for that vlan?

Regards
Mikael
 

Attachments

  • network.PNG
    network.PNG
    15.3 KB · Views: 48
  • network3.PNG
    network3.PNG
    14.1 KB · Views: 45
  • network2.PNG
    network2.PNG
    19.8 KB · Views: 46
  • Like
Reactions: virtualbitz
Yeah I tried both ways.. The problem I see is when I use a vlan-interface on the host on the same "bridge" as I later wanna have a vm in that vlan. Then the communication is not working in the vm. If I remove the interface from the host it works fine. Or if I have done to resolve it. By using another "nic" in host and put those extra vlans that I have on that one then it works in the normal bridge to have vms in that vlan.
I have multiple nics just not connected yet.
Soo right now I can only use the like nfs-vlan inside the host and not from vms at all. That is abit annoying :( As i have vms using nfsmounted disk for instance inside the vms.

I added pic from webgui how the nics currently is setup. And what I wanna do is use vlan 52 from vms but it breaks. Yesterday I was trying to put the "hosts" behind a seperate vlan that is routed from a firewall. But the firewall is in proxmox running as a cluster. And as soon as I enabled the ips in the hosts. I couldnt ping the fw anymore.
But If I add another vm in the same subnet I was trying to use and remove that vlan from the host it worked fine.

Maybe the solution is to use vmbr0 and put ip/mask there for management and use native-vlan on the trunkport and use access-vlan instead of tagged into the proxmox for that vlan?

Regards
Mikael
I'm having the exact same issue. Did you ever find a solution to this?

https://forum.proxmox.com/threads/l...t-prevents-guest-traffic-on-same-vlan.124733/
 

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!