[Dnsmasq-discuss] Adding wildcard entries for DHCP lease host names

Christian Weiske cweiske at cweiske.de
Tue Jan 26 09:13:38 GMT 2016


Hello,


To make it easy to share links to locally-installed web projects on 
developer machines (accessible via "projectname.devmachine"), I want
to have dnsmasq automatically create wildcard entries for the host names 
of DHCP leases.

For example, when a dev machine requests an IP via DHCP and sends its 
preferred hostname "foo" in the request, dnsmasq should respond to DNS 
requests to "projectname.foo" with the IP of the foo machine.

We're using dhcpd as DHCP server, and through the "--dhcp-leasefile" 
option, dnsmasq already automatically creates DNS entries for the machines.

I then configured dhcpd to run a script whenever a lease is handed out 
or removed. The script generates a dnsmasq configuration file which 
contains the wildcard configuration.[1]

After this is done, I have to restart dnsmasq to make it pick up the new 
the configuration file.

This is where the problem lies: Restarting dnsmasq takes a second or so, 
and in the result DNS resolving for clients takes ~5-6 seconds in the 
worst case.

I already read that simply reloading all configuration files while 
dnsmasq is running is not possible[2] (as of 2004).

Now my questions:

1. Has this changed in the meantime? Can I make dnsmasq reload the
    configuration without restarting?

2. Is there a different approach I could use to achieve my goal of
    wildcard DNS entries for DHCP'd machines?


[1] http://cweiske.de/tagebuch/dns-wildcard-dhcp.htm
[2] 
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2004q4/000002.html

-- 
Regards,
Christian Weiske



More information about the Dnsmasq-discuss mailing list