I switched from a network to The addresses are provided by dnsmasq-dhcp.

The switch went fine for all devices but one - a printer (called PRINTER). This printer was assigned a fixed IP based on its name defined in /etc/hosts (via dhcp-host=PRINTER) and still does with the new ranges.

When it requests an IP address, the DHCP server states in its logs that

dnsmasq-dhcp:  not giving name PRINTER to the DHCP lease of because the name exists in /etc/hosts with address

I do not understand this message: the name indeed exists in /etc/hosts, with now the new address. While I guess that the DHCP query from the printer hints about the old IP address it used to have, why doesn't dnsmasq just ignore that and provide the new IP address?


Check if your printer name for old ip is here: /var/lib/misc/dnsmasq.leases and edit that file, you must stop dnsmask first

check the Lease times you setup when you configured dhcp, if you assigned too much time then it will take a while to "fix "itself


First off, I will assume that your printer is properly implementing DHCP and DDNS updates, but this is not always true. I am also assuming that the original lease it obtained has not expired yet. If you are getting this message after expiration, then you might be dealing with an improper DHCP implementation.

Your printer obtained a lease of, and was told that it would be valid for X number of days. Some time before that, you changed the range to The printer still has an address lease that is technically valid, although undesirable.

During a lease, it is common for a device to request a lease renewal and/or a DDNS update. The lease renewal is obviously declined, since the original address is no longer valid for new leases, but that doesn't mean the printer will stop using it. It might not request a new address until the original lease has fully expired. This is not a bug.

The name update seems to be what is triggering the error, though. Depending on your configuration, it could be the printer requesting the name renewal, or the DHCP server requesting the renewal on behalf of the printer. The name renewal is being rejected since the address it's tied to is no longer a valid address on the server. The server parts are smart enough to know this, but the device will hang on until the bitter end before trying again, and probably succeeding.

The renewal process is basically the client or its agent asking if it may please continue using this name on that address. The server gets to answer "Yes," or "no," but does not get to say "No, but use this one instead."

The shortcut is to get your printer to release its lease and get a new one. You can usually do this through the web interface, or sometimes a power cycle.

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.