查找给定IP地址的MAC地址

时间:2021-10-28 06:59:20

I am working on finding MAC address of a computer from given IP address.
Given IP can of remote machine.

我正在努力从给定的IP地址中查找计算机的MAC地址。鉴于IP可以远程机器。

sudo tcpdump -lni any arp | grep 'is-at'

Above command works for me to find MAC address of all IP address from tcpdump

以上命令可以让我从tcpdump中找到所有IP地址的MAC地址

I looking for an optimized way to find MAC from given IP possibly without creating much network traffic. I am using CentOS Atomic Host.
If anyone has a programming approach in c/c++ that is also appreciated.

我正在寻找一种优化的方法来从给定的IP中查找MAC,而不会产生太多的网络流量。我正在使用CentOS Atomic Host。如果有人在c / c ++中有编程方法,也会受到赞赏。

1 个解决方案

#1


1  

To get the mac address of the remote machine you can use below nmap command.

要获取远程计算机的mac地址,可以在nmap命令下使用。

nmap -sP -n 10.0.136.75

I am using Nmap 7.70, Hope that this will be useful.

我正在使用Nmap 7.70,希望这会很有用。

#1


1  

To get the mac address of the remote machine you can use below nmap command.

要获取远程计算机的mac地址,可以在nmap命令下使用。

nmap -sP -n 10.0.136.75

I am using Nmap 7.70, Hope that this will be useful.

我正在使用Nmap 7.70,希望这会很有用。