home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!tabatha!maf
- From: maf@tabatha.MAE.CWRU.EDU (Mark Fullmer)
- Newsgroups: comp.unix.programmer
- Subject: Re: Determining Ethernet Addresses of Network Machines
- Date: 16 Sep 1992 04:46:37 GMT
- Organization: Case Western Reserve University
- Lines: 55
- Message-ID: <196e7dINNql1@usenet.INS.CWRU.Edu>
- References: <1004@cybaswan.UUCP>
- NNTP-Posting-Host: tabatha.mae.cwru.edu
- Keywords: help...
-
- In article <1004@cybaswan.UUCP> ccpaulm@cybaswan.UUCP (Paul Matthews) writes:
- >Hi,
- >
- > We've been trying to build up a database of all the
- > machines on our network, such as ip number, hostname
- > and the ethernet address. So far, the program I've
- > come up with is very crude/slow...it takes the /etc/hosts
- > file as it's list of known machines and then performs a
- > ping on each machine and then uses arp -a (via grep) to
-
- I have a small perl script that makes a database of "tcpdump -enl arp" or
- "tcpdump -penl arp," the latter if you want to see replies at the expense
- of cpu time. Then another that creates reports. I'd like to add a ping
- option and proxy arp detect...then again classes start next week :)
-
- Try anonymous ftp on curiosity.cob.ohio-state.edu /pub/arpmon in a few
- days.
-
- This much works:
-
- print "usage: ipreport pmf:lkh\n";
- print " -m only print hosts with more than one hw address\n";
- print " -f filter. eg -f 128\.146\.109\..* for only hosts in subnet 109\n";
- print " -l only list new entries (looks at $lasttime)\n";
- print " -k Kill -HUP the arpmon process before starting\n";
- print " -n don't resolve hostnames\n";
- print " -r only print arp replies\n";
- print " -b only print arp requests (broadcasts)\n";
-
- reports look like:
-
- Arpmon report started 2:2:15 8/15/92 as -k
-
- IP: 128.146.109.18 buyout.cob.ohio-state.edu
- Hardware Address: 02:60:8C:0B:C7:1E (3Com IBM PC; Imagen; Valid;
- Number of Arp broadcasts: 9
- First Seen: 7:39:19 8/8/92
- Last Seen: 15:34:57 14/8/92 Asking For 128.146.109.9
-
- Hardware Address: 02:60:8C:0B:C7:1E (3Com IBM PC; Imagen; Valid;
- Number of Arp Replies: 12
- First Seen: 7:44:18 8/8/92
- Last Seen: 7:58:23 8/8/92 Replying To aa:0:4:0:cc:18
-
- IP: 128.146.109.190 charlotte
- Hardware Address: 08:00:20:00:57:D9 (Sun)
- Number of Arp broadcasts: 2
- First Seen: 15:34:18 14/8/92
- Last Seen: 19:1:0 14/8/92 Asking For 128.146.109.24
-
-
- --
- mark
- maf+@osu.edu
-
-