4 ms·
Wish I could upvote more. I wanted to say something like it, plus that most home routers do their DHCP serving with ancient versions of dnsmasq.
by xorcist 12y ago
Wish I could upvote more.
I wanted to say something like it, plus that most home routers do their DHCP serving with ancient versions of dnsmasq.
- lunixbochs 12y agoIt's still a problem with the latest version of dnsmasq. Look for `if ((count < max) && !option_bool(OPT_NO_PING) && icmp_ping(addr))` in `src/dhcp.c`. Most of your lease acquire time is spent in `icmp_ping()` which actually just sends ARP requests for 3+ seconds then gives up. It's actually not even very reliable when someone is using the IP already, because many devices won't respond to ICMP. There's an option to disable it (OPT_NO_PING) which does improve lease performance with pretty much no downside (as ICMP is a flawed way to check if an address is in use anyway). -5, --no-ping (IPv4 only) By default, the DHCP server will attempt to ensure that an address in not in use before allocating it to a host. It does this by sending an ICMP echo request (aka "ping") to the address in question. If it gets a reply, then the address must already be in use, and another is tried. This flag disables this check. Use with caution. So, if you're configuring dnsmasq, these flags will give you some nice performance gains: dhcp-authoritative no-ping