[Dnsmasq-discuss] Feature request for dhcp-hostfiles to behave like addn-hosts

Simon Kelley simon at thekelleys.org.uk
Wed Dec 15 14:49:18 GMT 2010


John Hanks wrote:
> I'd like to break my dhcp-hostsfile file into several smaller files to
> make it easier to maintain and the addn-hosts is working really well
> to do this for the hosts file so I'd like to submit a feature request
> that dhcp-hostsfile have the same behavior of processing all the files
> in a directory when pointed at a directory. This isn't really a
> critical thing, I can always keep separate files and merge them in my
> update process, but I am hoping that this would be a useful addition
> for others as well and save the extra step. Currently my file is about
> 1400 entries and I expect that to increase by an order of magnitude
> over the next year as we potentially run a hypervisor on each of those
> hosts and spawn multiple VMs.
> 

I can't see any reason not to do that, (and dhcp-optsfile, for
completeness). The hard work was done for addn-hosts and is easy to
generalise.

> A tangential question, I've increased MAXLEASES to
> 
> #define MAXLEASES 16384
> 
> in config.h. Is there any danger in having this many leases and
> increasing this even higher if necessary? I'm a few weeks away from
> being able to test this at scale and appreciate any warnings or
> feedback anyone might have now.
> 
If you get bitten anywhere, it will be performance writing the lease
file. That gets truncated and re-written for every change. On reasonable
storage it should be fine, but maybe not on a slow flash drive. If it's
a problem that's that prefect excuse to write a script to move the
database to a MySQL backend, right?

Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list