Vlans in proxmox, how to link my VMs?

I am new to proxmox and i’m not quite sure how vlans work . I have different Vms that i want to put in different vlans and create a connection between the ones in the same vlan , for that i made the proxmox bridge vmbr0 vlan aware and created 4 sub-bridges i would say for the different vlans
To link the VMs to the vlans i added the tag on the network device of each vm

My problem is that i don’t know what to do now , dio i need to plug in my physical switch configure trunk and assume everything will work ?.
If the traffic is tagged will opnsense understand it ?
should i use ovs ? if yes how ? i’m kinda lost
4 VMs each in a different subnet
each VM have the default gateway of an OPNsense interface ( OPNsense is the fifth VM)
each Vm can ping opnsense normally but cannot ping other VMs which is logic
Vms cannot ping the gateway ( opnsense) when i tag the traffic

Hi Meriem,

It sounds like you’ve enabled VLANs on Proxmox and set your VMs up to use them, but your questions are now about what other network infrastructure do you need to have set up to make VLANs work. Ultimately, to make VLANs work, you not only need to tag the connection on the VMs, you also need to tell the device routing the VLAN’s traffic (whether that’s an actual router or an L3 switch) about the existence of those VMs.

In your case, it sounds like you’re using OPNsense (running on a VM) and you can’t ping OPNsense from your tagged VMs. My guess is that you haven’t yet set up the VLANs in OPNsense. I don’t use OPNsense myself, but a quick Google search on “setting up VLANs in OPNsense” should be able to help you with that. Then it’s just a matter of making sure that the VMs and the OPNsense LAN/VLAN interface are using the same bridge in their respect VM network config and that they all have the appropriate VLANs tagged in them.

You might also find this article on how to set up VLANs with an L3 switch of some use:

Granted, that article is specific to pfSense and it sounds like you’re using OPNsense, but the concepts should still be the same.