LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

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

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


Hi,
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 10.23.200.11,and my network mask is 255.255.240.0.Then my Network prefix is

10.23.200.11
255.255.240.0
-----------------(bitwise and)
10.23.192.0

so,how to ping all the devices connected to the network of 10.23.192.0/20 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 10.23.192.0/20 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 10.23.192.0/20 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..

Thanks

Last edited by pradiptart; 08-03-2012 at 03:49 AM.
 
Old 08-03-2012, 05:55 AM   #2
segmentation_fault
Member
 
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, 04:34 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 11,956

Rep: Reputation: 1482Reputation: 1482Reputation: 1482Reputation: 1482Reputation: 1482Reputation: 1482Reputation: 1482Reputation: 1482Reputation: 1482Reputation: 1482
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.
 
  


Reply


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 03:13 PM
connected but cannot ping local or the web Mark51 Linux - Wireless Networking 9 10-03-2009 07:12 PM
Detect if a network device is connected in a bash script jordanwb Linux - General 11 12-29-2008 12:55 PM
Connected will not ping out djpacman Linux - Wireless Networking 1 05-13-2006 09:23 PM
rp-pppoe problem: it says im connected but can't ping anything johnnybezak Linux - Networking 1 05-07-2004 02:56 PM


All times are GMT -5. The time now is 08:59 AM.

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