gpt4 book ai didi

TCP 拥塞窗口大小 : strange behaviour

转载 作者:可可西里 更新时间:2023-11-01 02:52:58 24 4
gpt4 key购买 nike

我正在使用 Netkit 研究各种 TCP 算法。

有两台机器,c1c2,通过路由器连接,强制延迟200ms。 c1 上的程序每 1 毫秒向 c2 发送 100 字节的数据包(TCP_NODELAY 已打开)。 Reno 在两台机器上都用作拥塞控制。

根据 tcpdump,只有前 2 个数据包被立即发送(200 字节),然后 c1 停止发送并等待 ACK。接收方的窗口约为 2MSS (MSS=1460),所以我猜是 CWND 阻止了 c1 发送更多数据包。

根据 Reno 规范,初始 CWND 为 1MSS。我在那里遗漏了什么吗?..即使发送 1 字节数据包也会给出相同的图片,发送 2 个数据包,然后发送方等待 ACK。可能是初始 CWND 大小由初始段大小而不是 MSS 决定?

ip route show cache 显示类似

缓存 mtu 1500 rtt 361ms rttvar 360ms cwnd 5 advmss 1460 hoplimit 64

不知是不是意味着CWND=5MSS?

最佳答案

来自RFC 2581

IW, the initial value of cwnd, MUST be less than or equal to 2*SMSS bytes and MUST NOT be more than 2 segments.

We note that a non-standard, experimental TCP extension allows that a TCP MAY use a larger initial window (IW), as defined in equation 1 [AFP98]:

  IW = min (4*SMSS, max (2*SMSS, 4380 bytes))           (1)

With this extension, a TCP sender MAY use a 3 or 4 segment initial
window, provided the combined size of the segments does not exceed 4380 bytes. We do NOT allow this change as part of the standard defined by this document. However, we include discussion of (1) in the remainder of this document as a guideline for those experimenting with the change, rather than conforming to the present standards for TCP congestion control.

SENDER MAXIMUM SEGMENT SIZE (SMSS): The SMSS is the size of the largest segment that the sender can transmit. This value can be based on the maximum transmission unit of the network, the path MTU discovery [MD90] algorithm, RMSS (see next item), or other factors. The size does not include the TCP/IP headers and options.

您可能想检查您的实现是如何计算 SMSS 的。

关于TCP 拥塞窗口大小 : strange behaviour,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4430053/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com