Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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
w01b0rji.cube.fred.ch `ping` OK : w01b0rji.cube.fred.ch is alive w01b0rji.cube.fred.ch $p->ping NOK svmoloch.flur.fred.ch `ping` OK : svmoloch.flur.fred.ch is alive svmoloch.flur.fred.ch $p->ping NOK 160.69.125.142 `ping` OK : 160.69.125.142 is alive 160.69.125.142 $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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://240367]
help
Chatterbox?
[marto]: this sounds like a sub section for Sane Dots
[Corion]: marto: You mean "Sane Dots Dramatic Reading of ITIL" ? ;)
[marto]: Sane Dots, chapter 13: ITIL never work :P
[marto]: sorry, bad pun of it'll :P
[Corion]: :-D
[Corion]: I think that ITIL is mostly to prevent people from doing harm to a system that basically runs unattended :)
[Corion]: Maybe you could reduce ITIL to a computer network, a man and a dog. The network runs the computations. The man is there to feed the dog. The dog is there to prevent the man from accessing the computers.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2017-01-24 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (203 votes). Check out past polls.