2014-07-08 44 views
0

显示在同一WiFi连接如何显示在同一Wi-Fi连接的所有IP和MAC地址

正如我曾尝试使用CMD,输入 “arp -a” 显示所有IP的所有IP和MAC地址和MAC地址。

我想在ASP.NET MVC C#上做这样的事情,以显示网络上的所有IP和MAC地址 是否有可能? 如果是如何做到这一点的轻松 谢谢:)

+0

可能重复http://stackoverflow.com/questions/20707604/how -can-i-get-list-of-active-lan-user-using-arp) – CodeCaster

+0

你想在* client *(即浏览器)或* server *的同一网络上显示所有地址吗? – svick

回答

-2

要显示在C#中的IP地址:

string strHostName = System.Net.Dns.GetHostName(); 
    string clientIPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(1).ToString(); 

    TextBox1.Text = clientIPAddress; 

后你有你的IP地址,下面的链接将帮助您获得MAC解决

How do I obtain the physical (MAC) address of an IP address using C#?

+1

我已经有我的IP和MAC地址。但我想要的是从同一个wifi上获取IP和MAC地址。但无论如何感谢答案:) – anin

相关问题