Proxmox as physical switch

ulysse132

Active Member
Apr 19, 2020
3
0
41
33
Hello,
My proxmox server has 4 NIC and one of them is connected to the router (I use vlans).
I want proxmox to share the network on other NIC so that I can use proxmox as a physical switch and assign, when necessary, a port to a specific vlan.

How can I achieve this?

Thanks a lot for your help!
 
You could bridge those NICs with a vlan aware bridge and then set the VLAN tags for the guest's virtual NIC.
 
That works for the vm created in proxmox. But I want to connect my nas directly to my proxmox server, using one of those nic and my nas doesn't understand anything about vlan.
 
Not sure if Linux VLAN interfaces would help there. Maybe with a second bridge bridging a VLAN interface with the one NIC that your NAS should be connected to.

Edit:
Something like this in case eno4 is attached to the NAS and the NAS should be part of VLAN 100.

Code:
auto lo
iface lo inet loopback

iface eno1 inet manual
iface eno2 inet manual
iface eno3 inet manual
iface eno4 inet manual

auto vmbr0
iface vmbr0 inet manual
        address 192.168.1.2/24
        gateway 192.168.1.1
        bridge-ports eno1 eno2 eno3
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094

auto vmbr0.100
iface vmbr0.100 inet manual

auto vmbr100
iface vmbr0 inet manual
        address 192.168.100.2/24
        bridge-ports vmbr0.100 eno4
        bridge-stp off
        bridge-fd 0
 
Last edited:
  • Like
Reactions: shrdlicka
I'll try this to test.
I saw the we could use Open vSwitch, could this tool do the job?