how to get mac address of external IP in C#

后端 未结 4 1033
再見小時候
再見小時候 2021-01-21 00:39

how to get mac address of external IP in C# ? E.g I want to find mac address of \"204.13.153.34\" ?

Any ideas and code snippet is highly appreciated ? Thanks in Advance<

4条回答
  •  一整个雨季
    2021-01-21 01:14

    You should read about the Address Resolution Protocol.

    You cannot determine the MAC address of a machine in a different network segment. With ARP you can figure out the MAC address for a given IP address if the machine happens to be in the same segment. Thats what the IP stack is doing. It asks the "net" via ARP who is resonsible for handing packets for an IP address, because the ethernet card does only know MAC addresses.

提交回复
热议问题