DDNS in BIND9 with custom records

2

1

I have BIND9 and DHCP configured to communicate with each other for providing DDNS in my network but I need to also setup custom records as some machines need to respond to more than one hostname.

So, right now whenever I set a hostname with DHCP it also updates a DNS zone so I could just ping those hosts from any machine in the network. I also need to be able to ping from those machines hosts that are not in DHCP.

How would I do that?

My idea was to create a completely separate zone and push the search to that zone also to clients. That works well but I don't feel it's very elegant.

Bogdan

Posted 2013-09-11T15:49:09.910

Reputation: 277

Answers

0

One way to do it is to set up CNAME records to map the alternate hostnames to the DHCP-created ones. This assumes that, while the IP changes, the hostnames don't. BIND9 syntax for a CNAME is:

secondname.mydomain.com.  IN CNAME  firstname.mydomain.com.

Where "secondname" is the secondary hostname and "firstname" is the one to which DHCP assigns an IP. Note that the domains don't necessarily have to be the same. A CNAME can point to any other hostname.

Above assumes that DHCP/BIND has already created the A record for "firstname.mydomain.com.".

joat

Posted 2013-09-11T15:49:09.910

Reputation: 466