17.9. Managing Hosts
/etc/hostsfile. This file contains IP addresses and their corresponding hostnames.
/etc/hostsfile before using the name servers (if you are using the default Red Hat Enterprise Linux configuration). If the IP address is listed in the
/etc/hostsfile, the name servers are not used. If your network contains computers whose IP addresses are not listed in DNS, it is recommended that you add them to the
/etc/hostsfile, go to the Hosts tab, click the button on the toolbar, provide the requested information, and click OK. Select > or press Ctrl+S to save the changes to the
/etc/hostsfile. The network or network services do not need to be restarted since the current version of the file is referred to each time an address is resolved.
localhostentry. Even if the system does not have a network connection or have a network connection running constantly, some programs need to connect to the system via the localhost loopback interface.
Figure 17.19. Hosts Configuration
/etc/host.conffile. The line
order hosts, bindspecifies that
/etc/hoststakes precedence over the name servers. Changing the line to
order bind, hostsconfigures the system to resolve hostnames and IP addresses using the name servers first. If the IP address cannot be resolved through the name servers, the system then looks for the IP address in the