![]() | ![]() |
makes movie.edu her workstation's local domain name and searches pixar.com for names not found in movie.edu.search movie.edu pixar.com
The new workstation is on the 192.249.249/24 network, so the closest name servers are wormhole.movie.edu (192.249.249.1) and terminator.movie.edu (192.249.249.3). As a rule, you should configure hosts to use the closest name server available first. (The closest possible name server is a name server on the local host; the next closest is a name server on the same subnet or network.) In this case, both name servers are equally close, but we know that wormhole.movie.edu is bigger (it's a faster host, with more capacity). So the first nameserver directive in resolv.conf should be:
Since this particular professor is known to get awfully vocal when she has problems with her computer, we'll also add terminator.movie.edu (192.249.249.3) as a backup name server. That way, if wormhole.movie.edu is down for any reason, the professor's workstation can still get name service (assuming terminator.movie.edu and the rest of the network are up).nameserver 192.249.249.1
The resolv.conf file ends up looking like this:
search movie.edu pixar.com nameserver 192.249.249.1 nameserver 192.249.249.3
The simplest resolver configuration for this case is no configuration at all: don't create a resolv.conf file, and let the resolver default to using the local name server. The hostname should be set to the full domain name of the host so that the resolver can determine the local domain name.
If we decide we need a backup name server -- a prudent decision -- we can use resolv.conf. Whether or not we configure a backup name server depends largely on the reliability of the local name server. A good implementation of the BIND name server will keep running for longer than some operating systems, so there may be no need for a backup. If the local name server has a history of problems, though -- say it hangs occasionally and stops responding to queries -- it'd be a good idea to add a backup name server.
domain movie.edu nameserver 0.0.0.0 nameserver 192.249.249.3 nameserver 192.249.249.1 options timeout:2