<br><br><div><span class="gmail_quote">On 8/31/07, <b class="gmail_sendername">Mogens Melander</b> <<a href="mailto:mogens@fumlersoft.dk">mogens@fumlersoft.dk</a>> 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 "address=/wifi-unknown/192.168.1.2" 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 "conf-dir=/etc/dnsmasq/hosts" is not included in<br>the poll function. Why that is, i can't imagine, other than it must<br>be a bug. The nice ting about "conf-dir" is that you can have a file
</blockquote><div><br>It's no bug. 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've found that those other files can be a fifo special file, meaning that a script can provide the data. 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't figure out how to move a client from unknown to known range.<br>I tried to put "dhcp-host=00:60:08:03:07:30,net:known" in a "conf-dir"
<br>file, but that only result in the client being tagged as both:<br><br> DHCPREQUEST(eth0) <a href="http://192.168.2.34">192.168.2.34</a> 00:60:08:03:07:30<br> DHCPACK(eth0) <a href="http://192.168.2.34">192.168.2.34</a>
00:60:08:03:07:30 MITAC2<br> requested options: 1:netmask, 15:domain-name, 3:router, 6:dns-server,<br> requested options: 44:netbios-ns, 46:netbios-nodetype, 47:netbios-scope,<br> requested options: 43:vendor-encap, 77:user-class
<br> tags: unknown, known</blockquote><div><br>That's ok, put "net:#known" in the pool for unknown hosts and totally eliminate the "unknown" tag. The hash mark "#" means NOT.<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;">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't see any need for /etc/hosts whatsoever, /etc/ethers creates mappings directly from MAC address to static IP.<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;">
<a href="http://192.168.3.33">192.168.3.33</a> <a href="http://host-3-33.example.com">host-3-33.example.com</a> host-3-33<br><a href="http://192.168.3.34">192.168.3.34</a> <a href="http://host-3-34.example.com">host-3-34.example.com
</a> 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> host-3-250<br><br>I don't find that usefull. I'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's a new dhcp-hostsfile option which can contain only hosts information, so dnsmasq can reread it on the fly (at SIGHUP). 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>