To be able to resolve Internet hostnames on a Linux machine, you have to add the DNS servers that are authoritative for that particular domain in the config files of the server. There are two ways in which you can bind IPs to hostnames on a CentOS machine:
To map a server to an IP add an extra line containing the IP address, a space and the hostname for that particular server. This file will be checked when a naming resolution request is needed by the server.
All DNS servers must be specified in this file. To add a new server simply type nameserver ip_address on a new line:
The search ppscu.com statement is used to inform the machine to look for hostnames under this domain when trying to resolve hostnames. There is a comment section that specifies that the file was generated by /sbin/dhclient-script. This tells us that my machine is using a DHCP server to obtain network configuration (IP, subnet mask, default gateway and DNS servers). Type dhclient interface_name:
Dhclient uses /var/run/dhclient.pid to store its process ID and /var/lib/dhclient/dhclient.leases to store DHCP lease information:
The /etc/nsswitch.conf is used to specify the search order when looking for hostnames.
hosts: files dns specifies that the machine should look in the /etc/hosts file first before sending requests to the DNS servers: