finding remote MAC address

Kevin D. Clark kclark at CetaceanNetworks.com
Tue Apr 29 11:41:52 EDT 2003


"Derek Doucette" <derek at derek.homeunix.org> writes:

> I need to write a script that will take in a list of IP's, and from that
> list find the mac address for these IP's so we can make our move over to
> dhcp.  I think this would be pretty easy to do in perl, but I'm not sure
> of how to find the mac address of a remote device. Any ideas or existing
> solutions anyone knows about?

This is impossible to do in the general case.  But you might be able
to cobble something together for your own local network.

The reason why this is impossible in the general case is because
routers replace MAC addresses in the frames that they are routing on a
hop-by-hop basis (replacing them with the MAC address of the router in
the next hop of the path that the frame will be traveling upon -- ARP
has something to do with this too...).

But if you can work around this feature of routers on your local
network, then you should be able to perform this mapping using the
various ARP tables that are already available to you (other posters
have discussed these).

Regards,

--kevin
-- 
Kevin D. Clark (kclark at CetaceanNetworks.com)
ADVERTISEMENT:  On Sunday May 4th, I'm riding my bicycle 100 miles
in the American Diabetes Association's Tour de Cure ride.  If you're
interested in sponsoring me, please send me email.




More information about the gnhlug-discuss mailing list