What's new

dnsmasq-dhcp error: not giving name to the DHCP lease of ##because the name exists ..

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

bROTHER

Regular Contributor
AC-68U here on Merlin 376.47
I get this constantly in my syslog, but cannot clearly see why:

Code:
dnsmasq-dhcp[863]: not giving name Toshiba to the DHCP lease of 192.168.1.15 because the name exists in /etc/hosts.dnsmasq with address 192.168.1.14

"Toshiba" is a laptop that when in wireless mode is assigned the 1.15 IP, and when in wired mode the 1.14 IP. I getting that message when working in wireless mode, although the leases work ok.

This is the /var/lib/misc/dnsmasq.leases:

Code:
85195 00:19:d2:1a:d5:a4 192.168.1.15 Toshiba *

This is the /etc/dnsmasq.conf:

Code:
pid-file=/var/run/dnsmasq.pid
user=nobody
resolv-file=/tmp/resolv.conf
servers-file=/tmp/resolv.dnsmasq
no-poll
min-port=4096
bind-dynamic
interface=br0
interface=ppp1*
no-dhcp-interface=ppp1*
no-negcache
cache-size=1500
dhcp-range=lan,192.168.1.10,192.168.1.30,255.255.255.0,86400s
dhcp-option=lan,3,192.168.1.1
dhcp-option=lan,252,"\n"
dhcp-lease-max=253
dhcp-authoritative
read-ethers
addn-hosts=/etc/hosts.dnsmasq

This is the /etc/hosts.dnsmasq:

Code:
192.168.1.10 brother
192.168.1.12 Raquel
192.168.1.14 Toshiba
192.168.1.16 ASRock

I use even numbers for wired and odd for wireless. A host can have both wired and wireless; in this case their mac is different and the name I gave to them in "Manually Assigned IP around the DHCP list" section of the router is slighty different.

  • wired Toshiba name is "Toshiba"
  • wireless Toshiba name is "Toshiba.2.4GHz"
  • laptop hostname is "Toshiba"

The thing is, I don't know how the router fills the /etc/hosts.dnsmasq because it only contains wired IP's no matter if the hosts are off or on.
It seems that the name Toshiba cannot be repeated if already used, but they are different!

I already tried to delete names from that file, but upon reboot router fills it up again in the same way.

Any clue?

Regards.
 
Assigning the same hostname to two different IPs is usually a bad idea, as it will confuse any name lookup, and unexpired leases will indeed conflict. Give different names to each IP on your DHCP reservation page.
 
Hi, thank you for your answer.

Yeah, I agree on the name lookup issue but the system also dislikes having two interfaces with the same IP, so I ended with this rule of one IP per interface.

I changed the name on the DHCP several times until I got rid of this error. There seems to be some kind of issue when dealing with "." or spaces because this characters are accepted in the UI but ignored internally when looking for a matching string.

Regards.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top