TCP 连接段中的最大窗口大小是多少?
考虑使用 10 Mbps 链路的单个 TCP (Reno) 连接。 假设该链路不缓冲数据,并且接收方的接收缓冲区远大于拥塞窗口。 假设每个 TCP 段的大小为 1500 字节,发送方和接收方之间连接的双向传播延迟为 200 毫秒。 另外,假设 TCP 连接始终处于拥塞避免阶段(忽略慢启动)。
此 TCP 连接可以达到的最大窗口大小(以段为单位)是多少?
所以我们知道连接的吞吐量和延迟, 我认为我们应该能够操纵以下公式,以便我们能够找到窗口大小。
吞吐量 = 窗口大小 / RTT
吞吐量 * RTT = 窗口大小
10 Mbps * 200 毫秒 = 窗口大小
我不确定这是否正确。除了这个公式之外,我很难找到与查找窗口大小相关的任何其他内容。
Consider a single TCP (Reno) connection that uses a 10 Mbps link.
Assume this link does not buffer data and that the receiver's receive buffer is much larger than the congestion window.
Let each TCP segment be of size 1500 bytes and the two-way propagation delay of the connection between sender and receiver be 200 msec.
Also, assume that the TCP connection is always in congestion avoidance phase (ignore slow start).
What is the maximum window size in segments that this TCP connection can achieve?
So we know the throughput of the connection and the delay,
I think we can should be able to manipulate the following formula so that we are able to find the Window Size.
Throughput = Window Size / RTT
Throughput * RTT = Window Size
10 Mbps * 200 msec = Window Size
I am not sure if this is correct. I am having a hard time finding anything else that relates in finding Window Size other than this formula.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
以段为单位的最大窗口大小最多可达 2^30/ MSS,其中 MSS 是最大段大小。 2^30 = (2^16*2^14) 是通过这个得出的,正如迈克尔在他的回答中提到的那样。如果您的网络带宽和延迟乘积超过 TCP 接收器窗口大小,则将为 TCP 连接启用窗口缩放选项,并且大多数操作系统都支持此功能。缩放支持窗口大小最多 14 位乘法移位。您可以阅读以下内容以获得更好的解释:
http://en.wikipedia.org/wiki/TCP_window_scale_option
http://www.ietf.org/rfc/rfc1323.txt
The Maximum windows size in terms of segments can be up to 2^30/ MSS, where MSS is the maximum segment size. The 2^30 = (2^16*2^14) comes through this as Michael mentioned you in his answer. If your network bandwidth and delay product exceeds than the TCP receiver window size than the window scaling option is enabled for the TCP connection and most OS support this features. The scaling supports up to 14-bit multiplicative shift for the window size. You can read following for the better explanation:
http://en.wikipedia.org/wiki/TCP_window_scale_option
http://www.ietf.org/rfc/rfc1323.txt
我认为您要问的是如何在网络上端到端传输数据。在这种情况下,你就很接近了。吞吐量*RTT [单位:B/S * S] 是电线容纳的量。忽略 PMTU、数据包开销、硬件编码等,然后吞吐量*RTT/PacketSize 将为您提供估计值。但等一下,我用的是 RTT。我的接收窗口实际上是关于在一个方向上可以容纳多少电线,因此将其分成两半。
如果您的实现不支持窗口缩放,则使用 2^16 进行最小化。如果是这样,那么你用 2^30 来最小化它。
I think what you are asking is how data can I get end to end on the wire. In that case you are close. Throughput*RTT [units: B/S * S] is how much the wire holds. Ignoring PMTU, packet overhead, hardware encoding, etc. then Throughput*RTT/PacketSize would give you the estimate. But hold on, I used RTT. My receive window is really about how much can fit on the wire in one direction so divide that in half.
If your implementation doesn't support window scaling then min that with 2^16. If it does then you min it with 2^30.
如果最大发送速率超过链路容量
(最大窗口大小*1段大小)/ RTT = 链路容量
(最大窗口大小 * 1500*8)/ 200*10^-3 = 10 * 10^-6
您可以解决最大窗口大小的问题。
我们除以 RTT,因为在此时间之后将收到 ACK,因此发送方可以发送更多分段,而无需增加窗口大小。
A packets will be dropped if the maximum sending rate exceeds link capacity
(max window size*size of 1 segment) / RTT = link capacity
(max window size * 1500*8) / 200*10^-3 = 10 * 10^-6
you can solve this for max window size.
We divide by the RTT because after this time an ACK will be received so the sender can send more segments without the need to increase the window size.