[Dnsmasq-discuss] Assign a domain by tag?

Simon Kelley simon at thekelleys.org.uk
Thu Sep 10 21:58:08 BST 2015

On 10/09/15 14:36, Jonathan Fisher wrote:
> Is there a way to assign a domain to a tag? The option:
> -s, --domain=<domain>[,<address range>[,local]]
> Gives you the ability to assign it to an IP range, but not a tag. If no,
> could that be added as an enhancement? 

No it can't, and it's difficult to do.

The reason is that the domain associated with a DHCP lease is not stored
in the lease database. That's sort-of historical, dating back to the
days when you could specify only one domain. When multiple domain
capability was added, it was decided not to upgrade the DHCP lease
database, which would be very disruptive for existing installations.
Instead, the domain was determined (and determinable) from the address
of the lease, which is in the database.

Hence the option you quote.

The easiest way around this for you would be to use tags to control
which address range your machines go into with --dhcp-range), and set
the domain differently for different address ranges.



The use case here is that I want my
> windows machines that are joined to ActiveDirectory to use the windows
> subdomain as their default domain. Right now, I have any lookups for the
> windows subdomain go to dnsmasq, which forwards then to the AD servers, but
> their default domain is not correct which causes a few problems.
> Also, just wanted to say thanks for a high quality product. We use dnsmasq
> on a 400 client network in a redundant configuration using keepalived and
> some ionotify scripts to keep the leases fiile in sync. Works like a charm
> and way easier to configure than Bind!
> -Jonathan
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

More information about the Dnsmasq-discuss mailing list