Djbdns

From SixXS Wiki
Jump to: navigation, search

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 they will answer AAAA queries, but they do not transport over IPv6.

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.

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.

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[2]:

 :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 e.g. [3] which can create standard data lines that don't include IPv6 unless you apply a patch[4] which adds helper scripts and IPv6 record definitions to the data format.

Other Components

The other components are generally special variants of tinydns or programs to transfer zone data via AXFR.

See Also

External Links