<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div>I'm seeing an unexptected (to me) behavior when using a dnsmasq hostsfile and dhcp. To start, my interface (pmi_if) is configured with a lease time of 1h (the default), and I have a blank hostsfile.</div><div><br></div><div style="background-color: transparent;">dhcp-leasefile=/var/lib/axiom/dnsmasq_pmi.leases</div><div style="background-color: transparent;">dhcp-hostsfile=/var/lib/axiom/dnsmasq_pmi_hostsfile</div><div style="background-color: transparent;">dhcp-range=172.30.80.0,static,255.255.255.0</div><div style="background-color: transparent;">dhcp-range=172.30.80.200,172.30.80.240,255.255.255.0</div><div style="background-color: transparent;">dhcp-lease-max=255</div><div style="background-color: transparent;">dhcp-option=option:dns-server,172.30.80.1</div><div
style="background-color: transparent;">dhcp-option=option:router,172.30.80.1</div><div style="background-color: transparent;">dhcp-option=option:ntp-server,172.30.80.1,172.30.80.2,172.30.80.3</div><div style="background-color: transparent;">dhcp-option=option:default-ttl,50</div><div style="background-color: transparent;">dhcp-option=option:all-subnets-local,1</div><div style="background-color: transparent;">dhcp-script=/var/lib/axiom/dhcp-script-pmi.sh</div><div style="background-color: transparent;">dhcp-boot=/pds/pxe/pxelinux.0,172.30.80.1</div><div style="background-color: transparent;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">Clients boot and are assigned dhcp addresses as expected. We have a program in our software stack that looks for heartbeat messages on this pmi_if, and when
detected, constructs a hostsfile entry for the client that looks like this:</div><div><br></div><div style="background-color: transparent;">[root@pilot2 axiom]# cat dnsmasq_pmi_hostsfile</div><div style="background-color: transparent;">00:21:28:A1:F3:F2,00:21:28:A1:F3:F3,,WN5080020001592690,172.30.80.128</div><div style="background-color: transparent;">00:21:28:A1:CA:3A,00:21:28:A1:CA:3B,,WN5080020001592691,172.30.80.129</div><div><br></div><div>The clients are running udhcpc from busybox.</div><div><br></div><div>Everything works as expected until the clients get toward the end of their 1h lease period at which point the clients start sending DHCPREQUEST requests. It seems at this point, that the leases granted are now 120s. Here's some syslog output showing the first DHCPREQUEST being sent about 55 minutes into the 1h initial lease. Why did dnsmasq return a lease time of 12s in this case?</div><div><br></div><div><div>2013-12-16
19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 DHCPREQUEST(pmi_if) 172.30.80.129 00:21:28:a1:ca:3a</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 tags: known, pmi_if</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 DHCPACK(pmi_if) 172.30.80.129 00:21:28:a1:ca:3a WN5080020001592691</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 requested options: 1:netmask, 3:router, 6:dns-server, 12:hostname,</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 requested options: 15:domain-name, 28:broadcast, 42:ntp-server</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 bootfile name: /pds/pxe/pxelinux.0</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 server name: 172.30.80.1</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 next server:
172.30.80.3</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 1 option: 53 message-type 5</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 4 option: 54 server-identifier 172.30.80.3</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 4 option: 51 lease-time 2m</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 4 option: 58 T1 56s</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 4 option: 59 T2 1m41s</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 4 option: 1 netmask 255.255.255.0</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 4 option: 28 broadcast 172.30.80.255</div><div>2013-12-16
19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 5 option: 15 domain-name axiom</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 18 option: 12 hostname WN5080020001592691</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 20 option:209 70:78:65:6c:69:6e:75:78:2e:63:66:67:2f:64...</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 4 option:208 f1:00:74:7e</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 12 option: 42 ntp-server 172.30.80.1, 172.30.80.2, 172.30.80.3</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 4 option: 3 router 172.30.80.1</div><div>2013-12-16 19:33:42.253+00:00 pilot2 dnsmasq-dhcp[23916]: 208328817 sent size: 4 option: 6 dns-server
172.30.80.1</div><div><br></div></div><div><br></div><div>Is there a default lease time of 120s for client requests whose addresses which match a hoststfile entry?</div><div><br></div><div>thanks</div><div>Mark</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><br></div></div></body></html>