<div dir="ltr">that's very helpful Michael, thank you, works perfectly for my scenario (and no I don't care about CNAMEs, As are ok).<div><br></div><div>thanks again,</div><div><br></div><div>Spike</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 17, 2017 at 10:25 AM Michael <<a href="mailto:michael@kmaclub.com">michael@kmaclub.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 08/14/2017 03:27 PM, Spike wrote:<br>
> Dear all,<br>
><br>
> two things I'm trying to figure out:<br>
><br>
> #CNames<br>
> how can I implement cnames in dnsmasq? I have static per mac<br>
> assignments in my hosts file and I'd like to add one or more cnames<br>
> per host. Is that possible, what's the syntax? I've seen some pages<br>
> discussing the topic, but none of the solutions worked for me and more<br>
> importantly none of them was specifying more than one cname.<br>
><br>
> #DNS while host is down<br>
> As far as I can see dnsmasq will respond to a host request only if the<br>
> host is alive/got a dhcp. Is it possible to override this behavior? If<br>
> I have a host definition with an ip, I need that to resolve even if<br>
> the host is down.<br>
><br>
<br>
I think they key is to realize dnsmasq is a tool with multiple jobs:<br>
1) DNS<br>
2) DHCP<br>
3) tftp<br>
4) etc<br>
<br>
These jobs can all be interconnected easily within dnsmasq.<br>
<br>
Static host for DNS - add to /etc/hosts or specify an alternate (or<br>
additional ) host file w/ addn-hosts=<file> directive.<br>
<br>
My host looks like:<br>
<br>
192.168.1.10  hosta www aliasb aliasc<br>
192.168.1.11  hostb<br>
192.168.1.12  hostc<br>
<br>
These entries are permanent and have no dependency on these hosts having<br>
a dhcp lease.  www, aliasb, and aliasc are now "aliases" for hosta, but<br>
they are A records and not CNAMES.    Do you really require a CNAME or<br>
will A record suffice?<br>
<br>
you can then statically define DHCP clients if you choose such as:<br>
<br>
dhcp-host=00:90:a9:f1:b3:e7,hostf<br>
<br>
dnsmasq will now provide a dhcp lease to this host.    If hostf is in<br>
your hosts file, it will give it that static IP.   If it isnt', it will<br>
give you an IP from the dhcp range AND dynamically add hostf to DNS.<br>
Once DHCP lease is no longer valid, it will remove hostf from DNS.<br>
<br>
if you don't define the dhcp-host at all, it will give a DHCP ip and use<br>
the hostname the client passed up to add to DNS and will again remove it<br>
when the lease goes away.<br>
<br>
Does that help clarify?<br>
<br>
Michael<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote></div>