OPNsense Forum

English Forums => 25.1, 25.4 Series => Topic started by: SoWhy on July 29, 2025, 07:31:40 AM

Title: Multiple subnets with dnsmasq?
Post by: SoWhy on July 29, 2025, 07:31:40 AM
Hi there,

I have set up dnsmasq as my DHCP server on my OPNsense 25.1.12. I added a range 10.10.10.100 - 10.10.10.200 for interface LAN with a couple of hosts with reservations. Since the amount of devices is increasing, I wanted to create some new subnets 10.10.20.0/24 and 10.10.30.0/0 and put some of the devices there but devices without a reservation should still get their IPs from the 10.10.10.0/24 pool. However, when I add a host to another subnet, it will still get an IP from the 10.10.10.0/24 subnet, ignoring the reservation.

2025-07-29T07:27:50 Warning dnsmasq-dhcp not giving name AFVM1 to the DHCP lease of 10.10.10.153 because the name exists in /var/etc/dnsmasq-hosts with address 10.10.20.101
2025-07-29T07:27:50 Informational dnsmasq-dhcp DHCPACK(igc1) 10.10.10.153 12:34:56:78:90:ab AFVM1
2025-07-29T07:27:50 Informational dnsmasq-dhcp DHCPREQUEST(igc1) 10.10.10.153 12:34:56:78:90:ab
2025-07-29T07:27:50 Informational dnsmasq-dhcp DHCPOFFER(igc1) 10.10.10.153 12:34:56:78:90:ab
2025-07-29T07:27:50 Informational dnsmasq-dhcp DHCPDISCOVER(igc1) 10.10.10.153 12:34:56:78:90:ab

How can I get dnsmasq to assign the IP from another subnet if a reservation like that exists?

TIA

SoWhy