<div dir="ltr">Can this be defined in the configuration file instead of arguments?<div><br></div><div>My configuration consists of the below but I can't get any offers to the discover requests from the client</div><div><br></div><div><font face="monospace, monospace">dhcp-range=192.168.0.0,static</font></div><div><font face="monospace, monospace">dhcp-hostsfile=/etc/dnsmasq.hosts</font></div><div><br></div><div>The file consists of the following format:</div><div><font face="monospace, monospace">192.168.0.1,linuxvm1</font></div><div><br></div><div>/etc/hosts has something similar:</div><div><font face="monospace, monospace">192.168.0.1 linuxvm1.lab</font></div><div><br></div><div>The linux VM has a hostname of <font face="monospace, monospace">linuxvm1</font></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 18, 2017 at 1:47 PM, Maurice Walker <span dir="ltr"><<a href="mailto:mail@maurice-walker.com" target="_blank">mail@maurice-walker.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 18.07.2017 16:00, James Lacy wrote:<br>
> Is there a way to have DNSMasq assign an address only if a client has a<br>
> hostname that corresponds to an entry in /etc/hosts?<br>
<br>
</span>Disable dynamic allocation and specify the hostnames which are allowed to be<br>
allocated an IP address:<br>
<br>
--dhcp-range=<start-addr>,<wbr>static<br>
--dhcp-host=<hostname1><br>
--dhcp-host=<hostname2><br>
<br>
You could also list the hostnames in a file (or let a script do that) and let<br>
dnsmasq read it:<br>
--dhcp-hostsfile=<path><br>
<br>
Either way the associated IP addresses will be read from /etc/hosts.</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--James<br>--<a href="mailto:jameslacy@gmail.com" target="_blank">jameslacy@gmail.com</a></div>
</div>