find local computers

Barry L. Kline blkline at attglobal.net
Tue Mar 2 21:39:22 UTC 2004


On Tuesday 02 March 2004 11:13 am, Marty Landman wrote:
> >You may want to look at 'ping -b'  so send a broadcast ping, then collect
> >the results.
>
> I don't understand the man page, could you give an example please? I'd like
> to ping everything for
>
> 192.168.0. with netmask 255.255.255.0

Your network is probably:

Network:  192.168.0.0
Netmask: 255.255.255.0
host addresses:  192.168.0.1 - 192.168.0.254
broadcast address:  192.168.0.255

Just issue:

ping -c 10 -b 192.168.0.255  

where -c 10 indicates 10 packets
          -b means allow pinging a broadcast address

192.168.0.255 is your broadcast address

Each host 1-254 will respond if it is on-line.  Simply collect the responses 
and you'll have your list!

Barry





More information about the redhat-list mailing list