networking network_error ai_generated partial

TCP: tcp_retransmit_timer: jiffies=12345678, rto=300, 重传次数=3, 因对端未收到时间戳选项导致数据包丢失

TCP: tcp_retransmit_timer: jiffies=12345678, rto=300, retransmits=3, skb lost due to peer not receiving timestamps

ID: networking/tcp-timestamps-retransmit

其他格式: JSON · Markdown 中文 · English
82%修复率
85%置信度
1证据数
2024-03-15首次发现

版本兼容性

版本状态引入弃用备注
Linux kernel 5.15.0-91-generic active
Linux kernel 6.2.0-26-generic active
iptables 1.8.7 active

根因分析

远程对端因防火墙或内核模块错误配置,丢弃带有TCP时间戳选项(RFC 1323)的报文,导致发送端无限重传直至连接超时。

English

The remote peer is dropping segments with TCP timestamps (RFC 1323) due to a misconfigured firewall or kernel module that strips or invalidates the timestamp option, causing the sender to retransmit indefinitely until the connection times out.

generic

官方文档

https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

解决方案

  1. Disable TCP timestamps only on the affected interface using iptables: iptables -A OUTPUT -o eth0 -p tcp --tcp-flags SYN SYN -j TCPMSS --clamp-mss-to-pmtu && iptables -A OUTPUT -o eth0 -p tcp -j DROP --tcp-option 8
  2. Configure the firewall to allow TCP option 8 (timestamps) through: iptables -A FORWARD -p tcp -m tcp --tcp-option 8 -j ACCEPT
  3. In cloud environments, add a network ACL rule to permit TCP flags with timestamps: e.g., AWS NACL inbound rule: TCP, source 0.0.0.0/0, allow, TCP flags: SYN, ACK, FIN, RST.

无效尝试

常见但无效的做法:

  1. 65% 失败

    Disabling timestamps can cause performance degradation in high-latency networks and may not address the root cause if the firewall is stripping them at a different layer.

  2. 85% 失败

    This only masks the symptom by allowing more retransmissions; the connection will still eventually time out and the underlying packet drop persists.

  3. 90% 失败

    The issue is not driver-specific; it is caused by firewall or middlebox behavior. Downgrading introduces regression risks and rarely solves the problem.