Windows如何决定将哪个设置/模板(Internet与数据中心)应用于TCP连接?

Windows如何决定将哪个设置/模板(Internet与数据中心)应用于TCP连接?,windows,networking,tcp,retransmit-timeout,Windows,Networking,Tcp,Retransmit Timeout,为了全局配置最小RTO;延迟确认超时;Windows 7及以上版本下的拥塞算法等应该使用网络TCP模板。 要查看可以使用Get-NetTCSetting powershell cmdlet的内容,请执行以下操作: PS C:\Users\Administrator> Get-NetTCPSetting (...) SettingName : Datacenter MinRto(ms) : 20 InitialCo

为了全局配置最小RTO;延迟确认超时;Windows 7及以上版本下的拥塞算法等应该使用网络TCP模板。 要查看可以使用Get-NetTCSetting powershell cmdlet的内容,请执行以下操作:

PS C:\Users\Administrator> Get-NetTCPSetting

(...)

SettingName                   : Datacenter
MinRto(ms)                    : 20
InitialCongestionWindow(MSS)  : 4
CongestionProvider            : DCTCP
CwndRestart                   : True
DelayedAckTimeout(ms)         : 10
MemoryPressureProtection      : Enabled
AutoTuningLevelLocal          : Normal
AutoTuningLevelGroupPolicy    : NotConfigured
AutoTuningLevelEffective      : Local
EcnCapability                 : Enabled
Timestamps                    : Disabled
InitialRto(ms)                : 3000
ScalingHeuristics             : Disabled
DynamicPortRangeStartPort     : 49152
DynamicPortRangeNumberOfPorts : 16384

SettingName                   : Internet
MinRto(ms)                    : 300
InitialCongestionWindow(MSS)  : 4
CongestionProvider            : CTCP
CwndRestart                   : False
DelayedAckTimeout(ms)         : 50
MemoryPressureProtection      : Enabled
AutoTuningLevelLocal          : Normal
AutoTuningLevelGroupPolicy    : NotConfigured
AutoTuningLevelEffective      : Local
EcnCapability                 : Enabled
Timestamps                    : Disabled
InitialRto(ms)                : 3000
ScalingHeuristics             : Disabled
DynamicPortRangeStartPort     : 49152
DynamicPortRangeNumberOfPorts : 16384
为了获得应用于它们的单个连接和设置,可以使用get-NetTCPConnection cmdlet:

PS C:\Users\Administrator> Get-NetTCPConnection

LocalAddress                        LocalPort RemoteAddress                       RemotePort State       AppliedSetting
------------                        --------- -------------                       ---------- -----       --------------
(...)
192.168.75.69                       63220     192.168.75.66                       1433       Established Datacenter
192.168.75.69                       63208     192.168.75.61                       445        Established Internet
192.168.101.13                      63061     185.97.X.X                          20467      Established Datacenter
192.168.101.13                      63059     209.191.X.X                         18083      Established Internet
(...)
我如何影响(或至少如何影响)互联网与数据中心TCP设置的选择?
我们有几个低延迟连接,我们希望通过数据中心设置来处理这些连接(以加快从通信故障中恢复),但我仍然不想盲目地将其应用于所有连接。

应用于给定连接的设置配置文件基于匹配的传输筛选器。默认情况下,只有一个过滤器将
自动设置配置文件应用于所有连接,这就是为什么您的连接看起来是随机的

PS C:\> Get-NetTransportFilter

SettingName       : Automatic
Protocol          : TCP
LocalPortStart    : 0
LocalPortEnd      : 65535
RemotePortStart   : 0
RemotePortEnd     : 65535
DestinationPrefix : *
cmdlet允许您根据端口号或IP地址将连接映射到特定配置文件

你可以用像

New-NetTransportFilter -SettingName Datacenter -DestinationPrefix 192.168.75.0/24


有没有办法在非服务器版本的WIndows(如WIndows Enterprise)上执行此操作?我们有一些工作站有同样的需求,但上面的命令在非服务器上被阻止。你是如何告诉工作站应该使用不同的模板(而不是“internet”)调整某些连接的?直到最近,我一直在我的工作站机器上运行Windows Server,但现在我使用的是Windows 10,我明白你的意思了
New NetTransportFilter:此功能仅在服务器上可用。
有趣的是,默认过滤器设置的是
Internet
配置文件,而不是
Automatic
,即使其他配置文件已定义。我不知道有什么办法可以绕过这个问题。我也在努力解决这个问题,并发表了文章
New-NetTransportFilter -SettingName DataCenter -LocalPortStart 0 -LocalPortEnd 65536 -RemotePortStart 1433 -RemotePortEnd 1433