Assign a VLAN directly to a physical interface

pJonathan

Member
Sep 11, 2021
41
0
11
24
Hello, I'm having a bit of a hard time setting up my network right now. I have an Opnsense firewall running on the proxmox server. The server is connected to a switch and I can use VLANs normally.
But now I have had the idea that I would also like to assign a VLAN to a physical port directly on the server. Unfortunately I have no idea how to do it ...
Here is my network configuration:
Screenshot (7).png
To explain "eno1" is the internet connection, "bond0" is the connection to the switch and the interface "enp6s0" should be connected to a computer and assigned to a VLAN. I bind grateful for any food for thought :)
 
Whats the plan? The PVE server itself should get an IP address in a VLAN? Any guests that should connect to the VLAN as well?
 
Whats the plan? The PVE server itself should get an IP address in a VLAN? Any guests that should connect to the VLAN as well?
The plan is to use the port on the server like a port on the switch. I.e. I want to connect a normal PC and assign VLAN 21 to it.
 
And it should be part of the overall network? Like if you had connected it directly to the switch?
One way could be to pass through the NIC to Opnsense and configure it there.
 
And it should be part of the overall network? Like if you had connected it directly to the switch?
One way could be to pass through the NIC to Opnsense and configure it there.
Yes exactly, I have created a VLAN in Opnsense which only I use and I would like to see my computer which I want to connect directly to the server also in this VLAN. I do not know if am in Opnsense can simply take two interfaces together, because I trunk interface, so the parents of the VLANs is already there.
I it not somehow possible under Proxmox or Linux to give an interface a VLAN ID?
 
I personally would probably use PCI Passthrough to get the dedicated physical NICs to the Opnsense VM. Then all the switch/routing etc config can be done there. Also by assigning which VLAN that NIC should be part of. Doing that on the Proxmox VE side might be possible, but I haven't done that. So someone else might have an idea.
 

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!