You can get the ARP tables from the routers (provided you have access to them).

I would ping scan a subnet very quickly, then dump the ARP cache of the router attached to the subnet using SNMP. something like:

nmap -sP -T4 10.0.0.0/24
snmpwalk -Os -c public -v 1 router.example.com 1.3.6.1.2.1.3.1

Which will return:

atIfIndex.4.1.10.0.0.147 = INTEGER: 4
atIfIndex.4.1.10.0.0.148 = INTEGER: 4
atPhysAddress.4.1.10.0.0.147 = Hex-STRING: 00 02 B3 90 92 C7
atPhysAddress.4.1.10.0.0.148 = Hex-STRING: 00 06 25 BD 01 A2
atNetAddress.4.1.10.0.0.147 = Network Address: 0A:00:00:93
atNetAddress.4.1.10.0.0.148 = Network Address: 0A:00:00:94

For example. snmpwalk allows you to change many of the output options, so if you needed it in a more parsable format, just look at "man snmpcmd".

You could also get it from the command line of the router. I think Cisco is "sh ip arp". Other routers will probably have similar options.

Then you can use "nmblookup -A <ip address>" if they are Windows machines to get the NetBIOS name (and workgroup/domain and username of the person logged in). "dig -x <ip address>" will return the fqdn for a workstation if the PTR record is properly set up.

Adam Augustine

Richard Miller wrote:
We wanted to scan for MAC addresses at work because all of the computer are registered in our inventory by MAC address. A few users had changed their computer names and we needed a way to identify the machines.

Richard


On Jan 14, 2004, at 1:27 PM, Phillip Hellewell wrote:


On Wed, Jan 14, 2004 at 12:33:01PM -0700, Richard Miller wrote:

I was just trying to identify the MAC address of remote computers.  arp
only works for computers on the same network, right?


Right, and the reason is because a router will change the MAC address of
a network packet to its own address before forwarding it on to a
different network.

So I don't think it is possible to get the MAC address of computers not
in your network.  Just out of curiosity, what would you do with these
MAC addresses anyways?

--
Phillip Hellewell <[EMAIL PROTECTED]>
____________________
BYU Unix Users Group
http://uug.byu.edu/
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list



____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list


____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to