D. J. Bernstein
Internet publication
djbdns

How to run a computer without a cache

Here is how to set up your computer so that it uses another computer to find addresses of Internet hosts. The other computer is set up by your Internet service provider to run an external DNS cache.

With these instructions, every time your computer needs an address, it will contact the other computer. In contrast, with the home computer instructions, your computer will remember addresses for future use, speeding up your Internet access. The only advantage of these instructions is their simplicity.

1. If your computer is running a DHCP client to obtain a dynamically assigned IP address from your ISP, configure the DHCP client to put external DNS cache information into /etc/resolv.conf, and skip to step 5. Most DHCP clients are configured this way by default, so you don't have to do anything.

2. Find out the IP address of your ISP's external DNS cache. Many ISPs call this the ``DNS server address.''

3. Check that your computer can talk to the external DNS cache. For example, if the IP address of the external DNS cache is 10.53.0.1:

     env DNSCACHEIP=10.53.0.1 dnsqr a www.aol.com
Normally dnsqr will instantly print various lines such as ``answer: www.aol.com 3600 CNAME www.gwww.aol.com.'' If dnsqr instead pauses for a minute and prints ``timed out,'' your computer is not properly attached to your ISP's network (or the DNS cache is down). You may have a firewall interfering with your computer's Internet access; if so, tell your firewall to allow UDP and TCP from this computer's ports 1024 through 65535 to the external DNS cache's port 53.

4. As root, put the IP address of the external DNS cache into /etc/resolv.conf on a nameserver line, replacing any previous nameserver lines. For example, if the IP address of the external DNS cache is 10.53.0.1, put

     nameserver 10.53.0.1
into /etc/resolv.conf.

5. Check whether you can look up addresses of some Internet hosts:

     dnsip www.cnn.com
     dnsip www.fsf.org
Then try surfing the web.