Ubuntu 12.04
我试图更好地了解 TCP 在未收到目的地收到的确认时将尝试重新传输数据包的次数。阅读tcp 手册页后,似乎很明显这是由 sysctl tcp_retries1 控制的:
tcp_retries1 (integer; default: 3)
The number of times TCP will attempt to retransmit a packet on
an established connection normally, without the extra effort of
getting the network layers involved. Once we exceed this number
of retransmits, we first have the network layer update the route
if possible before each new retransmit. The default is the RFC
specified minimum of 3.
Run Code Online (Sandbox Code Playgroud)
我的系统设置为默认值 3:
# cat /proc/sys/net/ipv4/tcp_retries1
3
Run Code Online (Sandbox Code Playgroud)
为了对此进行测试,我通过 ssh …