Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-03-2012, 02:47 AM   #1
Registered: Sep 2007
Posts: 102

Rep: Reputation: 12
How to ping to all the device connected to a network ?

I want to ping all the device connected to the network.
I got my ip and the net mask also so i am having the network address also as follows

My ip is suppose,and my network mask is my Network prefix is
-----------------(bitwise and)

so,how to ping all the devices connected to the network of network.

Is there any buffer concept in ping I am asking because it showing sometime buffer is not there ,If yes then kindly tell me how to ping to a large network.

I want to write a shell script and i will give this to the shell script and it will show me all the mac address of the network.In side the script I am using a loop and using ping command to ping each device .

I am getting the and calculating what are the ip inside the network and giving it to the ping .is it correct idea as ping buffer may full after some time .If so kindly tell me what to do.

can we flush this buffer after some ping operation.?

Kindly tell me some answer..


Last edited by pradiptart; 08-03-2012 at 02:49 AM.
Old 08-03-2012, 04:55 AM   #2
Registered: Sep 2008
Location: Ioannina, Greece
Distribution: Gentoo
Posts: 332

Rep: Reputation: 55
Maybe it could be easier to use nmap tool with -sP option. nmap takes range of IPs or subnets as target and the -sP pings each target once, to determine if it's up. It also can be run as regular user.
Old 08-03-2012, 03:34 PM   #3
Registered: Mar 2008
Posts: 17,000

Rep: Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513
Ping is a very poor choice to use. It is becoming blocked by default in everything from OS to switches. For example a computer blocks icmp, what do you do then? Another example is a IDF switch set to block icmp at some load level.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
network device module equivalent to ping karan2386 Linux - Kernel 5 02-09-2012 02:13 PM
connected but cannot ping local or the web Mark51 Linux - Wireless Networking 9 10-03-2009 06:12 PM
Detect if a network device is connected in a bash script jordanwb Linux - General 11 12-29-2008 11:55 AM
Connected will not ping out djpacman Linux - Wireless Networking 1 05-13-2006 08:23 PM
rp-pppoe problem: it says im connected but can't ping anything johnnybezak Linux - Networking 1 05-07-2004 01:56 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration