[Dnsmasq-discuss] feature request: multiple domain support

Simon Kelley simon at thekelleys.org.uk
Sun Jul 20 15:36:33 BST 2008


Ben wrote:
> I would like request that multiple "domain" options be supported.
> 
> I have read through the archives and know and understand the backward 
> compatibility issues it would raise but it has been requested several 
> times before and would obviously be useful for many users.
> 
> I would see the support being along the lines of supporting multiple 
> lease files to avoid modifying the lease file format.
> 
> Example:
> 
>     dhcp-range=lan1,192.168.1.100,192.168.1.150,255.255.255.0,24h
>     dhcp-range=lan2,192.168.2.100,192.168.2.150,255.255.255.0,24h
> 
>     dhcp-leasefile=net:lan1,/var/lib/dnsmasq/dnsmasq-lan1.leases
>     dhcp-leasefile=net:lan2,/var/lib/dnsmasq/dnsmasq-lan2.leases
> 
>     domain=net:lan1,demo1.example.com
>     domain=net:lan2,demo2.example.com
> 
> 
> This would allow the lease file to keep its syntax and only the daemon 
> would need to know that names or ips resolved from the lease files are 
> associated with particular domain names depending on the lease file they 
> came from.
> 
> What do you think?
> 

I think it could actually be simpler than this: if one is willing to 
accept that the domain-in-use is controlled by a tag, (lan1, lan2 in 
your example) then it doesn't have to be stored anywhere in the lease 
database, so the elaboration of multiple lease files is not needed. The 
domain in use comes from the set of tags, and probably, most likely from 
the subnet, as in your example.

I'll look at implementing this, soon, but I've spent way too much time 
on dnsmasq in the last couple of weeks, so it may be a little while. 
Ben, please feel free to prod me again if it slips my mind and you don't 
hear back.

Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list