Score:0

Assign a VLAN directly to a physical interface

ve flag

does anyone have an idea how to assign a VLAN ID to a physical interface under Linux?

More specifically I have a proxmox server on which Opnsense is virtualized. There are VLANs set up and on a connected switch I can assign them to the different ports.

But I would also like to use the ports directly on the server, that is I want to connect a PC to an interface and this should get a VLAN ID.

Thanks for food for thought :)

user1686 avatar
fr flag
Is the physical interface already part of a bridge? If so, does Proxmox support "bridge VLAN filtering" that Linux has? (That would allow configuring PVIDs and such exactly like on a switch.)
Score:0
cn flag

If you want to use a physical interface on a VM this can be achieved via PCI-passtrough and, if the NIC supports it, using also SR-IOV and attach a PF (SR-IOV physical function) to the VM.

In general it is more secure to present different interfaces for each VLAN to a VM. But in your case you can use also Guest configured VLAN

Guest configured VLAN: VLANs are assigned inside the guest. In this case, the setup is completely done inside the guest and can not be influenced from the outside. The benefit is that you can use more than one VLAN on a single virtual NIC.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.