问题描述
根据我所知,数据包经过的所有MAC地址都在数据包中。这是因为进入某个路径的每个数据包也应该在类似的路径中返回。所以,如果服务器的路由器知道客户端的MAC地址(所有的),为什么服务器页面(如aspx)不能有这个信息?
From what I know, all the MAC addresses that the packet gone through are in the packet. This is because that each packet that goes in a certain path, should also be returned in similar path. So, if the router of the server know about the mac address of the client (all of them), why the server page (like aspx) cannot have this information?
请解释。 (不要只告诉我错了)。
Please, give an explanation. (don't just tell me that I'm wrong).
如果我正确理解,客户端发送包含它的MAC地址的数据包。当数据包通过代理(如客户端路由器)时,代理的地址也被添加到数据包。
If I understand it correctly, the client sends a packet that contains it's MAC address. when to packet go through a proxy (like the client router), the proxy's address is added to the packet too. and so on.
这是维基百科上关于TCP / IP数据线层的片段:
Here is a snippet from Wikipedia about the TCP/IP data line layer:
http://en.wikipedia.org/wiki/TCP/IP_model#Data_Link_Layer
推荐答案
实际上,存储在包中的MAC地址在包的旅程的每一跳都改变了 。
MAC是介质访问控制的缩写,介质指向本地通信介质。虽然源和目的地IP地址在整个旅程中保持相同(并且用于长距离路由决策),但是源和目的地MAC地址仅指示下一跳。
MAC is shorthand for Media Access Control, with media refering to the local communication media. While source and destination IP-Addresses remain the same throughout the journey (and are used for long-distance routing decisions), the source and destination MAC-Addresses just indicate the next hop.
因此,存储在您的服务器接收的数据包中的MAC地址应该是您的存在点 - 路由器或您的提供商的设备的MAC地址。
Because of this, the MAC-Address stored in packets received by your server should be the MAC address of your point of presence-router, or of the equipment of your provider.
您可能需要查看 OSI图层模型和。
这篇关于为什么服务器不能获得客户端MAC地址,如客户端IP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!