I've got an ISC DHCP server running (version 4.2.5) which is configured to dynamically update the reverse zone on a DNS service with the hostname it receives via a dhcp DISCOVER package.
It all works fine on zones like 2.1.10.in-addr-arpa
but this zone doesn't see to work:
zone 16-30.32.168.192.in-addr.arpa. {
primary 127.0.0.1;
key rndc-key;
}
The dhcp is configured to hand out addresses in that range:
range 192.168.32.17 192.168.32.30;
and the reverse zone works fine. However, dynamic updates on that zone fail with:
Unable to add reverse map from 17.32.168.192.in-addr.arpa. to debiantest.dhcp.company.com: not found
How do I specify this particular zone? It seems to be a matter of syntax, since it works with other zones, but I can't find the right piece of information in the isc dhcp documentation.
Best Answer
For the sake of documentation, I'll try to answer my own question here: It's not possible. To quote from https://lists.isc.org/mailman/htdig/dhcp-users/2006-August/001422.html :
However, there's a neat solution to the problem. One can configures arbitrary domain names for DDNS updates in the dhcpd configuration:
So the DNS server needs to provide that particular zone. Since it's a bind9 in my case, here's the relevant snippet from /etc/named.conf
And of course, the corresponding zone file:
So now the 32.168.192.dhcp zone is dynamically updated with the information of the dhcp server. But how does that help reverse lookups? After all, a client is going to look for x.32.168.192.in-addr.arpa, right? Well, if we add a CNAME resource record to our 32.168.192.in-addr.arpa zone for every host that could be in the 32.168.192.dhcp zone (which is all the IPs the DHCP server could potentially hand out, a.k.a. the subnet range), we should be golden.
So here's the relevant part of the 32.168.192.in-addr.arpa zone file (in my case /var/named/32.168.192.in-addr.arpa):
Which will result in: