OPNsense Forum

English Forums => General Discussion => Topic started by: weidah on March 03, 2022, 04:05:09 PM

Title: VLAN not working for me
Post by: weidah on March 03, 2022, 04:05:09 PM
Hi!

So I've gone through everything correctly I think. But nothing seems to work.

I started with my ubiquiti switch. I've created LAN 10 and set port 3 where my LAN2 is to Tagged, then port 15 to untagged for me to connect my PC directly and test.

I've created a new VLAN 10 in OPNSense with the parent interface LAN2.

I've then assigned it.

I've enabled it and given it an IP range of 192.168.90.1/24

I've then passed through everything in a rule for OPT5 (which is the VLAN10)

I've enabled DHCP on OPT5 with range 192.168.90.10-192.168.90.100 and gateway 192.168.90.1 and DNS 192.168.90.1

Images in link to see settings.

https://imgur.com/a/mFiqmwO

EDIT: added overview SS

https://imgur.com/a/Xcg35HV

EDIT:

Is it possible that this is due to me having Opnsense virtalized in Esxi?

Because as soon as I tuned that NIC to VLAN 10 in Esxi it showed up right away on the switch.
Title: Re: VLAN not working for me
Post by: lilsense on March 03, 2022, 04:54:34 PM
your issue may be related to untagged interface. On your OPNSense all should be tagged when you send it the UI switch.

best is to create a TRUNK to the switch and send all your VLANS to the switch and let the switch do the VLAN tagging for the interfaces. Again untagged traffic on the UI switch will not be routed on the OPNSense.
Title: Re: VLAN not working for me
Post by: weidah on March 03, 2022, 09:39:42 PM
I don't think so. Even if there's no action on the other ports, at least it should make some kind of traffic on the VLAN for the switch to report.
Title: Re: VLAN not working for me
Post by: Patrick M. Hausen on March 03, 2022, 09:47:15 PM
What kind of interface is LAN2 in your ESXi infrastructure? You cannot run tagged frames across an ESXi virtual interface. You must use PCIe passthrough to your OPNsense VM to run VLANs on a NIC.

If it's all virtualised, create a port group with VLAN tag 10 in ESXi, assign a virtual interface to OPNsense, use that (untagged as far as OPNsense is concerned).
Title: Re: VLAN not working for me
Post by: weidah on March 03, 2022, 10:45:20 PM
Yeah, I did that and it works :)