Solaris – Name Resolution Doesn’t Work but nslookup Does

dnssolaris

I am having a very strange problem with my installation of Solaris 11. DNS resolution just won't work, but strangely enough, nslookup does and connectivity is fine:

root@solarisxyz:~# ping stackexchange.com
ping: unknown host stackexchange.com
root@solarisxyz:~# nslookup stackexchange.com
Server:         10.x.x.x (DNS)
Address:        10.x.x.x#y

Non-authoritative answer:
Name:   stackexchange.com
Address: 64.34.119.12

root@solarisxyz:~# ping 64.34.119.12
64.34.119.12 is alive

Relevant sections of files:

  • /etc/resolv.conf: (this is the same thing our Linux boxes have)

    domain us.oracle.com
    nameserver 10.x.x.x
    nameserver 10.x.x.x  
    
  • /etc/hosts:

    # ::1 solarisxyz localhost (commented out)
    127.0.0.1 localhost loghost solarisxyz
    
  • /etc/nsswitch.conf:

    hosts:    files dns
    # pretty much everything else set to files
    

Best Answer

Network configuration has radically changed starting with Solaris 11. nsswitch.conf is only informative now. Assuming you are not in automatic mode, in which case DNS would have been correctly configured, here is the new procedure:

http://docs.oracle.com/cd/E23824_01/html/E24456/gliyc.html#OSTELgllcu

Related Question