I think I'm getting crazy. I have my tiny server running dnsmasq nicely for years, doing its job nicely. Yesterday I added new host/interface to the network and I am trying to configure it with dhcp-host directive to get specific address just like the other hosts, but no matter what I do, it always gets an address from a pool. I checked MAC at least thousand times, I installed new random host and it was assigned the address I specified, I rebooted everything multiple times, I even run Wireshark to see what's going on....I have multiple dhcp-host directives in dnsmasq.conf and just this one doesn't work. When the new host asks for an address, it doesn't get the one set, but stubbornly again and again the one from the pool even after manual release. I am out of ideas, what about you, Internet?

edit: With logging enabled, I see this message: dnsmasq-dhcp[2704]: not giving name Kraft.home to the DHCP lease of because the name exists in /etc/hosts with address

But it gives .168 (from the pool) anyway, it doesn't give it .14 even though it apparently knows it should!

  • Well what happens if you remove the entry from hosts? – Darren Aug 14 '17 at 10:35

OK, so I found the cause. DNSMasq remembered to lease the IP in the past to different MAC so it refused to assign it to the new one even though it was directly told so, the little cocky prick. Clearing /var/lib/dnsmasq/dnsmasq.leases did the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.