LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (http://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   resolve hostname (http://www.linuxquestions.org/questions/solaris-opensolaris-20/resolve-hostname-535156/)

linuxtesting2 03-06-2007 02:49 PM

resolve hostname
 
Solaris 10

I can ping the outside ipaddresses but not the hostnames, guess there are some resolve problems. I have the following setup


/etc/resolv.conf

nameserver xx.xx.xx.xx
nameserver xx.xx.xx.xx

/etc/nsswitch.conf

passwd: files
group: files
hosts: files
ipnodes: files
networks: files
....

local ip is 10.0.0.100, and my gw is 10.0.0.1.

-bash-3.00# netstat -rn

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
10.0.0.0 10.0.0.100 U 1 2 bge0
10.0.0.0 10.0.0.1 UG 1 0
224.0.0.0 10.0.0.100 U 1 0 bge0
default 10.0.0.1 UG 1 3
127.0.0.1 127.0.0.1 UH 4 102 lo0


-bash-3.00# nslookup www.google.com
Server: 217.13.7.140
Address: 217.13.7.140#53

Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 66.249.93.99
Name: www.l.google.com
Address: 66.249.93.104
Name: www.l.google.com
Address: 66.249.93.147

-bash-3.00# ping www.google.com
ping: unknown host www.google.com



what am i missing ?

Ole

Dox Systems - Brian 03-06-2007 03:09 PM

In nsswitch.conf:

hosts: files dns
ipnodes: files dns

linuxtesting2 03-06-2007 03:14 PM

ahhh.....my offcourse :)


Danke

reddazz 03-07-2007 03:55 AM

Another way to resolve the problem is
Code:

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

oil 03-13-2007 10:11 PM

Thanks, I'm have this problem a long time.

antares727 03-20-2007 12:27 AM

Resolving Hostname ---
 
There are a couple of additional lines you should add to your resolov.conf file.

It is important to add the the "domain" name and the "domain" search if you know them: for example:

domain hsd1.ks.comcast.net <additional domain name>
search hsd1.ks.comcast.net <additional domain search if needed>
nameserver 68.87.72.130
nameserver 68.87.77.130

The nameserver is usually the DNS server for the domain or a secondary server, therefore the the domain is not alway necessary unless you are in a multiple domain network.

The search line tends to be more important as the networks become more complicated. I use a small router setting between my cable modem and my other computers. This means I nave a home domain and then the cable domain -- the router takes care of the transactions but I still need the search statement so my computers know to search the cable domain in addition to the home network...

Just keeps things cleaner ---

There are two other files you need to look at to keep persistence during a reboot --- this is the "/etc/defaultrouter" and the /etc/netmasks" file.
Solaris 10 also uses the /etc/hosts and a file called "/etc/hostname.<interface>

These files are set up during install or a reconfigure, but one should double check them if you are having network issues. The Solaris 10 x86 and/or x64 OS is real picky when it comes to the network configuration... Please make sure your network is active and hooked up when you install. I have had installs fail because the network was not hooked up... (The Solaris 10 SPARC OS is less sensitive)

If you are still having issues feel free to contact me directly < antares727@comcast.net >

Thanks -- Dale


All times are GMT -5. The time now is 09:05 AM.