11.3. External DNS Servers

11.3. External DNS Servers

If the necessary mapping information is not found in the local /etc/ hosts file, it has to be requested from the DNS server. This requires the IP address of the DNS server to be known. The information about this address is contained in the /etc/resolv.conf file. The contents of the file look similar to the following:

 search FlenovM domain domain.name nameserver 10.1.1.1 nameserver 10.1.1.2 

The search parameter in the first entry specifies the host name search server. The file on your system most likely also contains this entry, with the name of your computer specified as the server. This parameter can contain a space- or tab-delimited list of several servers. For example:

 search FlenovM MyServer 

The local server is searched quickly enough, but searching remote servers may take a while.

In the second file, the domain parameter is specified. Users sometimes like to specify computer names without giving the top-level domain name; for example, "redhat" instead of "redhat.com." In the domain parameter, the top-level domain name is specified to be used in such cases. Most often, a specific top-level domain name for local networks is specified in this parameter.

The rest of the entries specify the nameserver parameter. This is an external DNS server, to which the requests are directed. There can be several such entries; most current distributions have no more than three entries. The nameserver entries are queried in the order they are listed in the file until the necessary address has been resolved.

In most cases, a single server is enough, because all of them operate recursively. For example, when a computer requests to resolve the redhat.com address, the request is directed to the first DNS server on the list. If this server does not find the necessary address, it forwards the request to another DNS server that is has on its own nameserver list.

I, however, recommend specifying two DNS servers. Sometimes, when the first DNS server fails, the second one saves the situation.



Hacker Linux Uncovered
Hacker Linux Uncovered
ISBN: 1931769508
EAN: 2147483647
Year: 2004
Pages: 141

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net