<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Hi,<br></div><div><br></div><div>I have a fairly simple DHCP setup on a Raspbian box, using dnsmasq 2.80. The relavant options in /etc/dnsmasq.conf are (yes, my home LAN is 10.168.8.0/24):<br></div><div><br></div><div>dhcp-range=10.168.8.10,10.168.8.200 # Also tried with 12h on the end, no difference<br></div><div>dhcp-authoritative<br></div><div>log-dhcp<br></div><div><br></div><div>I'm testing by running "dnsmasq -d" in a shell, so I can see what's going on.<br></div><div><br></div><div>When dnsmasq gets a DHCP request (I'm using "nmap --script broadcast-dhcp-discover" on another box to test), I see the following:<br></div><div><br></div><div>dnsmasq-dhcp: 811185697 broadcast response<br></div><div>dnsmasq-dhcp: 811185697 sent size:  1 option: 53 message-type  2<br></div><div>dnsmasq-dhcp: 811185697 sent size:  4 option: 54 server-identifier  10.168.8.254<br></div><div>dnsmasq-dhcp: 811185697 sent size:  4 option: 51 lease-time  2m<br></div><div>dnsmasq-dhcp: 811185697 sent size:  4 option: 58 T1  1m<br></div><div>dnsmasq-dhcp: 811185697 sent size:  4 option: 59 T2  1m45s<br></div><div>dnsmasq-dhcp: 811185697 sent size:  4 option:  1 netmask  255.255.255.0<br></div><div>dnsmasq-dhcp: 811185697 sent size:  4 option: 28 broadcast  10.168.8.255<br></div><div>dnsmasq-dhcp: 811185697 sent size:  4 option:  3 router  10.168.8.254<br></div><div>dnsmasq-dhcp: 811185697 sent size:  4 option:  6 dns-server  10.168.8.254<br></div><div>dnsmasq-dhcp: 811185697 sent size: 16 option: 15 domain-name  myhome<br></div><div><br></div><div>Notice the lease-time, T1 and T2 responses... 2 minutes??? Default should be 1 hour, and I get the same 2m if I specify 12h in the dhcp-range line.<br></div><div><br></div><div>I then added the following to the conf file:<br></div><div><br></div><div>dhcp-option=51,12h<br></div><div>dhcp-option=58,12h # DHCP Renewal (T1) Time<br></div><div>dhcp-option=59,12h # DHCP Rebinding (T2) Time<br></div><div><br></div><div>Then the response looked like this:<br></div><div><br></div><div>dnsmasq-dhcp: 1994188113 broadcast response<br></div><div>dnsmasq-dhcp: 1994188113 sent size:  1 option: 53 message-type  2<br></div><div>dnsmasq-dhcp: 1994188113 sent size:  4 option: 54 server-identifier  10.168.8.254<br></div><div>dnsmasq-dhcp: 1994188113 sent size:  4 option: 51 lease-time  2m<br></div><div>dnsmasq-dhcp: 1994188113 sent size:  4 option: 58 T1  1m<br></div><div>dnsmasq-dhcp: 1994188113 sent size:  4 option: 59 T2  1m45s<br></div><div>dnsmasq-dhcp: 1994188113 sent size:  4 option:  1 netmask  255.255.255.0<br></div><div>dnsmasq-dhcp: 1994188113 sent size:  4 option: 28 broadcast  10.168.8.255<br></div><div>dnsmasq-dhcp: 1994188113 sent size:  4 option:  3 router  10.168.8.254<br></div><div>dnsmasq-dhcp: 1994188113 sent size:  4 option:  6 dns-server  10.168.8.254<br></div><div>dnsmasq-dhcp: 1994188113 sent size: 16 option: 15 domain-name  myhome<br></div><div>dnsmasq-dhcp: 1994188113 sent size:  4 option: 51 lease-time  12h<br></div><div><br></div><div>Two lease-time responses, at least the correct 12h one is second so the client uses that, but notice that T1 and T2 are still wrong.<br></div><div><br></div><div>The upshot is that most DHCP clients (Android and Windows anyway) just reject the response.<br></div><div><br></div><div>For now, I guess I'll have to install isc-dhcp-server, since 2.80 is the only version of dnsmasq available for Raspdian 10 (buster). Bit of overkill for a little home LAN only running a couple of devices, but there we have it.<br></div><div><br></div></div><br></body></html>