[Dnsmasq-discuss] not giving name to the DHCP lease

Simon Kelley simon at thekelleys.org.uk
Sun Apr 23 14:46:14 BST 2017


On 22/04/17 07:12, Harald Dunkel wrote:
> Hi folks,
> 
> dnsmasq 2.76, as packaged for openBSD 6.1:
> 
> dnsmasq.log contains tons of lines like
> 
> :
> :
> Apr 22 04:08:46 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 04:08:46 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 04:41:25 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 04:41:25 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 04:50:15 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 04:50:15 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 04:50:18 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 04:50:18 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 04:53:04 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 04:53:04 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:35:12 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:35:12 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:54:50 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:54:50 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:54:50 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:54:50 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:54:54 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:54:54 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:55:40 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:55:40 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:55:40 dnsmasq-dhcp[70140]: not giving name nas1.example.com to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> Apr 22 05:55:40 dnsmasq-dhcp[70140]: not giving name nas1 to the DHCP lease of 10.0.0.239 because the name exists in /etc/hosts with address 10.0.0.3
> :
> :
> 
> Since nas1 is off for several hours and local-ttl was never set, I wonder
> why dnsmasq doesn't fix the lease according to /etc/hosts?

The crucial thing is the DHCP lease-length, not DNS TTLs. Whilst nas1
has a lease for 10.0.0.239 then dnsmasq will renew it and you'll see
those messages.

Cheers,

Simon.

> 
> 
> Regards
> Harri
> ----------------------------------------------------------------------------
> domain-needed
> bogus-priv
> no-resolv
> server=8.8.4.4
> server=2001:4860:4860::8888
> all-servers
> local=/example.com/
> interface=re1
> domain=example.com
> dhcp-range=10.0.0.128,10.0.0.254,12h
> dhcp-range=::,constructor:re1,ra-stateless,ra-names
> enable-ra
> ra-param=re1,120
> read-ethers
> dhcp-option=option:router,10.0.0.2
> dhcp-authoritative
> cache-size=1024
> localmx
> mx-target=mailhost.example.com.
> log-facility=/var/log/dnsmasq.log
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list