Tuesday, March 26, 2013

OpenSolaris issue DNS not working solved

I manually configured Open Solaris(2009 edition),however the DNS is not working,here how it worked out for me

Nslookup resolves the name to an ip, but pinging doesn’t make it to the box…

Static IP address

Assigning a static IP address on OpenSolaris is accomplished by editing the hostname files in the directory /etc. For example, assign a static IP address to interface bge0 by editing /etc/hostname.bge0:

Set the netmask by editing the file /etc/inet/netmasks:

Set the default gateway by editing the file /etc/defaultrouter:

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

 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

 ping is alive

BUT failed to ping hostname

 ping -l http://www.yahoo.com
ping: unknown host http://www.yahoo.com

So the fix is

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…

 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;

svcs -a | grep nwam

If it is enabled type;

svcadm disable svc:/network/physical:nwam

And you are done!!!


source: http://www.jansipke.nl/network-configuration-on-opensolaris/

No comments:

Post a Comment