ping hostname failed while ping IP_Address working Options

  • Follow


BismillahirRehmanirRahim

Hi Admins,


i am facing a strange problem in one of our SunFire v215 Servers.


the ping to the hostname of the Server and ping to the hostname of
any
other server in /etc/hosts fail.


but if you ping with IP_Adress it get success. i.e.


hostname=mytest ; IP=10.54.23.1 , hostname2=mydev ; IP2=10.54.23.2


ping mytest
[ failed ]


ping 10.54.23.1
[success]


ping mydev
[ failed ]


ping 10.54.23.2
[ success]


I dont know why its unable to resolve hostname from /etc/hosts.


i didnt find any error in /var/adm/messages


its very urgent, hope to hear soon from you.


Your Junior
Salman

0
Reply hudamuslim (8) 8/2/2007 4:50:43 AM

"Salman" <hudamuslim@gmail.com> wrote in message news:1186030243.968494.199760@57g2000hsv.googlegroups.com...

>
> I dont know why its unable to resolve hostname from /etc/hosts.

What is in /etc/nsswitch.conf ? Try: getent hosts servername

-- 
John.


0
Reply John 8/2/2007 5:01:05 AM


On Aug 2, 12:01 am, "John L" <j...@lammtarra.notthisbit.fslife.co.uk>
wrote:
> "Salman" <hudamus...@gmail.com> wrote in messagenews:1186030243.968494.199760@57g2000hsv.googlegroups.com...
>
> > I dont know why its unable to resolve hostname from /etc/hosts.
>
> What is in /etc/nsswitch.conf ? Try: getent hosts servername
>
> --
> John.

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.

0
Reply tinman 8/3/2007 2:24:10 PM

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.


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

Your Junior Admin
Salman


On Aug 3, 5:24 pm, tinman <adam.richa...@gmail.com> wrote:
> On Aug 2, 12:01 am, "John L" <j...@lammtarra.notthisbit.fslife.co.uk>
> wrote:
>
> > "Salman" <hudamus...@gmail.com> wrote in messagenews:1186030243.968494.199760@57g2000hsv.googlegroups.com...
>
> > > I dont know why its unable to resolve hostname from /etc/hosts.
>
> > What is in /etc/nsswitch.conf ? Try: getent hosts servername
>
> > --
> > John.
>
> 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.


0
Reply salmanfaheem 8/10/2007 4:26:03 AM

3 Replies
692 Views

(page loaded in 1.388 seconds)

Similiar Articles:













7/24/2012 5:18:01 AM


Reply: