要关闭 Windows 的传递优化功能,可以在批处理中运行以下命令:
查询
PS C:\Users\Administrator> netsh interface tcp show global
查询活动状态...
TCP 全局参数
----------------------------------------------
接收方缩放状态 : enabled
接收窗口自动调节级别 : normal
加载项拥塞控制提供程序 : default
ECN 功能 : enabled
RFC 1323 时间戳 : allowed
初始 RTO : 1000
接收段合并状态 : enabled
非 Sack Rtt 复原 : disabled
最大 SYN 重新传输次数 : 4
快速打开 : disabled
快速打开回退 : enabled
HyStart : enabled
比例费率降低 : enabled
节奏配置文件 : off
要关闭 Windows 的传递优化功能,可以在批处理中运行以下命令:
netsh interface tcp set global autotuninglevel=disabled
这个命令将禁用 Windows 中的 TCP/IP 自动调整。这样可以解决一些网络连接问题,比如连接速度变慢、连接不稳定等。
如果需要重新启用传递优化功能,可以运行以下命令:
netsh interface tcp set global autotuninglevel=normal
需要注意的是,修改此设置可能会对您的网络连接产生影响,因此请谨慎操作并在操作前备份您的数据。
PS C:\Users\Administrator> Get-NetTCPSetting
SettingName : Automatic
MinRto(ms) :
InitialCongestionWindow(MSS) :
CongestionProvider :
CwndRestart :
DelayedAckTimeout(ms) :
DelayedAckFrequency :
MemoryPressureProtection :
AutoTuningLevelLocal :
AutoTuningLevelGroupPolicy :
AutoTuningLevelEffective :
EcnCapability :
Timestamps :
InitialRto(ms) :
ScalingHeuristics :
DynamicPortRangeStartPort :
DynamicPortRangeNumberOfPorts :
AutomaticUseCustom :
NonSackRttResiliency :
ForceWS :
MaxSynRetransmissions :
AutoReusePortRangeStartPort :
AutoReusePortRangeNumberOfPorts :
SettingName : InternetCustom
MinRto(ms) : 300
InitialCongestionWindow(MSS) : 10
CongestionProvider : CUBIC
CwndRestart : False
DelayedAckTimeout(ms) : 40
DelayedAckFrequency : 2
MemoryPressureProtection : Enabled
AutoTuningLevelLocal : Normal
AutoTuningLevelGroupPolicy : NotConfigured
AutoTuningLevelEffective : Local
EcnCapability : Enabled
Timestamps : Allowed
InitialRto(ms) : 1000
ScalingHeuristics : Disabled
DynamicPortRangeStartPort : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom : Disabled
NonSackRttResiliency : Disabled
ForceWS : Enabled
MaxSynRetransmissions : 4
AutoReusePortRangeStartPort : 0
AutoReusePortRangeNumberOfPorts : 0
SettingName : DatacenterCustom
MinRto(ms) : 60
InitialCongestionWindow(MSS) : 10
CongestionProvider : CUBIC
CwndRestart : False
DelayedAckTimeout(ms) : 10
DelayedAckFrequency : 2
MemoryPressureProtection : Enabled
AutoTuningLevelLocal : Normal
AutoTuningLevelGroupPolicy : NotConfigured
AutoTuningLevelEffective : Local
EcnCapability : Enabled
Timestamps : Allowed
InitialRto(ms) : 1000
ScalingHeuristics : Disabled
DynamicPortRangeStartPort : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom : Disabled
NonSackRttResiliency : Disabled
ForceWS : Enabled
MaxSynRetransmissions : 4
AutoReusePortRangeStartPort : 0
AutoReusePortRangeNumberOfPorts : 0
SettingName : Compat
MinRto(ms) : 300
InitialCongestionWindow(MSS) : 4
CongestionProvider : NewReno
CwndRestart : False
DelayedAckTimeout(ms) : 200
DelayedAckFrequency : 2
MemoryPressureProtection : Enabled
AutoTuningLevelLocal : Normal
AutoTuningLevelGroupPolicy : NotConfigured
AutoTuningLevelEffective : Local
EcnCapability : Enabled
Timestamps : Allowed
InitialRto(ms) : 1000
ScalingHeuristics : Disabled
DynamicPortRangeStartPort : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom : Disabled
NonSackRttResiliency : Disabled
ForceWS : Enabled
MaxSynRetransmissions : 4
AutoReusePortRangeStartPort : 0
AutoReusePortRangeNumberOfPorts : 0
SettingName : Datacenter
MinRto(ms) : 60
InitialCongestionWindow(MSS) : 10
CongestionProvider : CUBIC
CwndRestart : False
DelayedAckTimeout(ms) : 10
DelayedAckFrequency : 2
MemoryPressureProtection : Enabled
AutoTuningLevelLocal : Normal
AutoTuningLevelGroupPolicy : NotConfigured
AutoTuningLevelEffective : Local
EcnCapability : Enabled
Timestamps : Allowed
InitialRto(ms) : 1000
ScalingHeuristics : Disabled
DynamicPortRangeStartPort : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom : Disabled
NonSackRttResiliency : Disabled
ForceWS : Enabled
MaxSynRetransmissions : 4
AutoReusePortRangeStartPort : 0
AutoReusePortRangeNumberOfPorts : 0
SettingName : Internet
MinRto(ms) : 300
InitialCongestionWindow(MSS) : 10
CongestionProvider : CUBIC
CwndRestart : False
DelayedAckTimeout(ms) : 40
DelayedAckFrequency : 2
MemoryPressureProtection : Enabled
AutoTuningLevelLocal : Normal
AutoTuningLevelGroupPolicy : NotConfigured
AutoTuningLevelEffective : Local
EcnCapability : Enabled
Timestamps : Allowed
InitialRto(ms) : 1000
ScalingHeuristics : Disabled
DynamicPortRangeStartPort : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom : Disabled
NonSackRttResiliency : Disabled
ForceWS : Enabled
MaxSynRetransmissions : 4
AutoReusePortRangeStartPort : 0
AutoReusePortRangeNumberOfPorts : 0
在PowerShell中,等效的命令可以是:
Set-NetTCPSetting -SettingName "InternetCustom" -AutoTuningLevel Disabled
这将禁用TCP自动调整。