Dnsmasq restart slowly

When i run /etc/init.d/dnsmqs restart. it finish so slowly, and print following imformation on console.

root@1020:~# /etc/init.d/dnsmasq restart
udhcpc: started, v1.30.1
udhcpc: sending discover
udhcpc: no lease, failing
udhcpc: started, v1.30.1
udhcpc: sending discover
udhcpc: no lease, failing

It looks like the udhcp restarts twice, why restart dnsmqs with udhpc restarting? and Can this setting be turned off? or,reduced to once

dnsmasq version:2.86

i think the udhcp restart twice cause dnsmasq restart finish slowly

The issue that you're seeing is that the DHCP client (uhcpc) is unable to obtain a DHCP lease from an upstream system. It attempts to get a DHCP lease twice as a result. If it had succeeded, you would not have seen the second attempt.

What this means is that there is an interface that is set to DHCP client as its protocol (often the WAN interface) and that connection does not have a DHCP server running on an upstream device.

This seems like normal operation as far as I can see. The rest of the dnsmasq service features should be running normally.

1 Like

yes,thanks. But can i reduced it to once ?

remove the DHCP client proto from the interface that is unable to get a DHCP lease.

1 Like

Note that udhcpd (the client) is not dnsmasq, but part of busybox (version 1.30.1 )

Dnsmasq restart just triggers the wan interface to refresh it's lease?

1 Like

If I am not mistaken, it tries to verify that there is no other DHCP server in the lan, so the failure is a good sign.


why it triggers dhcp? what's the use of this?

what will happen if i turn off this set?

It doesn't restart twice. You just have two interfaces with active DHCP servers, probably lan and guest.

Turn off the check for active DHCP servers on the same subnet (for each interface).