Linux: network: tcp:tcp_retries2 如果TCP出现重传,什么时候做reset?

tcp_retries2 - INTEGER
This value influences the timeout of an alive TCP connection, when RTO retransmissions remain unacknowledged. Given a value of N, a hypothetical TCP connection following exponential backoff with an initial RTO of TCP_RTO_MIN would retransmit N times before killing the connection at the (N+1)th RTO.
The default value of 15 yields a hypothetical timeout of 924.6 seconds and is a lower bound for the effective timeout. TCP will effectively time out at the first RTO which exceeds the hypothetical timeout.
RFC 1122 recommends at least 100 seconds for the timeout, which corresponds to a value of at least 8.

这里是说,当RTO重传一直收不到回应,这个参数会影响一个TCP的超时时间。这个参数是一个次数,当然重传的次数多了就是超时时间长,如果重传次数少了,超时时间就短。理论上讲,如果是默认值15次,可能是925.6秒(15分钟)之后才会超时,超时才会导致TCP断链。而RFC1122里,建议是至少100秒超时,对应8次。

最近遇到的一个问题,网络配置问题,可能导致RTT非常的大,即使再大,可能也超不过这个15分钟,所以也不会导致断链重连。
Linux: network: tcp:tcp_retries2 如果TCP出现重传,什么时候做reset?_第1张图片

你可能感兴趣的:(网络,tcp/ip,linux,网络)