Operating System - HP-UX
1830573 Members
2781 Online
110015 Solutions
New Discussion

odd ping behavior; host IP needs to be in quotes

 
Doug Corey_1
Occasional Advisor

odd ping behavior; host IP needs to be in quotes

I am running HP-UX 11.11 using this 'ping' command:
24576 Nov 14 2000 /usr/sbin/ping

I have several other servers with the exact same configuration (patch level, etc.) that do not have this issue.

I can ping by hostname:
# ping localhost
PING localhost: 64 byte packets
64 bytes from 127.0.0.1: icmp_seq=0. time=0. ms

I cannot ping by ip address. I get 100% packet loss.

BUT I found that if i put the IP address in quotes then I can ping by ip address.

Anyone seen this?

This server is on a DMZ network. But I cannot see what that would have to do with it as I am not trying to route anything anywhere anyway, just ping myself. Also there are other servers on the DMZ whose network functions operate normally.
6 REPLIES 6
John Dvorchak
Honored Contributor

Re: odd ping behavior; host IP needs to be in quotes

Is your /usr/sbin/ping the same type and size as on the other system where it works?
If it has wheels or a skirt, you can't afford it.
Doug Corey_1
Occasional Advisor

Re: odd ping behavior; host IP needs to be in quotes

Yes it is
A. Clay Stephenson
Acclaimed Contributor

Re: odd ping behavior; host IP needs to be in quotes

Possible causes:

A. The ping command you are running is actually a wrapper and thus not the command you expect.

II. Your shell's IFS (Internal Field Separotor) has been 'improved' to include '.'.

echo ${IFS} | od -c
IFS should be space, tab, and LF by default.
If it ain't broke, I can fix that.
Kellogg Unix Team
Trusted Contributor

Re: odd ping behavior; host IP needs to be in quotes

Do you have any alias setup for ping?
what happens if you give full path for ping, viz.
/usr/sbin/ping

work is fun ! (my manager is standing behind me!!)
Doug Corey_1
Occasional Advisor

Re: odd ping behavior; host IP needs to be in quotes

Here is the output from the suggested IFS echo:
# echo ${IFS} | od -c
0000000 \n
0000001

I was doing the ping testing using the full path to the command so there are no aliases. It could be a wraper but then wouldn't that file size be a little bit dirrent?

It just dawned on me that traceroute did the same thing. I needed quotes to do a traceroute too! odd
Richard Steven
Advisor

Re: odd ping behavior; host IP needs to be in quotes

Could you try scripting the ping and running it. This way you can discount any problems with your shell settings eg TERM.

If you don't ask you don't get!