10.5 DNS connectivity

Just because you can “dial out” using IP addresses directly doesn’t mean you can domain names. In order to use domain names, a host must be properly configured to communicate with one or more DNS (domain name service) servers.

You can test the ability to resolve domain names using the program dig. Execute the command dig yahoo.com, and you will find out how it is resolved. Particularly, the third last line should write SERVER: xxx.xxx.xxx.xxx#xx. This shows you which DNS server was used to query the domain name.

What if dig cannot resolve a domain name? This is most likely because the file /etc/resolv.conf is not properly set up. You can learn more about this file by reading its manual page. The same applies to the command dig.

Note that you probably need to consult the network administrator to know which DNS servers to use, unless the host uses DHCP to get its configurations.