Posts Tagged ‘DNS’

OpenSolaris DNS resolving problem when using static IP

November 28, 2009 4 comments

As the title above, this is my first time using OpenSolaris, i’ve a little problem when using this operating system, If you tried to setup a manual IP on your opensolaris box you may find that DNS is not working as you would expect in some cases. nslookup resolves the name to an ip, but pinging doesn’t make it to the box…

Note: in this solution makes sure you have fill the DNS in the GUI mode, System > Administration > Network > DNS

and make sure file /etc/resolv.conf contain the same DNS as you fill in the GUI mode

This is exactly my problems :

Successfully Resolving DNS

hans@dXBase:/etc$ nslookup

Non-authoritative answer:    canonical name =    canonical name =

Pinging IP address successfully

hans@dXBase:/etc$ ping is alive

BUT failed to ping hostname

hans@dXBase:/etc$ ping -l
ping: unknown host

How to fix it….??

Open your terminal and switch to root user, then edit your /etc/nsswitch.conf file and add the word “dns to the hosts and ipnodes lines

This is my nsswitch.conf file snippet:

passwd:     files
group:      files
hosts:      dns
ipnodes:    dns

networks:   files
protocols:  files
rpc:        files

There is default backup of /etc/nsswitch.conf file you can also just copy /etc/nsswitch.dns over it…

hans@dXBase:/# cp /etc/nsswitch.dns /etc/nsswitch.conf

You may also want to check that auto-magic mode has been disabled when setting up your networking manually;

hans@dXBase:/# svcs -a | grep nwam

If it is enabled type;

hans@dXBase:/# svcadm disable svc:/network/physical:nwam

And…. ROLL Drum please…………. 🙂

hans@dXBase:/# ping is alive