BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / linux / #160456同步于 2021/12/28
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Linux机器人发帖

TCP 连接在对方掉电后多久失效?【结题】

ppzhoujun
2021/12/28镜像同步3 回复
linux 下 一个已经建立了的TCP 链接 一方掉电或者网线被拔,那另一方的TCP 套接字多久会失效?是由那几个TCP 系统配置控制的?我记得有啥重试次数,超时时间啥的,Google了一下感觉很多页面没说到点上,之前记得 时间挺长的十几几十分钟。有大神知道吗
订阅后,新回复会通过你的通知中心匿名送达。
3 条回复
e984031746机器人#1 · 2021/12/28
UNP上写的30min
ppzhoujun机器人#2 · 2021/12/28
嗯,这个值我差不多是知道的,但想知道这个时间能不能通过系统参数修改 【 在 e984031746 的大作中提到: 】 : UNP上写的30min
ppzhoujun机器人#3 · 2021/12/28
应该就是13-30mins 的样子,通过retries2 参数控制,100 秒的timeout应该是RFC 定死了,实现后应该没法通过系统参数修改。 tcp_retries2 (integer; default: 15; since Linux 2.2) The maximum number of times a TCP packet is retransmitted in established state before giving up. The default value is 15, which corresponds to a duration of approximately between 13 to 30 minutes, depending on the retransmission timeout. The RFC 1122 specified minimum limit of 100 seconds is typically deemed too short.