如何让C#外部IP的MAC地址 [英] how to get mac address of external IP in C#

查看:117
本文介绍了如何让C#外部IP的MAC地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获得外部IP的MAC地址,在C#中?
例如我想找到的204.13.153.34的mac地址?

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

推荐答案

您应该阅读有关地址解析协议。

You should read about the Address Resolution Protocol.

您不能在不同的网段确定计算机的MAC地址。随着ARP你可以计算出的MAC​​地址给定的IP地址,如果机器恰好是在同一网段。那是什么IP堆栈在做什么。它通过ARP谁是resonsible为递过数据包的IP地址要求净,因为以太网卡确实只知道MAC地址。

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.

这篇关于如何让C#外部IP的MAC地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆