<br><br><div><span class="gmail_quote">On 8/31/07, <b class="gmail_sendername">Mogens Melander</b> &lt;<a href="mailto:mogens@fumlersoft.dk">mogens@fumlersoft.dk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for your reply.<br><br>I got redirect working using iptables. I somehow got the idea that<br>the &quot;address=/wifi-unknown/192.168.1.2&quot; option would forward members<br>of the unknown range to <a href="http://192.168.1.2">
192.168.1.2</a>, but never mind.<br><br>I did find out that &quot;conf-dir=/etc/dnsmasq/hosts&quot; is not included in<br>the poll function. Why that is, i can&#39;t imagine, other than it must<br>be a bug. The nice ting about &quot;conf-dir&quot; is that you can have a file
</blockquote><div><br>It&#39;s no bug.&nbsp; The conf-dir can contain *any* configuration options, and dnsmasq cannot change for example the port number or bound interfaces without a restart. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
for each lease, making it easy to maintain.</blockquote><div><br>I&#39;ve found that those other files can be a fifo special file, meaning that a script can provide the data.&nbsp;&nbsp; I pull my /etc/ethers from a database each time dnsmasq asks for it.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I can&#39;t figure out how to move a client from unknown to known range.<br>I tried to put &quot;dhcp-host=00:60:08:03:07:30,net:known&quot; in a &quot;conf-dir&quot;
<br>file, but that only result in the client being tagged as both:<br><br>&nbsp;&nbsp;DHCPREQUEST(eth0) <a href="http://192.168.2.34">192.168.2.34</a> 00:60:08:03:07:30<br>&nbsp;&nbsp;DHCPACK(eth0) <a href="http://192.168.2.34">192.168.2.34</a>
 00:60:08:03:07:30 MITAC2<br>&nbsp;&nbsp;requested options: 1:netmask, 15:domain-name, 3:router, 6:dns-server,<br>&nbsp;&nbsp;requested options: 44:netbios-ns, 46:netbios-nodetype, 47:netbios-scope,<br>&nbsp;&nbsp;requested options: 43:vendor-encap, 77:user-class
<br>&nbsp;&nbsp;tags: unknown, known</blockquote><div><br>That&#39;s ok, put &quot;net:#known&quot; in the pool for unknown hosts and totally eliminate the &quot;unknown&quot; tag.&nbsp; The hash mark &quot;#&quot; means NOT.<br>&nbsp;</div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If i should use the /etc/ethers and /etc/hosts option, i would have to maintain<br>both files, and hosts would contain entries like:
</blockquote><div><br>I don&#39;t see any need for /etc/hosts whatsoever, /etc/ethers creates mappings directly from MAC address to static IP.<br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<a href="http://192.168.3.33">192.168.3.33</a>&nbsp;&nbsp;<a href="http://host-3-33.example.com">host-3-33.example.com</a>&nbsp;&nbsp; host-3-33<br><a href="http://192.168.3.34">192.168.3.34</a>&nbsp;&nbsp;<a href="http://host-3-34.example.com">host-3-34.example.com
</a>&nbsp;&nbsp; host-3-34<br>...<br><a href="http://192.168.3.250">192.168.3.250</a> <a href="http://host-3-250.example.com">host-3-250.example.com</a>&nbsp;&nbsp;host-3-250<br><br>I don&#39;t find that usefull. I&#39;d prefere to use the conf-dir option, and
<br>if a restart is required for that to work, so be it.</blockquote><div><br>If you upgrade to 2.40, there&#39;s a new dhcp-hostsfile option which can contain only hosts information, so dnsmasq can reread it on the fly (at SIGHUP).&nbsp; That would be useful if you need to provide host-specific DHCP options, otherwise it is identical to /etc/ethers.
<br><br>Using a FIFO to let a script generate the content on the fly is the key to managing the list.<br></div></div>