我怎样才能从HTTP请求MAC地址? [英] How can I get a MAC address from an HTTP request?

查看:2939
本文介绍了我怎样才能从HTTP请求MAC地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以给我一些指点从HTTP请求拾取用户的MAC地址?

Can someone give me some pointers on picking up the user's MAC address from an HTTP request?

该用户将可以从的之外的我的网络。

The users will be from outside my network.

推荐答案

这取决于你的网络设置。但大概没有。

It depends on your network setup. But probably no.

下面是以太网和IP一个短期进修。 MAC地址是网络卡的一个唯一的地址。它是用于标识在网络段上的分组是哪个用户。您可以使用ARP获得MAC地址的IP地址。 但是,这只能如果你是在同一网段期望

Here is a short refresher on Ethernet and IP. The MAC address is a unique address of the network card. It is used to identify for which user on the network segment a packet is. You can use ARP to get a MAC address for an IP address. But this works as expected only if you are on the same network segment.

所以,问题是,什么是一个网段?这取决于你使用的技术,但在这里是常见的情况。一个完整的无线网络是一个网段。网络上的每个用户都可以对话通过以太网以所有其他用户。基于有线网络,这取决于硬件。如果你有好的老BNC或集线器,则必须与所有使用一个网段。同样每个用户都可以谈任何其他的。随着网络中的交换机的网络段仅仅是将您连接到开关电缆。在这里,你只能通过以太网交谈的开关。所有其他用户至少需要IP。

So the question is, what is a network segment? It depends on the technology you use, but here are the common cases. A entire wireless network is a network segment. Every user on the network can talk via Ethernet to every other user. On wire based networks, this depends on the hardware. If you have good old BNC or a hub you have one network segment with all uses. Again each user can talk to any other. With a switch in the network a network segment is only cable that connects you to the switch. Here you can only talk to the switch via Ethernet. Every other user needs at least IP.

太糟糕了,有HTTP,它建立在TCP / IP大多数情况下,你是99.99%从来没有在同一网段用户。您可以使用ARP,但只获得第一跳的MAC地址。它得到的更好,这取决于你的硬件,你可能甚至是基于以太网的IP网络上; ATM例如...

Too bad that most situations with HTTP, which builds on TCP/IP, you are 99.99% never in the same network segment as your user. You can use ARP, but will only get the MAC address of the first hop. It get's better, depending on your hardware, you may not even be on a IP network that is based on Ethernet; ATM for example...

这篇关于我怎样才能从HTTP请求MAC地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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