> I was reading the network administrator's guide (by Olaf Kirch) and
>was going through the PPP section when I found a tip on setting up a
>cache-only named. I can see how this would help reduce bandwidth
>consumption by caching lookups, so I went ahead and tried setting it up.
>I got my root servers, and set up my named.conf file, and everything
>worked great. What I ended up with, was a full-blown nameserver (I
>think). Other sites were able to resolv hostnames with: nslookup foo.bar
>bryan.seanet.com (my address). And my cache only appeared to work when
>nslookup was performed on MY machine.
> I run my box via PPP to my ISP, with a static address. My ISP
>provides me with a very fast nameserver. I am wondering if someone can
>help me set up my named so that I still use my ISP for lookups, but once
>the hostname is resolved, MY machine will keep a cache. And I'd rather
>not provide name service for other machines, as well. Does anyone out
>there know how to help?
It is not hard to set up a 'cache only' nameserver. The steps are basically:
1. In the /etc/resolv.conf file, put the IP address of your local nameserver
as the 'nameserver' entry. This may be 127.1, provided that you don't
use more than just the one local cache only nameserver entry. This
is a bug in the BIND 4.8.3 code which would cause problems if you do.
2. Create a /etc/named.boot file with the following contents:
primary 0.0.127.in-addr.arpa /etc/named.local.rev
cache . /etc/named.cache
3. Make CERTAIN that you have a CURRENT cache in the file /etc/named.cache
file. This is important. This file can not be empty or you will not
get any translations properly.
The current files are on the ftp site rs.internic.net.
4. Have the reverse primary for the 127.* IP domain file,
/etc/named.local.rev, contain something similar to the following:
1 ; Serial number
10800 ; Refresh
3600 ; Retry
604800 ; Expire
86400 ); Minimum TTL
IN NS my.machine.
1 IN PTR localhost.
(Don't forget the trailing periods on the names!)
The 'my.machine' is simply the name associated with your IP
address. It really is not important for this domain since it is used
only to do the reverse translation of 127.0.0.1 to a name -- localhost.
The 'forwarders' line in the named.boot file lists the IP addresses of
your provider's nameservers. It is what you would normally list as the
'nameserver' entries in the resolv.conf file. Multiple IP addresses
are permitted on the line if they are separated by spaces.