I try to edit the static leases offline in the dhcp config file (around 50 devices, it’s just easier to edit it in notepad++ and excel).
I already managed to see the static leases as expected in luci. but the file seems not valid anymore, as DHCP is not working. System and kernel log don’t show anything about “DHCP”.
Is there an option to test the integrity, and get hints what’s wrong?
I'm sharing my dhcp.conf file with the edited MAC addresses of my devices so you can use it as an example in your configuration.
Good luck!
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '52'
option leasetime '6h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option force '1'
option max_preferred_lifetime '45m'
option max_valid_lifetime '90m'
list ntp '192.168.15.1'
list dhcp_option '3,192.168.15.1'
list dhcp_option '6,192.168.15.1'
list dhcp_option '15,hsh'
list dhcp_option '44,192.168.15.1'
list dns 'fdc8:4948:6e6f::1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
option piofolder '/tmp/odhcpd-piofolder'
config dnsmasq 'horus'
option authoritative '1'
option local '/hsh/'
option domain 'hsh'
option expandhosts '1'
option rebind_protection '0'
option localservice '0'
option sequential_ip '1'
option allservers '1'
option dhcpleasemax '52'
option port '54'
option cachesize '0'
option noresolv '1'
config domain
option name 'onu'
option ip '192.168.1.1'
config domain
option name 'horus'
option ip '192.168.15.1'
config domain
option name 'anubis'
option ip '192.168.15.2'
config domain
option name 'osiris'
option ip '192.168.15.3'
config domain
option name 'toth'
option ip '192.168.15.4'
config host
option name 'horus'
list mac 'edited'
option ip '192.168.15.1'
option leasetime 'infinite'
list tag 'core-router'
option instance 'horus'
option dns '1'
config host
option name 'anubis'
option dns '1'
list mac 'edited'
option ip '192.168.15.2'
option leasetime 'infinite'
option duid '0003000130b5c2b4f3a8'
list tag 'ap-sala'
option instance 'horus'
config host
option name 'osiris'
option dns '1'
list mac 'edited'
option ip '192.168.15.3'
option leasetime 'infinite'
option duid '0003000114cc20b951c0'
list tag 'sw-escritorio'
option instance 'horus'
config host
option name 'toth'
option dns '1'
list mac 'edited'
option ip '192.168.15.4'
option leasetime 'infinite'
option duid '0003000150c7bfdeedd0'
list tag 'ap-quarto-Fe'
option instance 'horus'
config host
option name 'tesla'
option ip '192.168.15.10'
list mac 'edited'
option duid '0001000130e5a5bd408d5c785151'
list tag 'admin-pc'
option instance 'horus'
option dns '1'
option leasetime '12h'
option hostid '10'
config host
option name 'x200'
list mac 'edited'
option ip '192.168.15.5'
option leasetime '12h'
list tag 'decoder_TV_a_Cabo'
option instance 'horus'
config host
option name 'SonyVaio-VGN-NW270F'
list mac 'edited'
option ip '192.168.15.12'
option leasetime '12h'
option duid '00045c1e1c10eadcfe993c8dda57b565d34f'
list tag 'Sony-Vaio'
option instance 'horus'
option hostid '12'
config host
option name 'SonyVaio-VGN-NW270F'
list mac 'edited'
option ip '192.168.15.13'
option leasetime '12h'
option duid '00045c1e1c10eadcfe993c8dda57b565d34f'
list tag 'Sony-Vaio'
option instance 'horus'
option hostid '13'
config host
option name 'SPON010130011'
list mac 'edited'
option ip '192.168.15.14'
option leasetime '12h'
list tag 'edited'
option instance 'horus'
option duid '00010100313107fb60c7273f0bcb'
option hostid '14'
config host
option name 'SPON010130011'
list mac 'edited'
option ip '192.168.15.15'
option leasetime '12h'
list tag 'edited'
option duid '00010100313107fb60c7273f0bcb'
option hostid '15'
config host
option name 'sfc'
list mac edited'
option ip '192.168.15.17'
option leasetime '12h'
option duid '000100012f01abd61c3947533e8c'
list tag 'Dell-Fe'
option instance 'horus'
option hostid '16'
config host
option name 'sfc'
list mac 'edited'
option ip '192.168.15.16'
option leasetime '12h'
option duid '000100012f01abd61c3947533e8c'
list tag 'Dell-Fe'
option instance 'horus'
option hostid '17'
config host
option name 'HP-Probook-4430s'
list mac 'edited'
option ip '192.168.15.18'
option leasetime '12h'
option duid '000100012c5f1f61101f74f9a7b1'
list tag 'HP-Vi'
option instance 'horus'
option hostid '18'
config host
option name 'HP-Probook-4430s'
option ip '192.168.15.19'
option leasetime '12h'
option duid '000100012c5f1f61101f74f9a7b1'
list tag 'HP-Vi'
option instance 'horus'
list mac 'edited'
option hostid '19'
config host
option name 'Nintendo-Switch'
list mac 'edited'
option ip '192.168.15.30'
option leasetime '12h'
list tag 'game-Fe'
option instance 'horus'
config host
option name 'Note-14-Pro-5G'
option ip '192.168.15.105'
list mac 'edited'
option leasetime '12h'
list tag 'Cel-RR'
option instance 'horus'
config domain
option name 'x200'
option ip '192.168.15.5'
config host
option name 'Note-12S'
list mac 'edited'
option ip '192.168.15.110'
option leasetime '12h'
option instance 'horus'
list tag 'Cell-Vi'
config host
option name 'A31-de-Felipe'
option ip 'edited'
list mac 'edited'
option leasetime '12h'
config host
option name 'GT-N8000'
list mac 'edited'
option ip '192.168.15.150'
option leasetime '12h'
list tag 'tablet'
option instance 'horus'
If you're looking for a syntax check, just run this. uci is pretty strict, so should fail with a reasonably good message if you're missing quotes or have extra text anywhere.
thanks!
interestingly “uci show dhcp” did not show any problem.
But in the luci log I could find
”Thu Mar 19 21:01:47 2026 daemon.crit dnsmasq[1]: bad DHCP host name at line 69 of /var/etc/dnsmasq.conf.cfg01411c
Thu Mar 19 21:01:47 2026 daemon.crit dnsmasq[1]: FAILED to start up”
Looking with nano at this file showed me a “?” as name (I did not know this device and wanted to be reminded). This seems not allowed; renamed and it is working.
As a general rule: make small changes. Period. Start minimal. Period. Check the defaults in the wiki and double cross check with dnsmasq upstream documentation AND check end state and its scripts.
If you modify your setup with well intentioned and small focused steps you rather would find config errors. After a while you have your personal template or style and just need to extend your config but the main functionality just stays. So I assume it's ok to not have extended safety nets in the service handling.
Or, half ways you switch over to kea and bind9. Happens.