为什么我的 PC 中的 TCP 消息是 590 字节的帧 [英] Why are TCP messages in my PC coming in frames of 590 bytes

查看:47
本文介绍了为什么我的 PC 中的 TCP 消息是 590 字节的帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我通过代理服务器使用 Firefox 向网页发出请求时,我正在分析 Wireshark 日志文件.

I am analyzing wireshark log files, when I make a request to a web page using firefox through a proxy server.

以下是连接建立的详细信息:

Following are details of connection establishment:

  1. 当我在从我的 PC 到代理服务器的 [SYN] 消息的 TCP 段详细信息中打开选项分支时,我注意到最大段大小" - 它说 1460 字节

  1. I have noted "maximum segment size" when I open options branch in the TCP segment details of the [SYN] message from my PC to the proxy server - it says 1460 bytes

同样,从代理服务器到我的 PC 的 [SYN,ACK] 消息的最大段大小 e - 它表示 1460 字节

Similarly, maximum segment size eof the [SYN,ACK] message from the proxy server to my PC - it says 1460 bytes

建立 TCP 连接后,从代理服务器发送到我的 PC 的每个 TCP 帧不应该是 1460 字节吗?我很困惑为什么它们是 590 个字节.请建议如何设置 590 尺寸

After establishing the TCP connection, should not each of the TCP frames sent from proxy server to my PC be of 1460 bytes? I am puzzled that why are they 590 bytes. Please advice how the 590 size is being set

推荐答案

一个合理的解释是 590 原来是特定连接的 Path MTU.

A plausible explanation is that 590 turns out to be the Path MTU for the particular connection.

换句话说,客户端(连接的端节点之一)接受最多 1460 字节有效载荷的数据包,途中的一些节点接受较小的数据包.为了提高效率,路径 MTU 发现允许数据包的发起者调整它的大小,以便它适合路径上遇到的较小的 MTU,从而避免碎片.

In other words whereby the client (one of the end nodes of the connection)accepts packets of a maximum of of 1460 bytes payload, some node(s) on the way accepts smaller packets. For efficiency purposes, the Path MTU Discovery allows the originator of a packet to size it so that it would fit the smaller MTU encountered on the path, and hence avoid fragmentation.

顺便说一句:
1460是一个很常见的MTU(好MSS),因为它对应1500,以太网v2的最大值,减去20+20=40字节的IP头开销)

BTW:
1460 is a very common MTU (well MSS), because it it corresponds to 1500, Ethernet v2's maximum, minus 20+20= 40 bytes for the IP header overhead)

请参阅以下维基百科条目,了解 MTU(最大传输单元)和基本传输单元的概述Path MTU Discovery 方法的描述(基本上设置 DF ie do-not-fragment 标志并依靠 ICMPDestination Unreachable (Datagram Too Big)"消息来检测途中某个节点无法处理数据包,因此尝试使用较小的尺寸,直到它通过).

See the following Wikipedia entry for an overview of MTU (Maximum Transmission Unit) and a basic description of the Path MTU Discovery method (Basically setting the the DF i.e. do-not-fragment flag and relying on the ICMP ""Destination Unreachable (Datagram Too Big)" messages to detect that some node on the way couldn't handle the packet, and hence try with smaller size until it goes through).

此外,我建议在连接到不同主机(可能是同一网段上的对等方)时检查数据包,而不要通过提到的代理.然后您可能会开始看到 1460 字节的帧.

Also, I suggest inspecting the packets when the connection is to a different host, maybe a peer on the very same network segment, without going through the proxy mentioned. Chances are you will then start seeing 1460 bytes frames.

这篇关于为什么我的 PC 中的 TCP 消息是 590 字节的帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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