[Dnsmasq-discuss] using --dhcp-fqdn without setting domain based on IP
simon at thekelleys.org.uk
Wed Sep 22 16:45:46 BST 2010
Tom Fernandes wrote:
> I have my systems send their hostname and domain-name with the DHCP request.
> Based on that I want to add the machines to the DNS without configuring IPs or
> MAC-adresses though. All the machines are on the same subnets. I have 3
> different domains.
> Is this possible?
No, sorry. This all arises because there's no "slot" in the lease
database to record the domain - only the hostname. When the facility for
multiple domains was retro-fitted, the workaround was to be able to
derive the domain associated with a host from its IP address. That
allows dnsmasq to populate the DNS with fully qualified domain names
given only the information on the leases file.
> The only way I see at the moment is to use the "dhcp-host=" to give a host a
> certain IP-Address and - based on that - have it in a different "domain="
> section. But then I have to maintain additional configuration - which I don't
> see necessary (I may be missing something) and would try to omit.
> Configuring the domains once via "domain=" options is fine of cause. But
> having to enter new settings for each machine (via "dhcp-host=") is what I
> would like to avoid.
The IP ranges associated with domain names don't have to be complete
subnets, so you could do something like this (assuming that your one
subnet is 192.168.0.x)
Thus splitting your subnet into three address ranges. Then associate
domains with each range.
Finally, set the correct tag based on the domain
supplied by the machine,
I've not tried this, and there could be complications which stop it
working, but it's worth a go.
More information about the Dnsmasq-discuss