An Oracle blog about Middlware

  • July 18, 2014

DNS (Domain Name System) configuration in Solaris 10 & older

Arda Eralp
Principal Consultant

Step 1: Check /etc/resolv.conf file

/etc/resolv.conf file includes the primary and secondary DNS server IP address for Solaris system.

Step 2: Open & Edit /etc/resolv.conf

#vi /etc/resolv.conf

Add the following lines to it:

nameserver      10.xx.xx.223
nameserver 10.xx.xx.224
search domain


Step 3: Enable the name resolving using DNS

#cp /etc/nsswitch.dns /etc/nsswitch.conf

Step 4: Test new name server

#/usr/sfw/sbin/nslookup dns.oracle.com


Server: xx.oracle.com
Address: 10.xx.xx.223
Non-authoritative answer:
Name: dns.oracle.com
Address: 10.xx.xx.224

Join the discussion

Comments ( 2 )
  • guest Friday, July 18, 2014

    Be aware that this procedure won't work for Solaris 11+.

  • guest Tuesday, July 22, 2014

    Your advice is for Solaris 10 or older. Solaris 11 uses properties within SMF, not /etc/resolv.conf and /etc/nsswitch.conf.

    For up-to-date advice, see for example:


    I'd also recommend using the following command to check the configuration:

    getent hosts <hostname> (e.g. getent hosts dns.oracle.com)

    This will test both the DNS client configuration and the name service switch configuration, whereas nslookup will only test the DNS client configuration.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.