View Single Post

   
  #8 (permalink)  
Old 01-16-2008, 10:34 AM
salmanfaheem@gmail.com
 
Posts: n/a
Default Re: ping hostname failed while ping IP_Address working

BismillahirRehmanirRahim

Hi All,

Just wanted to update you all about the status of this problem.

Alhumdolillaah, its working fine now.

All i did is to add the /etc/inet/hosts files entries in /etc/inet/
ipnodes.

previously ipnodes file was as below:

------------------------------------------------
[root@prod-01 /]# more /etc/inet/ipnodes
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
------------------------------------------------

I checked the ipnodes of other SunFire Servers they are same as above.
and they are able to ping other hosts mentioned in /etc/hosts using
their hostname.

So Still i am not sure what was the actual problem. The O/s is Solaris
9:

SunOS prod-01 5.9 Generic_118558-28

The /etc/nsswitch.conf file is as follow:

------------------------------------------------------------------------------
# /etc/nsswitch.dns:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
uses
# DNS for hosts lookups, otherwise it does not use any other naming
service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet"
transports.

passwd: files
group: files

# You must also set up the /etc/resolv.conf file for DNS name
# server lookup. See resolv.conf(4).
hosts: files dns
ipnodes: files
-----------------------------------------------------------------------------

The output of getent hosts host_name was okay.

If anyone get some clue regarding this issue then let me know.

Special thanks to Tinman for his post.

Thanks for all who tried to help me out. i really appreciate them.

Your Junior Admin
Salman




On Aug 3, 6:00 pm, tinman <adam.richa...@gmail.com> wrote:
> On Aug 2, 12:29 am, Dave Uhring <daveuhr...@yahoo.com> wrote:
>
>
>
>
>
> > On Wed, 01 Aug 2007 21:55:19 -0700, Salman wrote:
> > > I dont have access to the Server now. but i am sure that the entries in
> > > /etc/nsswitch.conf will be

>
> > > hosts: files dns

>
> > > as default , i didnt change it.

>
> > That is not the default. Copy /etc/nsswitch.dns over /etc/nsswitch.conf
> > to get what you need. Then ensure that your hosts files are populated
> > and correct and that /etc/resolv.conf contains the correct nameserver
> > entry.

>
> > > just wanted to know if anyone face such problem ever ?

>
> > Many times.

>
> > > and how critical it is ?

>
> > Depends on how critically you need to resolve names and addresses.

>
> Also check your /etc/inet/ipnodes file. Usually I just cp /etc/hosts
> to /etc/inet/ipnodes since I am not using ip6. But Sol10 checks
> ipnodes first before hosts. That is stated in the nsswitch.conf file.- Hide quoted text -
>
> - Show quoted text -



Reply With Quote