TCP断开连接时的TIME_WAIT和MSL的关系
Maximum segment lifetime is the time a TCP segment can exist in the internetwork system. It is arbitrarily defined to be 2 minutes long. The Maximum Segment Lifetime value is used to determine the TIME_WAIT interval (2*MSL).
On some Linux systems, this value can be checked by either of the commands below:
sysctl net.ipv4.tcp_fin_timeout
cat /proc/sys/net/ipv4/tcp_fin_timeout
TCP的一篇非常好的文章:TCP的那些事儿
socket的keep-alive
TIME_WAIT快速回收和重用 我们的板子上reuse和recycle都没开,因此如果是短连接的话,会产生很多TIME_WAIT。
本文详细介绍了TCP协议中TIME_WAIT状态的概念及其与最大段生存时间(MSL)之间的关系。阐述了MSL是如何定义的,并解释了TIME_WAIT状态持续时间如何由2倍MSL确定。此外,还提供了Linux系统下检查TIME_WAIT间隔设置的方法。

被折叠的 条评论
为什么被折叠?



