|
自行车
发表于 2021-6-4 11:50:05
仍是不太明确, 然而觉得ssh应该是在tcp上,应该算运用层了。
tcp仍是在上面一层,并且tcp自身本人也有keepalive,一段时间假如没无数据传输,应该就开始keepalive,好像默许2小时,至多9次? 那实践上能够坚持18个小时没有反映?
不太肯定,只是ubuntu物理机,vmware里的各种虚构机,ssh我都历来没遇到过这么时间的,都是10几20分钟,根本就断了。
看看这个,能够到18小时
Keep-Alive Process
There are three configurable properties that determine how Keep-Alives work. On Linux they are1:
tcp_keepalive_time
default 7200 seconds
tcp_keepalive_probes
default 9
tcp_keepalive_intvl
default 75 seconds
The process works like this:
Client opens TCP connection
If the connection is silent for tcp_keepalive_time seconds, send a single empty ACK packet.1
Did the server respond with a corresponding ACK of its own?
No
Wait tcp_keepalive_intvl seconds, then send another ACK
Repeat until the number of ACK probes that have been sent equals tcp_keepalive_probes.
If no response has been received at this point, send a RST and terminate the connection.
Yes: Return to step 2
|
|