[Dnsmasq-discuss] How to force release/renew IP from dnsmasq

john doe johndoe65534 at mail.com
Wed Aug 14 06:08:03 BST 2019


On 8/14/2019 3:41 AM, dnsmasqyq.xpt at neverbox.com wrote:
> I need my local machine to obtain a new/correct IP from dnsmasq.
>
> Basically I've given all my local machines static IPs from the dnsmasq server.
>
> However, some obtained dynamic IPs prior to I giving them static IPs,
> but now I have no way to have them changed to the new given static
> IPs.
>
> I've stopped then started local NetworkManager, and according to
>
> https://www.linuxquestions.org/questions/linux-newbie-8/dnsmasq-force-release-renew-of-dhcp-clients-how-933535/
> https://serverfault.com/questions/739022/how-do-i-manually-release-a-dhcp-lease-on-the-dhcp-server-itself
>
> I've stopped then started the dnsmasq server itself, and clear the
> dnsmasq.leases file in between as well.
>
> But still, nothing worked.
>
> This is what I am at now:
>
> $ systemctl status dnsmasq | tail -1
> Aug 13 21:23:14 maroon dnsmasq-dhcp[17588]: not giving name coral to
> the DHCP lease of 192.168.0.89 because the name exists in
> /etc/dnsmasq.hosts with address 192.168.0.102
>
> yet:
>
> $ cat /var/lib/misc/dnsmasq.leases
> 1566177794 90:b1:...:1f 192.168.0.89 coral *
>
> and `192.168.0.89` is the IP I got at coral.
>
> PS. the coral lease has been the following before, prior to I clear
> the dnsmasq.leases file:
>
> 1566176399 90:b1:...:1f 192.168.0.89 coral 01:90:...:1f
>
> Moreover, I've try to run the following `dhcp_release` command at the
> dnsmasq server before all these:
>
> dhcp_release eth0 192.168.0.89 90:b1:...:1f '*'
>

Idealy you would release the lease on the client or wait untill the
lease expire on the client.
This question was asked befor on the list and some other answers are in
the list archive.

--
John Doe



More information about the Dnsmasq-discuss mailing list