First page Back Continue Last page Overview Text


In Unix, the most popular sources of IP to name resolution are DNS, NIS and the local /etc/hosts file.

For DNS, nslookup is the most available tool across all Unix platforms. It has an interactive interface and allows you to query a particular DNS server for entries. By default, it uses the DNS entries specified in your /etc/resolv.conf file. Issue the name of a host and it should return the IP associated with that host.

Where multiple resolution sources are present (e.g. /etc/hosts, DNS, NIS), usually the file /etc/nsswitch.conf is used to determine the order of preference.

When using the entries from /etc/resolv.conf, remember that the entries are not searched until a successful resolution is returned. If the first server says it can find no record, then the search ends. The other entries, if present, are used when the prior servers ceased to respond at all.