in reply to Unexpected results from ping
You can however make Net::Ping use the external ping utility via the Net::Ping::External module if you want to do ICMP echo without running your script as root.
See the documentation of Net::Ping (note that CPAN has a more recent Net::Ping than the one included with perl 5.8.0)
•Update: It's still odd however that it doesn't work at all.. even when a TCP echo service isn't running on a host (these days it almost never is) it should still get a "connection refused" which it would interpret as "the host is alive since it can refuse the connection".
Is it possible there's a firewall in the way that blocks tcp port 7 (echo) ? Try setting the port to 80 by doing:
$p->{port_num} = 80;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Unexpected results from ping
by Rhose (Priest) on Mar 04, 2003 at 14:59 UTC | |
|
Re: Re: Unexpected results from ping
by Rhose (Priest) on Mar 04, 2003 at 15:15 UTC | |
by xmath (Hermit) on Mar 04, 2003 at 15:19 UTC |