-   Solaris / OpenSolaris (
-   -   resolve hostname (

linuxtesting2 03-06-2007 03: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


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


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

local ip is, and my gw is

-bash-3.00# netstat -rn

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

-bash-3.00# nslookup

Non-authoritative answer: canonical name =

-bash-3.00# ping
ping: unknown host

what am i missing ?


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

In nsswitch.conf:

hosts: files dns
ipnodes: files dns

linuxtesting2 03-06-2007 04:14 PM offcourse :)


reddazz 03-07-2007 04:55 AM

Another way to resolve the problem is

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

oil 03-13-2007 11:11 PM

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

antares727 03-20-2007 01: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 <additional domain name>
search <additional domain search if needed>

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 < >

Thanks -- Dale

All times are GMT -5. The time now is 10:42 PM.