Mailinglist Archive: opensuse (882 mails)

< Previous Next >
Re: [opensuse] How to find list of hosts on local subnet?
  • From: John Andersen <jsamyth@xxxxxxxxx>
  • Date: Thu, 02 Dec 2010 16:15:46 -0800
  • Message-id: <4CF836B2.5070808@xxxxxxxxx>
On 12/2/2010 3:37 PM, David C. Rankin wrote:

What would I use to get a list of hosts on the local subnet aside from
the forward zone in bind or doing a ping -c .1 subnet.1-254? I want to find
something I can call from a script to return the list to either a single
variable or an array.

I'm open to anything, but would prefer a BASH or c solution.

I use my Nexus One. Use to use my iPhone. Lots of apps for that.

When no tools at hand:
ping -c 2 -b <broadcast IP> (something like - You need -b
-c 2 sends just two pings. No need to get crazy.

then immediatly do

/sbin/arp -n

And you will have a list of hosts by IP.

---This space for rent---
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups