Home > Solaris/OpenSolaris > OpenSolaris DNS resolving problem when using static IP

OpenSolaris DNS resolving problem when using static IP

November 28, 2009 Leave a comment Go to 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 http://www.yahoo.com

Non-authoritative answer:
http://www.yahoo.com    canonical name = http://www.wa1.b.yahoo.com.
http://www.wa1.b.yahoo.com    canonical name = www-real.wa1.b.yahoo.com.
Name:    www-real.wa1.b.yahoo.com

Pinging IP address successfully

hans@dXBase:/etc$ ping is alive

BUT failed to ping hostname

hans@dXBase:/etc$ ping -l http://www.yahoo.com
ping: unknown host http://www.yahoo.com

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 http://www.yahoo.com
http://www.yahoo.com is alive

  1. lidra
    January 21, 2010 at 12:22 pm

    Thank you for taking the time and writing this document. It saved me time doing more digging around.



  2. BackUpAndRunning
    May 22, 2010 at 2:36 pm

    Thanks …I’m back up and running after only 5 minutes down after a power failure.

  3. sanji
    June 11, 2012 at 7:13 pm

    Thanks. I had to copy the nsswitch.dns in order to work properly. just adding “dns” instead of “files” didn’t do it for my network. mdns was needed for my installation of openinidiana 151a.

  4. sanji
    June 11, 2012 at 7:15 pm

    also static network configuration was a pain in the a** with this system. but i am glad it works now. 🙂

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: