This script is a bit more elaborate as it will perform the probes in parallel, so it doesn't take much time
You'd have to check if the ping on your system supports these options or use something equivalent, so that the ping stops after a number of seconds:
My man ping:
-c count
Stop after sending count ECHO_REQUEST packets. With deadline option, ping waits for count
ECHO_REPLY packets, until the timeout expires.
-w deadline
Specify a timeout, in seconds, before ping exits regardless of how many packets have been
sent or received. In this case ping does not stop after count packet are sent, it waits
either for deadline expire or until count probes are answered or for some error notification
from network.
Last edited by Scrutinizer; 10-22-2009 at 11:01 PM..
hey guys,
In my program i am giving an initial ip & end ip.
i just want to check every ip in that range is pingable or not
echo "Enter the initial ip:"
read inip
echo "Enter the end ip:"
read endip
for (( i=0; i<=$endip; i++ ))
do
if ping -c 4 $inip
then
echo "pingable"
else
echo... (5 Replies)
Hello again gentlemen.
I would like to make a shell script to 'optimize' a plain text full of IPs.
Let's suppose to have this text file:
1.192.63.253-1.192.63.253
1.0.234.46/32
1.1.128.0/17
1.116.0.0/14
1.177.1.157-1.177.1.157
1.23.22.19
1.192.61.0-1.192.61.99
8.6.6.6
I want to... (2 Replies)
Hello gentlemen.
I would like to create a shell script (no perl or python please) to generate a list with those rules.
Let's suppose I've this text file:
a@A:soss(z)1.1.1.1
Opt!o:2.1.9.55
Azxk<ji>rC211.111.9.0-251.11.34.9
d=211.9.1.3
O.Oox 2.1.2.4-51.9.1.33... (6 Replies)
Given a range of IPs similar to this:
"212.63.183.19","212.63.183.19","3560945427","3560945427","CN","China"
"217.7.143.0","217.7.143.0","3641151232","3641151232","CN","China"
"218.0.0.0","218.31.255.255","3657433088","3659530239","CN","China"... (13 Replies)
Hi friends,
i have a file contains IP address like below
cat file.txt
10.223.20.1
10.223.20.2
10.223.20.3
10.223.20.4
10.223.10.5
.
.
.
like this
Now i want to make a script which gives output whether each ip is pinging or not...
the result will be like this
10.223.20.1 up... (9 Replies)
I have written perl ping program to ping list of IPs one by one and print the status.But each and every time it is showing the status as Pass for all IPs even though the IP is wrong.
multipleip.pl
use Net::Ping;
$p = Net::Ping->new();
$ifile="inventory.txt";
... (2 Replies)
I woul like to create a script in order to make a ping to a server and save in a variable a 1 if respond or a 0 if it doesnt. Then with that I could make a graffic of the server, for how long it is up.:b:
So far I have this:
if ;
then
#if the ip respond the ping shows online
echo... (3 Replies)
Hi,
I have this script in ksh, what it does is loop every ip in the nodes_nso and produced another variable up_nodes_nso of only ip's that are up.
nodes_nso=$(cat /var/tmp/nodes.txt)
echo "ICMP Tests:"
up_nodes_nso=""
for ip in ${nodes_nso} ; do
ping ${ip} 3 > /dev/null
if ; then
... (1 Reply)
Hi All
dhcpd.conf has a range of IPs sa for example( 192.168.1.201 192.168.1.220)
So this is the range of IP addresses the server will issue to DHCP enabled PC clients booting up on the network
How do i know which IPs are being used or which IPs from the range are assigned to dhcp enabled... (11 Replies)