{Fraud?} {Disarmed} Re: [Dnsmasq-discuss] dhcp unknown vs. known

richardvoigt at gmail.com richardvoigt at gmail.com
Fri Aug 31 20:26:50 BST 2007

On 8/31/07, Mogens Melander <mogens at fumlersoft.dk> wrote:
> Thanks for your reply.
> I got redirect working using iptables. I somehow got the idea that
> the "address=/wifi-unknown/" option would forward members
> of the unknown range to, but never mind.
> I did find out that "conf-dir=/etc/dnsmasq/hosts" is not included in
> the poll function. Why that is, i can't imagine, other than it must
> be a bug. The nice ting about "conf-dir" is that you can have a file

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.

for each lease, making it easy to maintain.

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.

I can't figure out how to move a client from unknown to known range.
> I tried to put "dhcp-host=00:60:08:03:07:30,net:known" in a "conf-dir"
> file, but that only result in the client being tagged as both:
>   DHCPREQUEST(eth0) 00:60:08:03:07:30
>   DHCPACK(eth0) 00:60:08:03:07:30 MITAC2
>   requested options: 1:netmask, 15:domain-name, 3:router, 6:dns-server,
>   requested options: 44:netbios-ns, 46:netbios-nodetype, 47:netbios-scope,
>   requested options: 43:vendor-encap, 77:user-class
>   tags: unknown, known

That's ok, put "net:#known" in the pool for unknown hosts and totally
eliminate the "unknown" tag.  The hash mark "#" means NOT.

If i should use the /etc/ethers and /etc/hosts option, i would have to
> maintain
> both files, and hosts would contain entries like:

I don't see any need for /etc/hosts whatsoever, /etc/ethers creates mappings
directly from MAC address to static IP.  host-3-33.example.com   host-3-33
>  host-3-34.example.com   host-3-34
> ...
> host-3-250.example.com  host-3-250
> I don't find that usefull. I'd prefere to use the conf-dir option, and
> if a restart is required for that to work, so be it.

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.

Using a FIFO to let a script generate the content on the fly is the key to
managing the list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20070831/3fb18279/attachment.html

More information about the Dnsmasq-discuss mailing list