Inom
Hitta mer dokumentation
Supportresurser som ingår
| Ladda ner denna bok i PDF
Setting Up DNS Clients
11
- Setting up DNS on a client involves two tasks, which are described in this chapter.
-
- If you are setting up DNS on a name server, you need to complete these tasks in addition to setting up boot and data files. The server tasks are described in Chapter 12, "Setting Up DNS Servers."
Creating the resolv.conf File
- DNS clients use the library routines collectively called the resolver to locate a remote host. The resolver queries the DNS database on a name server, which eventually returns the host name or IP address of the machine requested by the resolver. Because DNS name servers are clients of servers outside their local domains, they must also run the resolver.
- The DNS name server uses several files to load its database. At the resolver level, it needs the file /etc/resolv.conf listing the addresses of the servers where it can obtain the information needed. The resolver reads the resolv.conf file to find the name of the local domain and the location of name servers. It sets the local domain name and instructs the resolver routines to query the listed name servers for information. Every DNS client system on your network must have a resolv.conf file in its /etc directory.
- Whenever the resolver has to find the IP address of a host (or the host name corresponding to an address), the resolver builds a query package and sends it to the name servers listed in /etc/resolv.conf. The servers either answer the query locally or contact other servers known to them, ultimately returning the answer to the resolver.
Format of /etc/resolv.conf
- The first line of the /etc/resolv.conf file lists the domain name in the form:
-
- where domainname is the name registered with the Internet governing bodies (as of this writing, the InterNIC). Succeeding lines list the IP addresses that the resolver should consult to resolve queries. IP address entries have the form:
-
-
Code Example 11-1 shows a sample resolv.conf file:
-
Code Example 11-1 Sample resolv.conf File
-
; Sample resolv.conf file
domain University.Edu.
; try local name server
nameserver 127.0.0.1
; if local name server down, try these servers
nameserver 128.32.0.4
nameserver 128.32.0.10
|
|
|