On 11/03/11 13:39, Terry Coles wrote:


Thanks for the suggestions to date (the overwhelming support for dnsmasq).
However, when I related this to my colleage at work he said he couldnt see why
this (or bind) was needed because when he enabled udhcpd, he found that it
maintains a list of all hosts on the network so why couldn't that be used?

I didn't get a chance to look at it this morning, so I couldn't answer him,
but I could bear to know if what he's suggesting is possible.


udhcpd is just a standard DHCP server. All DHCP servers keep a list of hosts they've given leases to, either in a database or a text file. They have to, in order to work properly!

The issue is, how would you get it so that "ping mybox" worked? Name resolution on your local machine will typically look at /etc/hosts and then try a DNS lookup. This is usually slightly configurable, but I can't see how you'd get the name resolution to use udhcpd's list of leases, unless you created a script to watch it for changes and update /etc/hosts.

I agree that you could do something like ping $(grep mybox /var/lock/udhcpd/leases | awk '{print $2}') but that is a bit hacky, no? [*]

Since dnsmasq basically does this part for you (it includes a DHCP server and a DNS server, and it's DNS server knows about the DNS leases), why re-invent the wheel?

[*] I just made that up, don't try to use it.

--
Next meeting:  Bournemouth, Tuesday 2011-04-05 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://goo.gl/4Xue

Reply via email to