[Dnsmasq-discuss] patch proposal: getent support for ethers

richardvoigt at gmail.com richardvoigt at gmail.com
Fri Jun 26 01:10:32 BST 2009


> Many people have asked for a DHCP server with LDAP support, but nobody
> make that happen (at least, not with dynamic updates).

I've implemented dynamic update of static IP assignments from an SQL
server with no changes needed to the dnsmasq code.  While your method
should work, it definitely won't be efficient.  Since DHCP is a
polling protocol, requests have to be more frequent than updates
almost by definition (the lease-time must be set short in case of
dynamic updates, or the client won't see the new settings).

I accomplished this by making /etc/ethers a pipe connected to a perl
script which reads all assignments from the database.  Happily I am
using postgresql which allows clients to be notified of table updates,
so I have another perl script which waits for an update and signals
the dnsmasq process to re-read /etc/ethers.

I think you could set up something similar for your environment.

I guess if the number of assignments in the database is far larger
than the number of simultaneously connected clients then querying the
database per-request might be better than transferring the entire
database after each change.  I don't know if the dbus interface would
allow updating individual assignments.



More information about the Dnsmasq-discuss mailing list