On Tue, Apr 21, 2020 at 09:57:34AM -0400, Jiawen Chen wrote:
> On Tue, Apr 21, 2020 at 3:06 AM Geert Stappers wrote:
> > On Mon, Apr 20, 2020 at 10:27:11PM -0400, Jiawen Chen wrote:
> > >
> > > I'm using dnsmasq for DHCP + DNS on my home LAN and use dhcp-host to
> > > statically assign an IP address and hostname. However, I'm discovering 
> > > that
> > > while it works most of the time, sometimes, ssh for example, can't find 
> > > the
> > > host by name, only IP. One instance is a Linux VM. Initially I can ssh 
> > > into
> > > the VM. But if I power down the VM for say a few days, and start it back
> > > up, the name is missing (even though it is somehow assigned the same IP 
> > > (it
> > > keeps its MAC)).
> > >
> > > dnsmasq.conf:
> > > ```
> > > # other irrelevant stuff
> > >      ...
> > > # Assign 192.168.0.150 to my living room pc
> > > dhcp-host=<livingroom_pc_MAC_redacted>,192.168.0.150,livingroom.internal,infinite
> > >
> > > # Assign 192.168.0.151 to my file server
> > > dhcp-host=<fileserver_MAC_redacted>,192.168.0.151,fileserver.internal,infinite
> > > ```
> >
> > I suggest to change  the   ',infinite'   into something like  ',12h' for
> > the servers that are be powered-off of for several days.
> >
> > What I think is that the DNS cache  entry expires
> > ( and I think that it is valid behaviour.)
> >
> >
> > Expriment that can be done:
> >
> >  * Restart dnsmasq,  so it forgets about dhcp-hosts in DNS cache
> >  * Check cache dump with  SIGUSR1
> >  * Power-on an infinite DHCP client e.g. the Linux VM
> >  * Check cache dump with SIGUSR1
> >  * Regular work with the example Linux VM
> >  * Power-off the infinite DHCP client
> >  * Sample several days the cache dump
> >  * Report when the DNS entry of the powered-off server is gone
> >
> 
> Thanks! That makes sense. I will give that a shot.


Cool.  I look forward on feedback.



Groeten
Geert Stappers
-- 
Silence is hard to parse

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to