LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to ping to all the device connected to a network ? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-ping-to-all-the-device-connected-to-a-network-4175420124/)

pradiptart 08-03-2012 02:47 AM

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

segmentation_fault 08-03-2012 04:55 AM

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.

jefro 08-03-2012 03:34 PM

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.


All times are GMT -5. The time now is 09:39 AM.