Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Re: Unexpected results from ping

by Rhose (Priest)
on Mar 04, 2003 at 14:59 UTC ( #240367=note: print w/replies, xml ) Need Help??

in reply to Re: Unexpected results from ping
in thread Unexpected results from ping

Yes, that is correct. The ping utility uses ICMP echo request/ICMP echo reply while, by default, Net::Ping tries to establish a TCP session with the echo port of the target host. Try making this change to your program:
$p = Net::Ping->new('icmp');
Update `ping` OK : is alive $p->ping NOK `ping` OK : is alive $p->ping NOK `ping` OK : is alive $p->ping NOK
Just to clarify, what you are seeing here is most likely the result of the specified hosts allowing ICMP echo requests, but not having a service listening to the echo port.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://240367]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2018-06-23 12:42 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (125 votes). Check out past polls.