OPNsense Forum

English Forums => 26.1, 26,4 Series => Topic started by: Mark_the_Red on June 19, 2026, 04:45:01 PM

Title: VLAN - DHCP/Gateway Issue - Assign Hardwired Devices to specified VLAN
Post by: Mark_the_Red on June 19, 2026, 04:45:01 PM
Need some help.  I exhaustedly tried Claude and ChatGPT to solve this, but I can't seem to figure it out.  I cannot assign a physically ethernet connected device to the VLAN under any circumstances.  VLAN interface is working great.

Topography is as follows

OPNSENSE router -> Switch with POE+ -> Unifi U6E Access point -> no problem assigning devices to VLAN (IoT) via wifi (works chef's kiss perfectly)
                                    |
                                    -> LAN connnected devices -> will not under any circumstance assign to VLAN (IoT) PROBLEM

I followed this helpful guide to get the Unifi set up (NAT, VLAN Interface, etc.).  I confirmed the Unifi device is 100% NOT doing anything with DHCP (even warns me in the controller software its doing nothing) and OPNsense is, and its working perfectly. The switch is passing VLAN tags along perfectly as it works for the AP so its not a switch issue:
https://www.youtube.com/watch?v=CmC_AuoAmvs

All the DHCP VLAN ranges are set up correctly, because the access point is assigning them in that range.

Is there a "MAKE THIS god dam @#$@!#%@# device / MAC address move to this VLAN!!!"  hidden setting somewhere in the DHCP menu?  DHCP lease time has no effect.  I tried assigning static ip addresses (Host) to the devices on the VLAN DHCP range and it never works.  It makes an entry but the device NEVER moves over.  I even disabled the LAN network it is currently assigning these devices to incorrectly, and the devices would rather get NO connection then go to the VLAN one.  I know its a DHCP issue but I looked at every menu setting and nothing seems to be applicable to this.  Do I need to create a distinct Gateway for physically connected devices? 

I am certain I am missing something obvious.  Anyway, appreciate the help.

 
Title: Re: VLAN - DHCP/Gateway Issue - Assign Hardwired Devices to specified VLAN
Post by: Patrick M. Hausen on June 19, 2026, 05:24:25 PM
You need to assign the switch port the device is connected to to the particular VLAN for this device. The end devices are oblivious of VLANs, this is all managed by the network infrastructure.
Title: Re: VLAN - DHCP/Gateway Issue - Assign Hardwired Devices to specified VLAN
Post by: pfry on June 19, 2026, 05:33:26 PM
Quote from: Mark_the_Red on Today at 04:45:01 PM[...]Is there a "MAKE THIS god dam @#$@!#%@# device / MAC address move to this VLAN!!!"  hidden setting somewhere in the DHCP menu?[...]

Just to clarify, where are you looking to have the VLAN tag assigned, and by what mechanism? I'd generally expect that to be via a managed Ethernet switch, either by port or by MAC (or possibly other differentiators depending on your hardware, but I stick to "port").