Red Hat Linux 7.2: The Official Red Hat Linux Customization Guide | ||
---|---|---|
Prev | Chapter 6. Network Configuration | Next |
The DNS tab allows you to configure the system's hostname, domain, name servers, and search domain. Name servers are used to look up other hosts on the network. Note, the name servers section does not configure the system to be a name server.
The Hosts tab allows you to add, edit, or remove hosts from the /etc/hosts file. This file contains IP addresses and the hostnames to which the IP addresses should be resolved.
When your system tries to resolve a hostname to an IP address or determine the hostname for an IP address, it refers to the /etc/hosts file before using the name servers (if you are using the default Red Hat Linux configuration). If the IP address is listed in the /etc/hosts file, the name servers are not used.
To add an entry to the /etc/hosts file, click Add in the Hosts tab, provide the requested information, and click OK. Click Apply to write the entry to the file.
Tip | |
---|---|
To change lookup order, edit the /etc/host.conf file. The line order hosts, bind specifies that the /etc/hosts takes precedence over the name servers. Changing the line to order bind, hosts configures your system to resolve hostnames and IP addresses using the name servers first. If the IP address can not be resolved through the name servers, your system looks for the IP address in the /etc/hosts file. |