积极答复者
请教Windows TCP中又没关于keepalive设置的参数?

问题
-
尊敬的微软工程师,
请教Windows TCP中又没关于keepalive设置的参数?
我查到这份链接:
https://support.esri.com/en/technical-article/000006285
- On Microsoft Windows set KeepAliveTime to 300000.
Code:
\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters
If the KeepAlivetime parameter does not already exist in the above location, create it. The time specified is in milliseconds.
See link to a Microsoft TechNet article in the Related Information section below.
请教一下这份链接说的对吗?是在
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters下面设置 KeepAliveTime 的值为30000吗?
谷青松
- 已编辑 谷青松 2020年12月8日 8:58 补充
- On Microsoft Windows set KeepAliveTime to 300000.
答案
-
你好,
对的,在Windows中是在您说的位置设置KeepAliveTime的值的: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveTime
详细请参考以下官方文档:
(如果上述回复对您有帮助的话,请帮忙标记为答案。这样一方面可以将有用的信息注释出来,一方面可以提高看到您帖子的朋友回复您帖子的积极性。感谢您!)
Best Regards,
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已编辑 Anne HeMicrosoft contingent staff, Moderator 2020年12月9日 1:57
- 已标记为答案 谷青松 2020年12月10日 7:17
- 取消答案标记 谷青松 2020年12月10日 7:21
- 已标记为答案 谷青松 2020年12月17日 7:44
全部回复
-
你好,
对的,在Windows中是在您说的位置设置KeepAliveTime的值的: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveTime
详细请参考以下官方文档:
(如果上述回复对您有帮助的话,请帮忙标记为答案。这样一方面可以将有用的信息注释出来,一方面可以提高看到您帖子的朋友回复您帖子的积极性。感谢您!)
Best Regards,
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已编辑 Anne HeMicrosoft contingent staff, Moderator 2020年12月9日 1:57
- 已标记为答案 谷青松 2020年12月10日 7:17
- 取消答案标记 谷青松 2020年12月10日 7:21
- 已标记为答案 谷青松 2020年12月17日 7:44
-
修改这个有没有命令?
默认我看了计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters下面KeepAliveTime这个值是没有的,是不是意味这个值的默认就是2小时?,烦请告知!
另外我看到
Important note: If OS is Windows Vista/2008, the number of TCP Keepalive attempts are hardcoded to 10 and could not be adjusted via the registry.
这个意思就是Vista/2008以后版本都不能进行注册表更改对吗?
谷青松
- 已编辑 谷青松 2020年12月9日 2:59 询问
-
你好,
是的,默认是没有这个参数的,默认情况下这个值是2小时(注册表中没有显示出来,默认情况下这个值没有的),如果我想自己修改的话,就需要通过添加这个值来设置时间。
以下是通过命令设置这个值的方法:
打开CMD,输入reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters" /v KeepAliveTime /t REG_DWORD /d 300000
Best Regards,
Anne
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
你好,
那段话的意思是:
如果操作系统是Windows Vista / 2008,则TCP Keepalive“尝试次数”将被硬编码为10,并且无法通过注册表进行调整,主要指的是次数。
而KeepAliveTime控制TCP尝试通过发送一个keep-alive来验证空闲连接是否完好的频率, 主要指的中间的等待时间。
两者说的不是一个。
Best Regards,
Anne
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已编辑 Anne HeMicrosoft contingent staff, Moderator 2020年12月9日 3:16
-
你好,
那段话的意思是:
如果操作系统是Windows Vista / 2008,则TCP Keepalive“尝试次数”将被硬编码为10,并且无法通过注册表进行调整,主要指的是次数。
而KeepAliveTime控制TCP尝试通过发送一个keep-alive来验证空闲连接是否完好的频率, 主要指的中间的等待时间。
两者说的不是一个。
Best Regards,
Anne
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
谷青松
-
你好,
是的,默认是没有这个参数的,默认情况下这个值是2小时(注册表中没有显示出来,默认情况下这个值没有的),如果我想自己修改的话,就需要通过添加这个值来设置时间。
以下是通过命令设置这个值的方法:
打开CMD,输入reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters" /v KeepAliveTime /t REG_DWORD /d 300000
Best Regards,
Anne
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
谷青松
- 已编辑 谷青松 2020年12月9日 3:57 补充
-
你好,
1. KeepAliveTime中设置的值的单位是毫秒,所以,你的理解是对的,300,000是毫秒,也就是5分钟。
2. 您上面提到的那个硬编码为10这一项注意点针对的是TcpMaxDataRetransmissions这个项说的,指的是TCP在中止连接之前重传单个数据段(不是连接请求段)的次数。
Best Regards,
Anne
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
你好,
我注意到您取消标记为答案了,您是还有其他问题或疑问吗?有的话,欢迎反馈。
Best Regards,
Anne
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.