Djbdns
From SixXS Wiki
djbdns is a collection of small DNS servers that resolve host names to IP addresses. The tinydns component is second to BIND in the number of domain names it serves[1].
The djbdns tools support arbitrary record types, so although they were not programmed with IPv6 in mind they handle IPv6 name resolution without patching or upgrading. They do require a patch[2] to their ucspi-tcp component to bind to and serve requests on an IPv6 interface, however in a dual stack environment it is not necessary to have a DNS server bound to an IPv6 interface.
djbdns components are intended to be installed and run using the programmer's daemontools set of tools for managing services. The difference in daemontools between other service managers and init scripts, between djbdns tools and BIND or other monolithic DNS servers and between the programmer's proposed filesystem structure and standard unix filesystems attracts much criticism and praise. Those discussions are out of the scope of this article.
Contents |
dnscache
dnscache is the server for recursive requests used by clients such as your web browser to resolve host names. It can query root and authoritative servers directly, query one or more parent caches or do both. It will cache results locally for faster repeat lookups.
dnscache requires no modification to resolve and cache IPv6 addresses.
tinydns
tinydns is the server that only answers for iterative requests which for which are in its database; it is the server that a dnscache or other client will find to resolve an address for the tinydns server's zone. It does not forward requests to other servers.
It can accept arbitrary record types without patching, so an unknown type--such as an IPv6 AAAA record--may be entered using a generic record format[3]:
:fqdn:n:rdata:ttl:timestamp:lo
Generic record for fqdn. tinydns-data creates a record of type n for fqdn showing rdata. n must be an integer between 1 and 65535; it must not be 2 (NS), 5 (CNAME), 6 (SOA), 12 (PTR), 15 (MX), or 252 (AXFR). The proper format of rdata depends on n. You may use octal \nnn codes to include arbitrary bytes inside rdata.
So for an unpatched tinydns an AAAA record (record type 28) for ipv6-host.example.com at 2001:db8::1 expiring after 86,400 seconds (and not specifying a timestamp or location) would look like this: :ipv6-host.example.com:28:\040\001\015\270\000\000\000\000\000\000\000\000\000\000\000\001:86400
There are helper programs which can create standard data lines that don't include IPv6 unless you apply a patch[4], but the patch just adds helper scripts and IPv6 record definitions to avoid having to use the generic record format.
Other Components
The other components are generally special variants of tinydns or programs to transfer zone data via AXFR. The tinydns variants may use the same generic record format for IPv6 addressing. The AXFR component communicates with other DNS servers which may or may not support IPv6 or arbitrary record types.
Summary
djbdns tools do not need patching to resolve IPv6 addresses, but they will need patching to bind to and serve those requests on an IPv6-only interface. A patch is also available to make record management simpler and analogous to its IPv4 management as opposed to using generic record formats with octal-formatted IPv6 addressing.
An existing IPv4 infrastructure running djbdns may deploy IPv6 without having to patch the DNS system. If AXFR transfer is used to tranfer IPv6 addressing to other name servers then the target server must support AAAA records or arbitrary record types. (BIND notably does not support arbitrary record types, so a BIND version supporting IPv6 would be required as an AXFR target.)
