Help answer threads with 0 replies.
Go Back > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.


  Search this Thread
Old 03-06-2007, 02:49 PM   #1
Registered: Mar 2004
Location: Norway
Distribution: Freebsd, Fedora, Redhat, Solaris 10
Posts: 169

Rep: Reputation: 30
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 ?

Old 03-06-2007, 03:09 PM   #2
Dox Systems - Brian
Registered: Nov 2006
Posts: 344

Rep: Reputation: 31
In nsswitch.conf:

hosts: files dns
ipnodes: files dns
Old 03-06-2007, 03:14 PM   #3
Registered: Mar 2004
Location: Norway
Distribution: Freebsd, Fedora, Redhat, Solaris 10
Posts: 169

Original Poster
Rep: Reputation: 30 offcourse

Old 03-07-2007, 03:55 AM   #4
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Another way to resolve the problem is
#cp /etc/nsswitch.dns /etc/nsswitch.conf
Old 03-13-2007, 10:11 PM   #5
LQ Newbie
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
Thanks, I'm have this problem a long time.
Old 03-20-2007, 12:27 AM   #6
LQ Newbie
Registered: Mar 2007
Posts: 3

Rep: Reputation: 0
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
A script to thoroughly resolve a hostname into IP addresses ahz10 Programming 1 08-23-2006 04:40 PM
DNS bind cant resolve IP and hostname dwarf007 Linux - Software 1 01-14-2006 08:42 AM
Unable to resolve hostname adirock2 Linux - Networking 14 07-06-2005 02:08 AM
windows does not resolve linux hostname abrb220 Linux - Networking 6 05-18-2004 04:11 AM
Cannot resolve hostname problem for IglooFTP smc_one Linux - Networking 0 08-18-2003 10:33 AM > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 03:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration