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

dnsmasqyq.xpt at neverbox.com dnsmasqyq.xpt at neverbox.com
Wed Aug 14 12:51:59 BST 2019


On Wed, Aug 14, 2019 at 2:08 AM Geert Stappers 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 '*'
> >
> > Please help.
>
> Start with providing the whole Dnsmasq configuration.

For the whole Dnsmasq configuration, I'm following this almost word for word:
https://sfxpt.wordpress.com/2013/11/30/dnsmasq-installation-configuration-5/

On Wed, Aug 14, 2019 at 1:52 AM john doe wrote:
>
> Idealy you would release the lease on the client or wait untill the
> lease expire on the client.

The lease did expire on the client first -- I was checking the
`systemctl status dnsmasq` and noticed that line,

.. not giving name coral to the DHCP lease of 192.168.0.89 because the
name exists in /etc/dnsmasq.hosts...

Then realized the situation.

> > Thanks
>
> Where can I exchange it for consumption vouchers?

I really appreciate the help. Next time your guys come to Toronto, let
me know and I'll buy you beers.




More information about the Dnsmasq-discuss mailing list