[Dnsmasq-discuss] How to answer DNS for a host that has not gotten a lease?
John Hanks
griznog at gmail.com
Thu Dec 29 09:47:12 GMT 2016
My description was not good, maybe an example would be better. Hypothetical
example:
1. New machine arrives, get MAC address from label on box.
2. Add "00:11:22:33:44;55,192.168.1.1,newhost,1d" to dnsmasq config.
3. restart dnsmasq
4. host newhost.my.domain results in "not found"
5. rack and power on newhost, DHCP lease established
6. host newhost returns 192.168.1.1
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..
Thank you,
jbh
On Thu, Dec 29, 2016 at 11:56 AM Albert ARIBAUD <albert.aribaud at free.fr>
wrote:
> ,
>
> Le Thu, 29 Dec 2016 07:58:26 +0000
> John Hanks <griznog at gmail.com> a écrit:
>
> > Hi,
> >
> > I frequently set up static dhcp-host entries for hosts that won't
> > boot for some time or may go away for long periods but I'd still like
> > to have dnsmasq respond to DNS queries based on this host/static IP.
> > Currently I accomplish this by having a script which parses my
> > dhcp-host entries and builds a host file for all the entries. Is
> > there any way to tell dnsmasq to do answer for hosts that may not
> > have gotten a dhcp lease yet so that I don't need to do this
> > double-entry?
>
> Er... If the DHCP protocol required a host to already have a DHCP lease
> in order to get a lease from a DHCP server, not many leases would be
> sent out, since a host /always/ begins its DHCP life without a lease. :)
>
> So, I am probably misunderstanding your problem.
>
> Can you describe your LAN setup and the detailed step-by-step example
> where dnsmasq should answer and dos not?
>
> > Thank you,
> >
> > jbh
>
> Amicalement,
> --
> Albert.
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
--
‘[A] talent for following the ways of yesterday, is not sufficient to
improve the world of today.’
- King Wu-Ling, ruler of the Zhao state in northern China, 307 BC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20161229/7e7391e8/attachment.html>
More information about the Dnsmasq-discuss
mailing list