Cover V04, I03
Article
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Listing 1
Listing 2
Listing 3
Sidebar 1
Sidebar 2

may95.tar


Sidebar: Configuring BIND

For thorough coverage of BIND, see the book DNS and BIND, by Paul Albitz and Cricket Liu, published by O'Reilly and Associates.

The problem we encounter with a dial-up Internet link is that our provider has all the nameserver information we need, but it is only available to us during the active link. If the link is down, we can still query our own nameserver, but it times out after about 30 seconds. To solve this we have defined two configurations for the nameserver. We use one while connected to the Internet, and the other while we're working locally. This configuration is stored in the named.boot file.

The two configurations are very similar, and differ only in the last line. The Internet version is shown below (the IP addresses have been changed to protect the innocent).

;
;       boot file for nameserver
;
; type  domain  source file or host
;

directory       /etc/inet
;
cache           .                       named.cache
primary         reseau.nl               named.reseau
primary         123.45.198.in-addr.arpa named.rev
primary         0.0.127.in-addr.arpa    named.local

forwarders      198.45.234.5            ; sun4nl

All local addresses are resolved by our own nameserver. If a remote host must be resolved, the query is forwarded to sun4nl. Our nameserver waits until it has received an answer or times out.

This works well while the connection is in effect, but when the link is down, we don't want to wait that long. We fix this by adding the following line to the named.boot file.

slave

This turns the nameserver into a slave, which serves all queries from its cache. Because the slave's cache is empty, all remote host queries time out very quickly.