If phones lose DHCP after you reserve an address for a printer, check the dnsmasq startup log. With “duplicate dhcp-host IP address”, conflicting rules can prevent startup even when both devices are offline.
Trace the address to both rules
Connect by cable. Temporarily give the computer a free LAN address if necessary. Run these commands over SSH, replacing the last IP with the logged address. Match the full IP in dhcp-host lines loaded by the same instance. Find its file after -C in command. If only one line matches, follow conf-file, conf-dir and dhcp-hostsfile. Check other instances separately. If the service stays up without this error, check manual client addresses and which DHCP server answered.
logread | grep -i dnsmasq | tail -40
uci show dhcp | grep -E '=host$|[.]ip=|[.]mac=|[.]instance='
ubus call service list '{"name":"dnsmasq"}'
grep -nHF '192.168.1.80' /var/etc/dnsmasq.conf.*
Reproduce the error without changing the router
Run the lines in one SSH shell. Both sample MACs initially use .10. The second moves to .11. This checks standard input without starting another service. Exit status changes from 1 to 0. Only the sample syntax has passed.
grep DISTRIB_DESCRIPTION /etc/openwrt_release
dnsmasq --version | head -1
a='dhcp-host=02:00:00:00:00:01,192.0.2.10'
b='dhcp-host=02:00:00:00:00:02,192.0.2.10'
printf '%s\n' "$a" "$b" | dnsmasq --test -C -
echo $?
b='dhcp-host=02:00:00:00:00:02,192.0.2.11'
printf '%s\n' "$a" "$b" | dnsmasq --test -C -
echo $?

Fix the reservation and verify both clients
Back up /etc/config/dhcp. In the LuCI list shown below, edit the existing entry by MAC. Older menus may use Network → DHCP/DNS. Remove an accidental duplicate. For two simultaneous clients keep the original address and assign the other a free, unreserved address on its subnet. Back up and edit any custom source file involved. Leave generated files and dynamic leases intact.

Save and apply. For an external file change alone, run /etc/init.d/dnsmasq restart during maintenance. This affects all instances. Check fresh logs and confirm running is true. Renew both clients and verify addresses, gateway and name resolution. On failure follow the first new error or restore and apply the last working backup. Return the computer to DHCP.
OpenWrt stopped handing out IP addresses after a lease file change
Comments