Get IP to MAC address translation
Hi all, I need to get the MAC address of a machine on my LAN. I want to get the MAC address with the IP address as an input.
Can any one help me get the code for that or atleast some links for the resources... Thanx in advance... -Bhupesh |
Sounds like you want to access the ARP protocol tables. See http://linux-ip.net/html/tools-arp.html.
HTH, -nick |
Solution: Obtain MAC Address from IP Address
You have two ways to do this.
In a terminal, with root user: nmap -v IP_ADDRESS -p 0 |grep MAC |cut -c 14-30 You need to be in the same network. The other way: ping IP_ADDRESS arp -a |grep IP_ADDRESS |awk '{ print $4 }' |
All times are GMT -5. The time now is 09:29 AM. |