[Dnsmasq-discuss] Supporting more than one domain.

Simon Kelley simon at thekelleys.org.uk
Mon Jul 28 16:15:17 BST 2008


Olaf Westrik wrote:
> Simon Kelley wrote:
> 
>> Elaborate the "domain=" config option so that, as well as
>>
>> domain=example.org
>>
>> the following are also valid
>>
>> domain=example.org,192.168.100.128,192.168.100.180
>> domain=subnet.example.org,192.168.100.0/24
>> domain=anothernet.example.org,2001:db8:100:f101:210:a4ff:fee3:9566/64
> 
> Would it not be better / easier to make that:
> domain=[net:<network-id,]<domain>
> 
> If you are handing out differing domains, you are likely to hand out
> other options as well. All requiring network-id.

That was the original suggestion, the problem with it is that the
network-id set is generated dynamically during a DHCP transaction. The
really difficult time for this is when dnsmasq starts up: at that time
it has to populate the DNS using the information in the leases file and
the configuration file, generating net-tags during startup is even more
difficult than storing the domain directly in the lease file.

The advantage of the map-IP-address-to-domain idea is that it just needs
the IP address and the config file to find the correct domain. Both of
those are available at all times.
> 
> 
> Along a similar line you could also do
> bootp-dynamic[=<network-id[,<network-id>]]
> (probably the last dhcp option that is not net related ;-))
> 

That's a good idea; I'll do that.

Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list