更改Linux网络设备的TCP超时 [英] Change the TCP timeout for a linux network device

查看:99
本文介绍了更改Linux网络设备的TCP超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过一个非常慢的接口来编程linux设备驱动程序,其ping回合时间可能长达数分钟.当我尝试使用TCP在两个节点之间建立连接时,连接总是超时.

I am programming linux device driver over a very slow interface, whose ping round time can be as long as several minutes. When I try to use TCP to establish connection between two nodes the connection always times out.

是否有一种方法可以在驱动程序中设置更长的TCP重传或握手超时时间,或者是否有任何用于设置它的命令?谢谢

Is there a method to set the TCP retransmission or handshaking timeout longer in the driver, or are there any commands to set it with? Thanks

推荐答案

您是否尝试过寻找该问题的答案? Google的快速搜索为我提供了,它似乎可以直接解决此问题.摘要是net.ipv4.tcp_syn_retries的设置确定了TCP连接可用的最大超时时间.

Have you tried searching for an answer to this question? A quick Google search gave me this, which appears to directly address this issue. The summary is that the setting of the net.ipv4.tcp_syn_retries determines that maximum timeout available to TCP connections.

如果该文档没有回答您的问题,则应指出您尝试过的方法以及行为与预期的不同之处.

If that document doesn't answer your question, you should indicate what you tried and how the behavior differed from what you expected.

这篇关于更改Linux网络设备的TCP超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆