Naming in Solaris and OpenSolaris

For browsers to be able to display webpages, the underlying network stack has to resolve web address to IP address. This name resolution is performed by different ways. One of them in by using DNS (Domain Name System).
For example, to open the home page of this site, we request web browser to open the page at www.osfaqs.com. The naming system first resolves www.osfaqs.com to its corresponding IP address using DNS. In a simple way, you can find the IP address for any valid web site using ping. For example, run "ping www.osfaqs.com". Ping program works based on ICMP protocol for which name resolution is required before continuing to send request to www.osfaqs.com. You can see the IP address being displayed by the ping program before sending request to the server hosting www.osfaqs.com.
In Solaris, naming servers can be specified through a configuration file resolv.conf. This file has a standard location /etc/resolv.conf. To add 208.67.222.222 as one of the naming servers, add an entry in /etc/resolv.conf like this
nameserver 208.67.222.222
If you have multiple naming servers, add them in the same way in separate lines.
Solaris also has a file, nsswitch.conf, which controls how a process looks up various databases. Each of these databases comes from a source like hosts, groups, users, etc. This file specifies the order in which the naming system has to look up the sources. For the naming system to be able to resolve domain names to IP addresses, make sure that the line with hosts also has dns; i.e., there should be a line in /etc/nsswitch.conf like this
hosts: files dns
If naming fails even after setting up naming system in /etc/resolv.conf and /etc/nsswitch.conf, look at routing table. Default route may be set to a different route.




