A top level domain (TLD) is the last part of a fully qualified domain name (FQDN). For example, the TLD of www.antagonism.org is org. A list of the current top level domains is available here. However a TLD not in this list may be created for use on a local area network.
Tinydns is an authorative server which is part of the larger software package called djbdns. Dnscache is a caching server also part of the same package. Tinydns will serve the TLD, while dnscache will point all queries for the TLD to the tinydns service.
For purposes of this example, example.home is the TLD and ns.example.local is serving the domain. The local network is 192.168.1.0/24 and ns.example.local's IP address is 192.168.1.2. Please replace the example information with your information.
Run the below commands to configure and start the service. Replace the tinydns user and dnslog group with the appropriate user and group on your system.
# tinydns-conf tinydns dnslog /etc/tinydns 127.0.0.1
# ln -s /etc/tinydns /service
Add the domain information with the below commands. The below commands create the domain specified in the example.
# cd /service/tinydns/root
# ./add-ns example.local 127.0.0.1
# ./add-ns 1.168.192.in-addr.arpa 127.0.0.1
# ./add-host ns.example.local 192.168.1.2
# make
Now, tinydns is serving the domain example.local.
Run the below commands to configure and start the service. Replace the dnscache user and dnslog group with the appropriate user and group on your system. For the purposes of this example, 192.168.1.2 is the IP address of the server hosting domain. Replace as appropriate.
# dnscache-conf dnscache dnslog /etc/dnscache 192.168.1.2
# touch /etc/dnscache/root/ip/192.168.1
# ln -s /etc/dnscache /service
The below commands will instruct dnscache to refer any queries for example.local to the tinydns server running at 127.0.0.1.
# echo '127.0.0.1' > /service/dnscache/root/servers/example.local
# echo '127.0.0.1' >
/service/dnscache/root/servers/1.168.192.in-addr.arpa
# svc -t /service/dnscache
2007-01-03 Thanks to John Simpson for noticing the typo "in-addr-arpa" and Bill Olson for notifying me.