Just saw this on the openwrt router with dnsmasq as dhcp server. Is this a client problem or server setting issue? the server is set with the authoritative.
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.2.168 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.2.168 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.2.168 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.2.168 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.2.168 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.2.72 7c:03:ab:2b:eb:bc
Tue Aug 13 14:43:13 2024 daemon.info dnsmasq-dhcp[1]: DHCPNAK(br-lan) 192.168.2.72 7c:03:ab:2b:eb:bc wrong server-ID
Is there another DHCP server on the network somewhere?
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/network
cat /etc/config/dhcp
This is a good sign. This seems to indicate that there is no other DHCP server on your network.
Now, with the machine that was unable to obtain a lease -- unplug the ethernet (or turn off wifi), then plug it back in (or turn on wifi) so that the network connection on that device goes down entirely and then comes back up. Then monitor the output of dnsmasq (logread -e dnsmasq-dhcp)
logread -e udhcpc
Tue Aug 13 20:36:32 2024 daemon.notice netifd: wan (2691): udhcpc: sending renew to server 192.168.1.254
Tue Aug 13 20:36:32 2024 daemon.notice netifd: wan (2691): udhcpc: lease of 192.168.1.67 obtained from 192.168.1.254, lease time 86400
it seem the client is being stubborn and insist on getting the ip it wants and ignoring the dhcp offer. It keep on requesting the same ip and the dhcp server nak it. It happens to different WIFI client on the network.
Thu Aug 15 17:46:27 2024 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.2.117 6c:ad:f8:ba:e9:2d
Thu Aug 15 17:46:27 2024 daemon.info dnsmasq-dhcp[1]: DHCPNAK(br-lan) 192.168.2.117 6c:ad:f8:ba:e9:2d address in use
Thu Aug 15 17:46:31 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 6c:ad:f8:ba:e9:2d
Thu Aug 15 17:46:31 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.2.185 6c:ad:f8:ba:e9:2d
Thu Aug 15 17:46:31 2024 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.2.117 6c:ad:f8:ba:e9:2d
Thu Aug 15 17:46:31 2024 daemon.info dnsmasq-dhcp[1]: DHCPNAK(br-lan) 192.168.2.117 6c:ad:f8:ba:e9:2d wrong server-ID
Well, what devices do you have on the network that might have an active DHCP server? There are some methods to hunt it down with packet captures and the like, but for a home network, you can probably find it by simply evaluating the devices on your network (there usually aren't that many). A PiHole, a misconfigured wifi AP, or even a Windows server could easily be culprits.
The most practical method is usually the pragmatic one: turn off the OpenWrt DHCP server, then test the ability to get a DHCP lease on a client device. Then unplug or turn off devices along the way such as APs and the like until the DHCP responses stop. The last device you unplug in this process is the one that has an active DHCP server.
Remove and re-instate wifi connection on android, it caches auth keys forever.
How old android? Say early wpa3 suppport is of better-not type on androids
Thanks all for the help! I just found my kids turn on an old router by mistake and that should be the rouge DHCP server that is causing the trouble. I removed all statis lease and everything is working now. Hope that is the source of the problem.