yet another dnsmasq topic : reservation, dhcp ranges

Started by caplam, July 31, 2025, 10:47:36 AM

Previous topic - Next topic
I have used dnsmasq in the past and was happy with it because it was rock solid. But at this time i didn't have vlans and didn't bother too much with domain resolution.

So I'm running opnsense 25.1.12 and willing to transition from isc dhcpv4+ unbound to dnsmasq dhcp +unbound as per the recommended setup in in the docs.

The problem is i don't understand all the options regarding my setup.

For the dhcp part i have mostly static reservations and few dynamic clients but also static ip ( switches which doesn't play well with dhcp and docker containers with macvlan network driver)

With isc dhcp static reservation are to be made outside of the dhcp range.
With dnsmasq docs states that reservation are to be made inside the range for dns registration to work correctly.
The reservation can also be outside the dynamic range, but it is not recommended for simple setups as the dynamic dns registration with dhcp-fqdn will not work correctly.

Also i don't see the option to make a range static or dynamic.

I have 5 vlans.
For guest vlan there is no problem all clients are dynamic dhcp clients.
For iot vlan all clients have a static reservation. (wifi clients connect to wifi with freeradius macid)
For other vlan i have a mix of client type.
For example for my main lan (192.168.2.0/24)
router : 192.168.2.1
192.168.2.2 security onion vm
192.168.2.3 ups
192.168.2.6 -> 11 network switches ( some static ip, some static reservations)
192.168.2.12-> 15 wifi access points ( static reservations)
192.168.2.20 ->40 some devices or vm which will be migrated to other vlans: static reservation
192.168.2.50 my main server (holds my containers and vm): static reservation
192.168.2.110->130: static ip docker macvlan
192.168.2.220->220: range for dhcp dynamic clients


How could i setup my lan to have dhcp and name resolution working correctly?