[NOOB] Vlan configuradion - bridge vlan is good solution?

Started by gykawek, October 30, 2024, 11:40:07 AM

Previous topic - Next topic
Hi all,
sorry for that dummy question but i couldn't find any answer. And I'm ready to buy a beer to person how help me, im just tired trying different solution without any effect. Maybe my conception is wrong. So here its my env.

I have Firewall Computer N100 Soft Router 4x 2.5G, on that device i have proxmox, with opnsense.
I have one bridge on proxmox layer, to port 1. And rest 3 port are connected physically direct to opnsense vm.

WAN
LAN1 = Swtch1
LAN2 = AP
LAN3 = Swtch2

My idea is to have 5 vlans. and here is my problem, how to assign same vlan for example guest vlan20 for both port LAN3 and LAN2. I was trying already to create vlan20-on interface LAN3 and vlan20 on interface lan2.
Its not allowed me to create same vlantag. so i crate vlan21 and vlan20 and made bridge on them. and then on this bridge i assgin dhcp v4 service. But then i didnt recvice any dhcp lease from that vlan on this ports.


Those switches are managed or unmanaged?

If managed just turn on on Proxmox the VLAN-aware option and on the switches create the proper TRUNK and allow the VLANs you need. Same you do on OPNsense.

You dont need to assign VLANs on Ports for Proxmox if you have devices that are capable to do it. You just need to have Proxmox understand the VLAN tag which is the VLAN-aware option.

The above is for bridges.

If you how ever do passthru of those ports directly and only to the OPNsense VM, then you need to have only proper configuration on both Switch and OPNsense side.

Regards,
S.
Networking is love. You may hate it, but in the end, you always come back to it.

OPNSense HW
APU2D2 - deceased
N5105 - i226-V | Patriot 2x8G 3200 DDR4 | L 790 512G - VM HA(SOON)
N100   - i226-V | Crucial 16G  4800 DDR5 | S 980 500G - PROD

switches are managed.

ok, so i need take a look on proxmox. I was thinking when i passthrough this nic interfaces, then i dont need to change nothing in configuration.

When i crated this vlan on one ports then that was working fine, but my main issue is how to configure same vlan on both ports like lan2 and lan3.

Once again,

If you use bridges you need to turn on the VLAN-aware option.

If you do passthru there is no such option.

You can either create & assign VLAN on the proxmox or you can do it on a Device if the device capable to do it; but in this case you dont configure it on the PRoxmox.

You are saying

"When i crated this vlan on one ports then that was working fine, but my main issue is how to configure same vlan on both ports like lan2 and lan3."

But on which device? OPNsense, Switch or Proxmox?

Regards,
S.
Networking is love. You may hate it, but in the end, you always come back to it.

OPNSense HW
APU2D2 - deceased
N5105 - i226-V | Patriot 2x8G 3200 DDR4 | L 790 512G - VM HA(SOON)
N100   - i226-V | Crucial 16G  4800 DDR5 | S 980 500G - PROD

"When i crated this vlan on one ports then that was working fine, but my main issue is how to configure same vlan on both ports like lan2 and lan3."

But on which device? OPNsense, Switch or Proxmox?

I configured vlan20 on port 2 (LAN2) on opnsense, to this port i connected my AP. With dedicated wireless network with vlan tag 20, its working. Im struggling with configuration to have same vlan 20, on the port 3. OpnSense not allowed assign same vlan tag on different port. So I'm not able to assign vlan20 to port2 and port3 at the same time. Sorry for making that confusing.

Quote from: gykawek on October 30, 2024, 02:52:14 PM
OpnSense not allowed assign same vlan tag on different port. So I'm not able to assign vlan20 to port2 and port3 at the same time. Sorry for making that confusing.

Sure it allows that. But the name needs to be unique. You cannot create two vlans with the name of vlan20.
Just name the second one e.g. vlan0.20