Running DNS and DHCP together should be easy.
It is in Windows, for instance. One would load the services, preferrably on an AD, and everything works together. DHCP updates DNS. DNS provides what DHCP needs. All nice and neat. One doesn’t even have to tell either service that the other exists. It figures it out.
Not so much on Linux. First off, they are completely separate services. I don’t have a problem with that. The problem comes when trying to get them to work together, where DHCP can update DNS with its lease information. There are keys to be handed over, journaling files to be written, plus SELinux and standard file access issues.
Once it works, it’s just fine. But getting it there can be interesting.
For instance, the named service entry in init.d reverses out a very important SELinux boolean. I set the variable by hand with setseboolean -p named_write_master_zones 1, which allows named to write DNS entries in a master zone. That’s pretty important to be able to do. Then I go to start named and the messages log tells me that the named_write_master_zones was set to 0 by root! Huh? What’s up with that? For some reason, the init.d entry always toggles the value. So I edited the init.d entry so that it always sets it to 1. This could cause other problems down the road if I ever turn this server into the secondary DNS server. I’ll burn that bridge when I come to it.
There goes an hour of my life I’m not getting back.