The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Able to ping server's private network *Jess* IP Networking 3 01-10-2008 08:45 PM
How can i simulate network problems between unix machines ? umen IP Networking 2 02-12-2007 08:10 AM
trying to map win xp machines in a linux raulb Linux 3 10-05-2005 10:32 AM
switching between machines w33man UNIX for Dummies Questions & Answers 1 04-28-2004 04:01 PM
Any solaris machines on the NET?? TRUEST UNIX for Dummies Questions & Answers 1 03-24-2003 10:47 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-08-2007
praveen_b744 praveen_b744 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 49
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 (permalink)  
Old 10-08-2007
praveen_b744 praveen_b744 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 49
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:
sudo fping -s -g 192.168.0.1 192.168.0.9 -r 1

That will output:

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:

sudo fping -a -q -g 192.168.0.0/24
  #3 (permalink)  
Old 10-08-2007
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,323
fping is great tool, almost as cool as hping2
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 (permalink)  
Old 10-08-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Some hosts will respond to a ping sent to the broadcast address of a subnet.
  #5 (permalink)  
Old 10-15-2007
praveen_b744 praveen_b744 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 49
thanks Porter,,
  #6 (permalink)  
Old 10-16-2007
Cameron's Avatar
Cameron Cameron is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 500
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

Err ... that on a Windows platform.

Last edited by Cameron; 10-16-2007 at 09:36 AM.. Reason: Windows ref.
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0