README revision be7d3e641c1f426185cc65950c8b587a3365f038
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy VetayasesDLZ (Dynamically Loadable Zones) is an extention to BIND 9 that
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesallows zone data to be retrieved directly from an external database.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy VetayasesThere is no required format or schema. DLZ drivers exist for several
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesdifferent database backends including PostgreSQL, MySQL, and LDAP and
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasescan be written for any other.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy VetayasesHistorically, DLZ drivers had to be statically linked with the named
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesbinary and were turned on via a configure option at compile time (for
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesexample, "configure --with-dlz-ldap"). Currently, the drivers provided
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesin the BIND 9 tarball in contrib/dlz/drivers are still linked this way.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy VetayasesHowever, as of BIND 9.8, it is also possible to link some DLZ modules
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesdynamically at runtime, via the DLZ "dlopen" driver, which acts as a
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesgeneric wrapper around a shared object that implements the DLZ API. The
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases"dlopen" driver is linked into named by default, so configure options are
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesno longer necessary unless using older DLZ drivers.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy VetayasesWhen the DLZ module provides data to named, it does so in text format.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy VetayasesThe response is converted to DNS wire format by named. This conversion,
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesand the lack of any internal caching, places significant limits on the
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinekquery performance of DLZ modules. Consequently, DLZ is not recommended
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesfor use on high-volume servers. However, it can be used in a hidden
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesmaster configuration, with slaves retrieving zone updates via AXFR.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases(Note, however, that DLZ has no built-in support for DNS notify; slaves
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesare not automatically informed of changes to the zones in the database.)
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy VetayasesCONFIGURING DLZ:
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy VetayasesA DLZ database is configured with a "dlz" statement in named.conf.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases dlz example {
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases database "dlopen driver.so <args>";
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy VetayasesThis specifies a DLZ module to search when answering queries; the module
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesis implemented in "driver.so" and is loaded at runtime by the dlopen DLZ
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesdriver. Multiple "dlz" statements can be specified; when answering a
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesquery, all DLZ modules with the "search" option set to "yes" will be
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayaseschecked for an answer, and the best available answer will be returned
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinekto the client.
database "dlopen driver.so <args>";
dlz_example.c, which demonstrates the features of the DLZ API. It sets up
a single zone, whose name is configured in named.conf. The zone can answer
an SOA, NS, and a single A record at the apex. If configured in named.conf
to use the name "example.nil", then, the zone will look like this:
example.nil. 1800 IN A 10.53.0.1
some other fashion, e.g., by providing different address records for
(e.g., to check prerequisites), and your DLZ might need to know whether
The dlz_example.c code has sample code to show how to get the 'versionp'
for implementing a DLZ driver is in ../modules/dlz_minimal.h. Copy this
contrib/dlz/modules/dlz_minimal.h and is currently 3. 'flags' is