Linux Bridge vs. NIC Passthrough for VLANs in Proxmox VE
-
Hey guys,
I'm running Proxmox VE (Optiplex 710) and using an Intel i350-T4 NIC. Right now, I've got it set up in passthrough mode, but I'm having trouble getting VLANs to work for my LXC containers and VMs. I'm thinking about switching to a Linux bridge for networking, but I'm not sure if that's the right move.
What's the difference between using a Linux bridge and NIC passthrough for VLANs? Will it be slower since it's virtualized?
Any tips on setting up VLANs with either option?
Would love to hear your thoughts and experiences! Thanks!
Here's a diagram:
-
What's making me crazy here is how to make a container connects to a specific vlan. I keep getting no ip address:
Network config:
LXC and Proxmox
Switch config:
-
(IPV4 is showing STATIC in the screenshot but it is set to DHCP)
-
@faraguti said in Linux Bridge vs. NIC Passthrough for VLANs in Proxmox VE:
I've got it set up in passthrough mode, but I'm having trouble getting VLANs to work for my LXC containers and VMs.
That statement does not make sense to me.
If you pass through a resource to a VM then the hypevisor no longer has access to the resource.My understanding is you need a VM with KVM virtualisation to do passthrough. In contrast LXC containers use some of the hypervisors resources (a virtual version of them) via a different name space. So I can't see how what you have suggested you have done could work.
For a discussion of the benefits of NIC pass through vs vitalisation this thread may help (link not found yet)
-
@Patch Thanks for the help. I really understood what you were saying.
I really wanted to know if using it as passthrough would make me have access to my vlans, but I can't do so. So passthrough is a no-no to vlans?
-
@faraguti I run Proxmox v8.1 (and earlier) with NICs passed through to a VM running pfsense. Vlans work without issue it that set up.
But
- I don't use Linux containers LXC,
- My mini computer has several NIC in separate IO groups ensuring I can pass different NIC to different VM or Host.
-
@Patch So, when you create a VM, do you use vmbr0 for the network?
-
@faraguti said in Linux Bridge vs. NIC Passthrough for VLANs in Proxmox VE:
So, when you create a VM, do you use vmbr0 for the network
No
When creating a VM with pass through NIC, I do not add any network interface at VM creation time (as only virtual interfaces can be added then).
After the VM has been created, in Proxmox go to your new VM -> Hardware tab -> Add -> PCI device -> Raw device -> select desired NIC to pass through -
@faraguti
You can use both on pfSense, pass through NICs if you want that and also create a bridges in Proxmox (not connected to any hardware NIC) and assign virtual interfaces to the pfSense VM and as well to the container.
There is basically no necessity to configure VLANs for this, since the limit on the number of virtual NICs is very high, as far as I know. -
@viragomann I recorded a 6 minute video about it.. can you take a look real quick please?
YouTube - Linux Bridge vs. NIC Passthrough for VLANs in Proxmox VE
Important: VLAN10 works well after setting up an SSID w/ the AP. I connected easily and got the right IP address.
Thanks!
-
Admins, please close this topic. Apologies for the confusion—turned out, the switch ports were mapped incorrectly. Thanks to all who assisted!
-
@faraguti glad you sorted it. Such thing often take longer than they would with the aid of hind sight.