All DHCPOFFERs I get from dnsmasq have a IP lease time of 2min and it ignores the options to change it.

More Details:

I have two routers on my network:

  • AVM FritzBox 7390 (
    • VDSL2 Modem
    • Base for DECT Phones
    • Actual routing to the internet
  • Netgear R7000 (running FreshTomato firmware,
    • WiFi access point
    • DHCP Server

My internal DNS is a Pi-Hole running in a Docker Container on my server. (

The DHCP Server that FreshTomato brings is a dnsmasq and I need it to tell new clients the following config:

  • IP In range - ...80
  • IP Lease Time ~1 day
  • Router is the FritzBox (
  • DNS Servers are Pi-Hole ( and alternatively the FritzBox (

So I put all this info into the R7000's UI and when I save the config the following config file for dnsmasq is generated:


Looks valid to me, when I test the DHCP config using this neat little nmap script:

nmap --script broadcast-dhcp-disccover

I get the following answer:

| broadcast-dhcp-discover:
|   Response 1 of 1:
|     IP Offered:
|     DHCP Message Type: DHCPOFFER
|     Server Identifier:
|     IP Address Lease Time: 2m00s
|     Renewal Time Value: 1m00s
|     Rebinding Time Value: 1m45s
|     Subnet Mask:
|     Broadcast Address:
|     Domain Name Server:,
|_    Router:

Everything is correct except that the IP lease time is only 2 minutes. Some devices (3 Smartphones and 2 Android Tables) in my network don't like that short lease time and loose their WiFi connection every minute.

Does anyone know what I did wrong?

Fun Fact: I just flashed FreshTomato, before that I used DD-WRT which had the exact same problem with dnsmasq.

Edit after a few more tests

I created a small test environment for dnsmasq to test some configurations:

  • a Docker Container running dnsmasq
  • a second Container running that nmap script in a loop

What I found out is: When I specify the lease time in the dhcp-range line, it is simply ignored.

I discoverd that it is possible to set the DHCP options directly via their tags assigned by IANA (https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xml)

When I set the DHCP Lease time with dhcp-option=51,48h the lease time is changed but the renewal and rebind times aren't.

Setting them with their tags 58 and 59 with

dhcp-option=58,24h # DHCP Renewal (T1) Time
dhcp-option=59,42h # DHCP Rebinding (T2) Time

didn't help, since the result I got was:

IP Address Lease Time: 2d00h00m00s
Renewal Time Value: 1m00s
Rebinding Time Value: 1m45s
  • 1
    Sounds like it’s somehow reverting to the minimum supported lease time. Maybe try OpenWrt, if available.
    – Daniel B
    Jul 15, 2019 at 19:22
  • @DanielB, I'd like to use OpenWRT but it does not support WiFi on the R7000, due to the lack of FOSS drivers. I think it may be an issue with dnsmaq, since it happened with DD-WRT's dnsmasq too. Jul 16, 2019 at 6:47
  • What versions of dd-wrt/openwrt did you try? Jul 16, 2019 at 19:48
  • I tried: DD-WRT 3.0 Beta Build 37305 and FreshTomato 2019.3.118 -beta. FreshTomato uses dnsmasq version 2.80-343b7b4. Jul 17, 2019 at 20:08

1 Answer 1


Are you sure that dnsmasq picked up the changes? I ran into some issues at times where the daemon would not properly restart. Try rebooting the router to see if the configuration changes are actually picked up that way. If you don't want to reboot, just restart dnsmasq and check it has a new PID after the restart.

By the way, have you considered the possibility that your DHCP server is indeed responding correctly but that the nmap script is buggy? I just ran that command in my LAN and got the same response. When I checked in syslog, I was able to verify that the leases were indeed much longer.

  • Hey @MAV, thanks for the answer but i checked both the dnsmasq and the nmap script: when i enable the dhcp server of the fritzbox it shows a lease time of 2 days and I still get the 2min times after a router reboot. Even though changes of the DHCP range are applied. Jul 20, 2019 at 9:20
  • Hi, I just re-checked the DHCPOFFERs using wireshark, the output of the nmap script is correct. Jul 27, 2019 at 12:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .