Noah Roberts wrote:
> I want to find mac address based on IP. Basically what I am trying to
> do is allow clients to request that their hardware be allowed through a
> firewall. I want the server to discover the mac address of the
> requesting client. It looks as though RARP does what I want but in
> google searches I am not finding many implementations or programming
> libraries (in fact I am yet to find one in either php or perl).
>
> RARP is an RFCed protocol but is it actually used by anyone? Or is it
> one of those protocols that never saw wide adoption? The RFC is 903,
> which seems like a pretty low number to me...certainly there should be
> libraries to program in that do RARP by now?
If the server has been contacted by the client, for anything, the server
already has the mac address listed in the arp cache. Use /sbin/arp -n, to
display the IP and mac addresses of every computer that has contacted the
server recently.
|