Configure Solaris for DNS resolution of hostnames

Contributor Icon Contributed by qmchenry  
Tag Icon Tagged: Solaris system administration  

Solaris provides extensive control over the means of looking up various name services including DNS. If DNS resolution of hostnames has not been setup, the nsswitch.conf file must be configured in addition to resolv.conf.


Once you have configured the DNS client settings in Solaris, you need to alter the /etc/nsswitch.conf file. This name services configuration file controls a variety of lookup types with several services including NIS/NIS+ and LDAP.

To configure your host to perform hostname lookups with DNS, modify the line that starts with hosts: to include the keyword dns. For example, if your /etc/nsswitch.conf file hosts line looks like:

hosts: files

change it to read:

hosts: files dns

The order of keywords on this line indicates the order in which Solaris references the name services. The keyword files represents the /etc/hosts file.

 

6 Comments -


  1. Kaushik said on February 10, 2009

    This one works!

    Thanks!

  2. safi said on April 17, 2009

    worked for me on solaris 10 :) thanks

  3. Khannie said on April 27, 2009

    thanks :)

  4. Brian said on August 5, 2009

    simple resolution in dns with nsswitch.conf

    hosts files dns

  5. Anonymous said on April 21, 2010

    still i amnot able to get internet in my server

  6. Toqui said on July 1, 2010

    Thanks, very clear!

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -