Operating System - Linux
1828225 Members
2486 Online
109975 Solutions
New Discussion

Urgent : The result Of Ping command

 
John CLARK_5
Frequent Advisor

Urgent : The result Of Ping command

Hi,

I have a problem : when i try to ping my Linux redhat Server,the ping is not regular.
It returns alterantively : timeout....in a line and request in the other line....
I check the cable and the switch,all is correct.
Do you have any idea about this : i had think about the auto-negotiate parameter, but it doesn't
resolve the problem.

Please,help me.

The result of ping command is important,because users are connected to a database and this irregular
result of ping can done problems.

Ps : I have Linux Redhat 3 AS
Regards.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Urgent : The result Of Ping command

PING_WAIT=30
CLUSTER2_IPADDR=ip_to_ping


/bin/ping -c 1 -w $PING_WAIT $CLUSTER2_IPADDR > /dev/null
rc=$?
if [ $rc -ne 0 ]
then
echo "ping test failed...."
(( NET_FAIL_COUNT = NET_FAIL_COUNT + 1 ))
fi


What the code does is try and send 1 ping out and wait 30 seconds in this example for an answer. if the test fails put logic in that takes appropriate action.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stuart Browne
Honored Contributor

Re: Urgent : The result Of Ping command

Which network driver are you using? (lsmod)

Also, do you know if you have any limiters in the firewall?

You've said you've 'checked' the cable. What did you do, just re-seat it? Try completely replacing the cable (I assume it's just a patch lead between server/switch). Also try a different port in the switch.
One long-haired git at your service...
Paul Cross_1
Respected Contributor

Re: Urgent : The result Of Ping command

Can you paste the output of your ping? If I am understanding you correctly, you are getting one returned ICMP request and one failed? Correct me if I'm wrong.

If this is the case you could have routing problems, or even DNS problems (a dns name pointing at 2 IP numbers can cause this).

-paul.