Mailinglist Archive: opensuse (882 mails)

< Previous Next >
Re: [opensuse] How to find list of hosts on local subnet? [Part Solved]
  • From: "David C. Rankin" <drankinatty@xxxxxxxxxxxxxxxxxx>
  • Date: Thu, 02 Dec 2010 18:51:23 -0600
  • Message-id: <4CF83F0B.30800@xxxxxxxxxxxxxxxxxx>
On 12/02/2010 06:43 PM, David C. Rankin wrote:
On 12/02/2010 06:15 PM, John Andersen wrote:
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 192.168.1.255 - You need
-b option)
-c 2 sends just two pings. No need to get crazy.

then immediatly do

/sbin/arp -n

<snip>

I've noticed that using arpd seems to give you the best results for hosts that
might not be up at the moment. Just start arpd with:

# arpd -b /var/lib/arpwatch/arpd.db ath0

Here is the differences in the results. With arp I get only 4 hosts and the
router (.13)

18:45 alchemy:~/scr/utl/tst> ping -c2 -b 192.168.6.102
<snip>

18:45 alchemy:~/scr/utl/tst> sudo arp -n
Address HWtype HWaddress Flags Mask Iface
192.168.6.121 ether 00:0F:1F:D6:03:A0 C ath0
192.168.6.13 ether 00:23:69:5C:FD:B4 C ath0
192.168.6.17 ether 00:E0:81:55:4E:1D C ath0
192.168.6.147 ether 00:11:43:22:5A:25 C ath0
192.168.6.14 ether 00:21:85:1A:8C:FA C ath0

Using the script above, I get the whole list:

18:46 alchemy:~/scr/utl/tst> sh arpt.sh

Hostname IP Mac
archangel 192.168.6.14 00:21:85:1a:8c:fa
zachrys-iPhone 192.168.6.112 d4:9a:20:92:0b:f5
gateway (Linksys) 192.168.7.13 00:06:25:5e:dd:29
supersff 192.168.6.121 00:0f:1f:d6:03:a0
gw 192.168.6.13 00:23:69:5c:fd:b4
mail 192.168.6.17 00:e0:81:55:4e:1d
dcrgx2 192.168.6.147 00:11:43:22:5a:25
dcrgx 192.168.6.111 00:11:43:22:4f:23
zion 192.168.6.19 00:0c:76:13:16:e6
Wii 192.168.6.115 00:1b:ea:d6:91:80
ripper 192.168.6.149 00:0c:76:13:90:c2


--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups