<div dir="ltr">My description was not good, maybe an example would be better. Hypothetical example:<div><br></div><div>1. New machine arrives, get MAC address from label on box.</div><div>2. Add "00:11:22:33:44;55,192.168.1.1,newhost,1d" to dnsmasq config.</div><div>3. restart dnsmasq</div><div>4. host newhost.my.domain results in "not found"</div><div>5. rack and power on newhost, DHCP lease established</div><div>6. host newhost returns 192.168.1.1</div><div><br></div><div>The problem in my environment is that at step 4 I also want to configure a number of other tools that will complain about the host not being found and it may be days/weeks before the system actually gets booted up. So I'd like DNS queries to work independently of the lease being established. For dynamic hosts this isn't possible, but where I've tied a mac to a specific IP it is. I kludge this by converting these entries into a hostfile at every reload of dnsmasq with a wrapper script, but would like to eliminate that step if there is a way to have dnsmasq just return answers it knows or should know..</div><div><br></div><div>Thank you,</div><div><br></div><div>jbh</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 29, 2016 at 11:56 AM Albert ARIBAUD <<a href="mailto:albert.aribaud@free.fr">albert.aribaud@free.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">,<br class="gmail_msg">
<br class="gmail_msg">
Le Thu, 29 Dec 2016 07:58:26 +0000<br class="gmail_msg">
John Hanks <<a href="mailto:griznog@gmail.com" class="gmail_msg" target="_blank">griznog@gmail.com</a>> a écrit:<br class="gmail_msg">
<br class="gmail_msg">
> Hi,<br class="gmail_msg">
><br class="gmail_msg">
> I frequently set up static dhcp-host entries for hosts that won't<br class="gmail_msg">
> boot for some time or may go away for long periods but I'd still like<br class="gmail_msg">
> to have dnsmasq respond to DNS queries based on this host/static IP.<br class="gmail_msg">
> Currently I accomplish this by having a script which parses my<br class="gmail_msg">
> dhcp-host entries and builds a host file for all the entries. Is<br class="gmail_msg">
> there any way to tell dnsmasq to do answer for hosts that may not<br class="gmail_msg">
> have gotten a dhcp lease yet so that I don't need to do this<br class="gmail_msg">
> double-entry?<br class="gmail_msg">
<br class="gmail_msg">
Er... If the DHCP protocol required a host to already have a DHCP lease<br class="gmail_msg">
in order to get a lease from a DHCP server, not many leases would be<br class="gmail_msg">
sent out, since a host /always/ begins its DHCP life without a lease. :)<br class="gmail_msg">
<br class="gmail_msg">
So, I am probably misunderstanding your problem.<br class="gmail_msg">
<br class="gmail_msg">
Can you describe your LAN setup and the detailed step-by-step example<br class="gmail_msg">
where dnsmasq should answer and dos not?<br class="gmail_msg">
<br class="gmail_msg">
> Thank you,<br class="gmail_msg">
><br class="gmail_msg">
> jbh<br class="gmail_msg">
<br class="gmail_msg">
Amicalement,<br class="gmail_msg">
--<br class="gmail_msg">
Albert.<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
Dnsmasq-discuss mailing list<br class="gmail_msg">
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" class="gmail_msg" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br class="gmail_msg">
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br class="gmail_msg">
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div>‘[A] talent for following the ways of yesterday, is not sufficient to improve the world of today.’</div><div> - King Wu-Ling, ruler of the Zhao state in northern China, 307 BC</div></div></div>