Version 1 (modified by icorreas@…, 2 years ago) (diff)

--

  • Title: Dynamic DNS with Zentyal (Community approach)
  • Author(s): Enrique J. Hernández Blasco (ejhernandez@…)
  • Date: 17 Jul 2011
  • Version(s): >= 2.0
  • Zentyal profiles: Infrastructure

Dynamic DNS with Zentyal (Community approach)

DHCP and DNS infrastructure services are quite good for working together. So  Zentyal whose aim is to provide a tightly integrated product had to make it work together.

Its cooperation is based on  DHCP server asking to add the DHCP clients in DNS zones. For instance, your client called foo asks for a IP address lease to connect to your local network. Once the lease is done, the DHCP server ask to  DNS server to add foo client with the given IP address to the configured dynamic DNS zone, for example, example.lan.

Therefore, if you ask for foo.example.lan then the leased IP address is returned, and reverse resolution also returns as expected.

The above explanation was the simplest and easiest to understand by  Zentyal community as  these  posts reminds me. But I thought the right way to do it is to set the hostname by the sysadmin. That is, if your host is a dynamic one and it is not a server, then a dynamic name is set such as dyn-192.168.0.1.example.lan . Furthermore, due to time constraints I was not able to finish a complete dynamic DNS + DHCP feature in the past and reverse resolution was not implemented. That was odd for Zentyal users although it is stated clearly in the  documentation.

So, we decided to fix these things when a slot of time was available, so I was able to finish the proper implementation with this shiny features:

  • Set the hostname based on DHCP client data when the client belongs to a DHCP range
  • Reverse resolution is working for DHCP client names
  • Mix static and dynamic defined DNS zones

The latter feature is a very neat one. This allows you as Zentyal administrator to have a DHCP server assigning names and IP addresses dynamically, as the hosts requests and releases demands to, and you as system administrator are able to manage the zone to add different resource records to that zone, such as, specific host names, alias, name servers or mail exchangers.

In order to do that, I used  nsupdate tool to dynamically set the manual settings in a dynamic zone allowing us not to corrupt the journal file by named daemon and be as kind as possible with bind.

Dynamic and static DNS domains

To sum up, to maximise this new feature you firstly must create a domain in DNS section and then select it in the Dynamic DNS options from DHCP section. Once this is done, save changes. Then, every new client request will update your DNS zones to give direct and reverse resolution for this name – IP address pair.

Dynamic DNS options in DHCP module

This feature is available in 2.X package series of Zentyal server. Namely, ebox-dns 2.0.3 and ebox-dhcp 2.0.4 are the packages with this feature.

Listening to your community requirements usually make your product better! :)

Attachments