DHCP Service OoO

Hello everyone...

After having set up all my config & waiting to be able to access my 2nd physical site in order to start the real WireGuard bridge between my 2 Pi I have been using the OpenWrt as my main FW & it works like a charm... until yesterday! What happened this morning ? No idea, but suddenly DNSmasq seems to not deliver IP anymore!

This is the dhcp fonfig

/etc/config# cat dhcp

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option ednspacket_max '1232'
        option localservice '0'
        option confdir '/tmp/dnsmasq.d'

config dhcp 'lan'
        option interface 'lan'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option ra_management '1'
        option start '10'
        option limit '40'
        list dhcp_option '3,'
        list dhcp_option '4,'
        option leasetime '6h'

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'

config host
        option dns '1'
        option mac '2C:9E:FC:09:D9:42'
        option ip ''
        option name 'mg5250'

If I configure my PC with an static IP everything works OK

Any idea would be appreciated...

is it running?


Actually I have DHCP running...

ps |grep dhcp
  887 root      1428 S    /usr/sbin/odhcpd
 1781 root      1220 S    udhcpc -p /var/run/udhcpc-eth1.pid -s /lib/netifd/dhcp.script -f -t 0 -i eth1 -x hostname:ow4 -C -R -O 1
 3155 root      1228 R    grep dhcp

But nothing containing DNS

 ps |grep DNS
 3158 root      1228 R    grep DNS

How could this happen?

By the way I tried to check if there were some updated software & I got

The opkg update command failed with code 8

Just wanted to update this info as my Model Raspberry Pi 4 Model B Rev 1.2
and it has been installed via a snapshot. I saw that now there is version 21.02.1 available. Do I have to reinstall everything?

And this doesn't explain it stopped working suddently... :sleepy:

yes you do, there are no sysupgrade images for the more computer-like platforms.

Please, post the output of the following commands:

/etc/init.d/log restart; /etc/init.d/dnsmasq restart; sleep 3; \
netstat -nlpu | grep \:67; logread -e dnsmasq
1 Like

Here it is...

 /etc/init.d/log restart; /etc/init.d/dnsmasq restart; sleep 3; \
> netstat -nlpu | grep \:67; logread -e dnsmasq
udhcpc: started, v1.33.0
udhcpc: sending discover
udhcpc: no lease, failing
Thu Nov 18 13:06:27 2021 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Thu Nov 18 13:06:27 2021 user.notice dnsmasq: Allowing responses
Thu Nov 18 13:06:30 2021 daemon.crit dnsmasq[4465]: duplicate dhcp-host IP address at line 39 of /var/etc/dnsmasq.conf.cfg01411c
Thu Nov 18 13:06:30 2021 daemon.crit dnsmasq[4465]: FAILED to start up


Check if you have defined a static lease for twice.



I did add a new static lease... but as the previous one was not used (device on the wan side) I didn't bother about this... (OK honestly I didn't see it... :sweat: ) Incredible that such an issue prevents the service from starting... I'll be careful next time.
And I will also plan a fresh install with version 21.02 on the Pi4 and an upgrade on the Pi3...

Thx again!

1 Like

yet, this duplicate wasn't present where you showed the DHCP config! There was only one static assignment in that

Actually it is quite difficult to check all the entries in the lease table. Is it possible to sort upon the different columns? I’ve searched in the forum, a lot of entries concerning sorting scripts but nothing around sorting a view in Luci.

Thx again!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.