A caching-only name server is a name server not authoritative for any domain except 0.0.127.in-addr.arpa. The only function that a caching-only server performs is to look up data and cache it. The caching-only name server has only one primary entry for the 0.0.127.in-addr.arpa domain (the loopback interface) in the configuration file, and does not have any other entries for primary and secondary.
Every time a caching-only server queries other name servers and receives an answer, it caches the responses. Over a period of time, the cache grows to include answers to almost all the queries requested by resolvers querying the caching-only name server. Because the information is not stored in the local files, the additional overhead of zone transfers is not necessary.
Hosts running Berkeley networking use 127.0.0.1 as the address of the loopback interface. Because the network number 127.0.0 is not assigned to any one site but is used by all hosts running Berkeley networking, each name server must be authoritative for the network 127.0.0.
To create a caching-only server, complete the following steps:
Copy the files /etc/named.data/db.127.0.0 and /etc/named.data/db.cache from the master server to the caching-only server.
When you run the hosts_to_named command to create the master server configuration files, a file conf.cacheonly is created in the working directory of hosts_to_named. Copy this file to the caching-only server, and rename it /etc/named.conf.
If you have created the master server configuration files manually, without runningthe hosts_to_named command, create the configuration file /etc/named.conf for the caching-only server as follows:
// generated by named-bootconf.pl
options {
check-names response fail; //do not change this
check-names slave warn; //running directory for named
directory “/etc/named.data”; //running directory for named
/*
* If there is a firewall between you and nameservers you
* want to talk to, you might need to uncomment the
* query-source directive below. Previous versions of BIND
* always asked questions using port 53, but BIND 8.1 uses
* an unprivileged port by default.
*/
// query-source address * port 53;
};
//
// type domain source file
//
zone “0.0.127.IN.ADDR.ARPA” {
type master;
file “db.127.0.0”;
};
zone “.” {
type hint;
file “db.cache”;
}; |
If you use an /etc/resolv.conf file on your host, configure the default domain name with the search or domain keyword. See “Configuring the Resolver to Query a Remote Name Server”.
If you do not use an /etc/resolv.conf file to configure the default domain name, follow these steps:
Set the default domain name with the hostname command by appending the domain name to the host name. For example, type the following at the HP-UX prompt to set the default host name to indigo.div.inc.com:
/usr/bin/hostname indigo.div.inc.com |
/usr/bin/hostname indigo.div.inc.com |
Set the HOSTNAME variable in the /etc/rc.config.d/netconf file to the same value, as in the following example:
HOSTNAME=indigo.div.inc.com |
Do not put a trailing dot at the end of the domain name.
Your default domain is now set.