[Dnsmasq-discuss] How to get dnsmasq to forget a changed IP address?
Chris Green
cl at isbd.net
Sat Feb 5 08:51:58 UTC 2022
On Fri, Feb 04, 2022 at 11:57:46PM +0100, Geert Stappers via Dnsmasq-discuss wrote:
> On Fri, Feb 04, 2022 at 06:44:17PM +0000, Chris Green wrote:
> > I have just changed a system on my LAN to a static IP. I have added
> > its address to /etc/hosts on my LAN's DHCP/DNS server (dnsmasq) and I
> > have restarted dnsmasq on that system. I have also restarted dnsmasq
> > on 'this' system (my laptop). However I'm still getting the old IP
> > address for the changed system.
> >
> > How do I get systems to forget the old address?
> >
>
> By understanding where IPv4-addresses are stored.
>
> Do known that DHCP server **and also** the DHCP client
> do try to keep the IPv4-address. "try to keep" as in "keep assigned"(by
> server) and "keep using" (by the client)
>
> Manual page of DHCP-server dnsmasq ( `man dnsmasq` ) mentions:
>
> /var/lib/misc/dnsmasq.leases
> /var/db/dnsmasq.leases
>
>
> Where the DHCP-client stores it's information, is up to the DHCP-client.
>
I'd looked at /var/lib/misc/dnsmasq.leases.
However it turns out my problem was a typo! I was changing a system
from DHCP client to static IP and I had mis-typed the new IP in
/etc/hosts both on the DHCP/DNS server and on the system whose IP had
changed. That did confuse things somewhat!
My overnight backup scripts showed me the error by reporting that they
couldn't connect to the backup system, with its incorrect IP.
--
Chris Green
More information about the Dnsmasq-discuss
mailing list