为什么服务器不能获得客户端MAC地址,如客户端IP? [英] Why can't the server get the client MAC address, like the client IP?

查看:288
本文介绍了为什么服务器不能获得客户端MAC地址,如客户端IP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我所知,数据包经过的所有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数据线层的片段:

http://en.wikipedia.org/wiki/TCP/IP_model#Data_Link_Layer

Here is a snippet from Wikipedia about the TCP/IP data line layer:
http://en.wikipedia.org/wiki/TCP/IP_model#Data_Link_Layer


数据链路层用于在
上的两个不同主机的互联网层
接口之间移动
数据包。

a给定链路上发送和接收分组的过程可以在
中控制用于
网卡的软件设备驱动器以及固件
或专业芯片组。这些将
执行数据链接功能,例如
添加包头以准备它
用于传输,则实际上
通过物理
媒体传输帧。 TCP / IP模型包括将
网络寻址方法转换为数据链路
寻址的
网络寻址方法的
规范,例如媒体访问
控制),但是低于该级别的所有其他
方面是
隐含地假定存在于
链路层中,但未明确定义

The Data Link Layer is used to move packets between the Internet Layer interfaces of two different hosts on the same link. The processes of transmitting and receiving packets on a given link can be controlled both in the software device driver for the network card, as well as on firmware or specialized chipsets. These will perform data link functions such as adding a packet header to prepare it for transmission, then actually transmit the frame over a physical medium. The TCP/IP model includes specifications of translating the network addressing methods used in the Internet Protocol to data link addressing, such as Media Access Control (MAC), however all other aspects below that level are implicitly assumed to exist in the Link Layer, but are not explicitly defined.


推荐答案

实际上,存储在包中的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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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