服务端会定期发送探测报文来检测客户端的存活状态。
由三个内核参数控制:
-
首次发送探测报文时间:
net.ipv4.tcp_keepalive_time
有报文传输时重置 -
探测报文的发送间隔:
net.ipv4.tcp_keepalive_intvl
-
探测报文的最大重试次数:
net.ipv4.tcp_keepalive_probes
# sysctl -a | grep tcp_keepalive_
net.ipv4.tcp_keepalive_intvl = 75
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_time = 7200
标签:探测,Alive,报文,tcp,TCP,ipv4,net,Keep,keepalive
From: https://www.cnblogs.com/dewan/p/17561222.html