ping all the machines in the network


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users ping all the machines in the network
# 1  
Old 10-08-2007
ping all the machines in the network

Is there any option for the utility "ping" , which can ping all the machines in the network?
# 2  
Old 10-08-2007
I came to knw that "fping" can do this. The following info I got by googleing: But this command is not working in Redhat linux.




fping is a program which uses the Internet Control Message Protocol (ICMP) echo request to determine if a host is up. fping is different from ping in that you can specify any number of hosts on the command line, or specify a file containing the lists of hosts to ping. Instead of trying one host until it timeouts or replies, fping will send out a ping packet and move on to the next host in a round-robin fashion. If a host replies, it is noted and removed from the list of hosts to check. If a host does not respond within a certain time limit and/or retry limit it will be considered unreachable.

Basically fping is meant to be used in shell scripts and its output is easy to parse. This command can be very useful to when you have to scan whole network for alive or unreachable hosts. In case of usage regular ping command you'll have to write shell script and parse each hosts icmp replies but fping can do the same in one line:

To scan range of IP addresses from 192.168.0.1 to 192.168.0.9 just run:
Code:
sudo fping -s -g 192.168.0.1 192.168.0.9 -r 1

That will output:

Code:
192.168.0.1 is alive
192.168.0.7 is alive
192.168.0.2 is unreachable
192.168.0.3 is unreachable
192.168.0.4 is unreachable
192.168.0.5 is unreachable
192.168.0.6 is unreachable
192.168.0.8 is unreachable
192.168.0.9 is unreachable

9 targets
2 alive
7 unreachable
0 unknown addresses

14 timeouts (waiting for response)
16 ICMP Echos sent
2 ICMP Echo Replies received
0 other ICMP received

0.05 ms (min round trip time)
0.44 ms (avg round trip time)
0.84 ms (max round trip time)
2.183 sec (elapsed real time)

In order to scan /24 network (254 hosts) and show only alive hosts the following command can be used:

Code:
sudo fping -a -q -g 192.168.0.0/24


Last edited by rbatte1; 09-05-2016 at 10:40 AM.. Reason: Added CODE tags
# 3  
Old 10-08-2007
fping is great tool, almost as cool as hping2 Smilie
fping needs to be installed. Donwload the latest version, "configure" and "make install" as root. For such purpose you can use "nmap" as well.
nmap sample report as follows :
Quote:
Starting Nmap 4.20 ( Insecure.Org - Nmap Free Security Scanner, Tools & Hacking resources ) at 2007-09-08 08:30 Pacific Daylight Time :
Host myhost.name (10.181.1.7) appears to be up.
etc .......
Nmap finished: 256 IP addresses (116 hosts up) scanned in 8.375 seconds
Use this tools with permission from your network admins, otherwise this may not be appreciated.
# 4  
Old 10-08-2007
Some hosts will respond to a ping sent to the broadcast address of a subnet.
# 5  
Old 10-15-2007
thanks Porter,,
# 6  
Old 10-16-2007
Just an FYI.
Not sure about all, but some AV software packages like Panda Internet Security; Block ICMP Echo Requests.
Puts my mates in a spin, they can see me but can't ping me Smilie

Err ... that on a Windows platform.

Last edited by Cameron; 10-16-2007 at 09:36 AM.. Reason: Windows ref.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Network script for ping status

Actually I am using Red hat Linux 4.4 version. I want to check the 16 client pc status of connection from server.Whether the connection is available or not.I tried to develop the shell script for this code.But It don't work properly.I am a self study learner.Please give me a shell script for this... (9 Replies)
Discussion started by: kannansoft1985
9 Replies

2. IP Networking

Discover Windows machines in other network

I have my Windows computer in network 192.168.1.0/24 plugged into one interface of my router. I have another port on the router as network 192.168.168.0/24 where my nas is plugged in. Now Windows doesn't discover my NAS automatically, of course. Anyone know what would be the most elegant way to... (2 Replies)
Discussion started by: awayand
2 Replies

3. Solaris

Solaris 10 - ping network issue

Hi, I'am begineer in this OS. I've installed it few days ago only to perform project "Managing users in Solaris". I have to create two virtual systems in eg. vmware , connect them and eg. rlogin from user1/machine1 to user2/machine2, give them some permissions to write read etc (this is... (1 Reply)
Discussion started by: michael.pelc
1 Replies

4. Ubuntu

Ping between two virtual machines

Hello, I installed two virtual machines ubuntu10 on VM VirtualBox . Please, what are the steps to make a ping from one of these two machines on the other (the configurations )? Thank you. (4 Replies)
Discussion started by: chercheur111
4 Replies

5. IP Networking

ping to different network in linux

Hi all, please help solving my small issue below is the configuration I have 3 systems sytem1 -------- system 2 ----------system 3 system 1 : 10.255.1.4 & default gw 10.255.1.55 system2 : ip 1 : 10.255.1.55 , ip 2: 10.255.2.1 system 3 : ip : 10.255.2.3 on system 2 : ... (4 Replies)
Discussion started by: Gopi Krishna P
4 Replies

6. Red Hat

application to be run on machines connected in same network

I have a set up of 5 machines which are connected in same network. Now i want to run a small application so that those machines are not ideal. (0 Replies)
Discussion started by: pradeepreddy
0 Replies

7. UNIX for Dummies Questions & Answers

output of file from several machines written to network share, then emailed to group.

I have a script on all the machines on my network that lists how many updates are available for each machine, and then outputs the answer to a file called updates.txt the output shows the hostname and the number of updates, like: computer_A 7 I want all these machines to output the data to... (1 Reply)
Discussion started by: glev2005
1 Replies

8. IP Networking

Able to ping server's private network

Hi guys, I'm in the progress of setting up a private network in our Sun solaris platform. Existing ip: 172.16.102.101 New private ip: 192.168.2.3 Netmask is the same for both private & public 255.255.255.0 After setting up the ip, I'm able to ping this private ip address from our... (3 Replies)
Discussion started by: *Jess*
3 Replies

9. IP Networking

How can i simulate network problems between unix machines ?

Hello all i need to simulate method invocations between 2 machine ( using corba ) now i like to test the method invoke timeout from machine1 to machine2 for that i need to simulate network being busy , can it be done some how ? (2 Replies)
Discussion started by: umen
2 Replies
Login or Register to Ask a Question