Static DHCP on one vlan only

Hi I am trying to convert my opnSense box to openwrt and I’ve run into a weird problem. I have 3 vlans, everything works. I have 3 vlans with their respective subnets. A static DHCP device is connected to the main vlan and it gets the properly assigned IP. Now when I connect this same device to the guest vlan’s WiFi, it gets assigned the same IP from the main vlan. Is there any way to specify in the config that the static DHCP lease is only for a certain vlan? I’ve never ran into this with opnsense

The DHCP reservation is only valid for the specific VLAN to which its address maps. That is to say that if you have a reservation for 192.168.14.53, it will only use that reservation when the device is indeed connected to the VLAN that uses subent 192.168.14.0/24.

That being said, you may be coincidentally getting the same host address (say 192.168.1.53 when connected to VLAN 1) based on the MAC address of the system. The way DHCP works by default in OpenWrt is that it performs a hash of the MAC and then uses that to calculate an address via the DHCP lease. It seems random from a human perspective, but it is assigning the address based on this hash so that devices get consistent addresses each time they connect/renew (to the greatest extent possible until the DHCP pool is exhausted).

The test to validate the above statements would be to change the reserved address. So in my example/made-up address of 192.168.14.53 -- change that to something else -- maybe 192.168.14.72. Renew the lease on the computer while connected to that VLAN and observe the new address. Then, move to the other VLAN and see what IP is issued when connecting there. To fully prove this out, you can also restart the router which will clear the DHCP lease table (since it's stored in RAM), leaving only the static/reservations.