客户端 – 服务器 – 为什么服务器不能得到客户端的MAC地址,像客户端IP?

从我所知道的,数据包通过的所有MAC地址都在数据包中.这是因为在某个路径中的每个数据包也应该以类似的路径返回.所以,如果服务器的路由器知道客户端的mac地址(所有这些),为什么服务器页面(如aspx)不能拥有这些信息?

请给出解释. (不要告诉我我错了).

如果我理解正确,客户端会发送一个包含其MAC地址的数据包.当数据包通过代理(如客户端路由器)时,代理的地址也被添加到数据包中.等等.

这是维基百科关于TCP / IP数据线层的片段:
http://en.wikipedia.org/wiki/TCP/IP_model#Data_Link_Layer

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地址只是指示下一跳.

因此,服务器接收的数据包中存储的MAC地址应该是您的在线路由器或提供商的设备的MAC地址.

您可能想看看OSI Layer模型和encapsulation.

转载注明原文:客户端 – 服务器 – 为什么服务器不能得到客户端的MAC地址,像客户端IP? - 代码日志