Server Man
Well-Known Member
- May 17, 2015
- Windows 10
- Edge 17.17134
There is buzz on the IT Blogs & Boards that LEDBAT isn’t working as advertised on Windows Server 2016 and up – this is easily explained and is the result of a misconfiguration that is also easily remedied.
The symptoms of the misconfiguration are that LEDBAT gets stuck in a slow transfer mode and will not recover unless you restart the connection. In other words, it does not leverage the unused bandwidth that is available on the network. If your LEDBAT connections are experiencing really low throughput even though there is bandwidth available this is probably the reason.
The problem has to do with TCP templates. In order to work properly, LEDBAT has to be configured using the InternetCustom template. In the misconfiguration LEDBAT is configured using the DatacenterCustom template. The good news is that there is a simple way to check your configuration as well as an easy fix.
There are two powershell commands used to configure LEDBAT. Set-NetTCPSettings and New-NetTransportFilter. The NetTCPSetting is used to configure the InternetCustom template for LEDBAT and the NetTransportFilter is used to guide LEDBAT connections into the InternetCustom template.
NetTransportFilters use IP address and port numbers to guide connections to a template. SCCM uses ports 80 and 443 so let’s use those for an example. Go ahead and try it out. Open an elevated powershell window and type Get-NetTransportFilter.
PS C:Usersdahavey> Get-NetTransportFilter
SettingName : Automatic
Protocol : TCP
LocalPortStart : 0
LocalPortEnd : 65535
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
SettingName : DatacenterCustom <-- Bad configuration, should be InternetCustom
Protocol : TCP
LocalPortStart : 443
LocalPortEnd : 443
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
SettingName : DatacenterCustom <-- Bad configuration, should be InternetCustom
Protocol : TCP
LocalPortStart : 80
LocalPortEnd : 80
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
The first thing we see is that the server is misconfigured for SCCM (port 80 and port 443). Do you see where the output says SettingName: DatacenterCustom? Those should say SettingName: InternetCustom. This LEDBAT is probably unable to leverage unused bandwidth because of this bad configuration.
Cool, now we are getting somewhere! Let’s take a look at those templates next. Go ahead and try it:
PS C:Usersdahavey> Get-NetTCPSetting | Select Settingname, CongestionProvider
Settingname CongestionProvider
----------- ------------------
Automatic
InternetCustom CTCP <-- Bad configuration, should be LEDBAT
DatacenterCustom LEDBAT <-- Bad configuration, should be CTCP (WS2016) or Cubic (WS2019)
Compat NewReno
Datacenter DCTCP
Internet CTCP
Once again, the server is misconfigured. DatacenterCustom template is configured for LEDBAT and InternetCustom template is configured for CTCP (the old default).
Now all we have to do is fix it! First let’s remove the bad NetTransportFilters:
### Remove DatacenterCustom filters
PS C:Usersdahavey> Remove-NetTransportFilter -SettingName DatacenterCustom
Confirm
Are you sure you want to perform this action?
Performing operation "Remove" on Target "NetTransportFilter -SettingName DatacenterCustom -Protocol TCP -DestinationPrefix *
-LocalPortStart 443 -LocalPortEnd 443 -RemotePortStart 0 -RemotePortEnd 65535"
[Y] Yes [A] Yes to All [N] No [L] No to All Suspend [?] Help (default is "Y"): y
Confirm
Are you sure you want to perform this action?
Performing operation "Remove" on Target "NetTransportFilter -SettingName DatacenterCustom -Protocol TCP -DestinationPrefix *
-LocalPortStart 80 -LocalPortEnd 80 -RemotePortStart 0 -RemotePortEnd 65535"
[Y] Yes [A] Yes to All [N] No [L] No to All Suspend [?] Help (default is "Y"): y
Let’s have a look and see how it worked!
PS C:Usersdahavey> Get-NetTransportFilter
SettingName : Automatic
Protocol : TCP
LocalPortStart : 0
LocalPortEnd : 65535
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
Good work! The bad configuration is gone. Now let’s replace it with a good configuration. Here we go:
PS C:Usersdahavey> New-NetTransportFilter -SettingName InternetCustom -Protocol TCP -LocalPortStart 443 -LocalPortEnd 443 -RemotePortStart 0 -RemotePortEnd 65535
SettingName : InternetCustom <-- Good configuration
Protocol : TCP
LocalPortStart : 443
LocalPortEnd : 443
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
PS C:Usersdahavey> New-NetTransportFilter -SettingName InternetCustom -Protocol TCP -LocalPortStart 80 -LocalPortEnd 80 -RemotePortStart 0 -RemotePortEnd 65535
SettingName : InternetCustom <-- Good configuration
Protocol : TCP
LocalPortStart : 80
LocalPortEnd : 80
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
Looking good! We have the NetTransportFilters correctly configured. Let’s just verify that:
PS C:Usersdahavey> Get-NetTransportFilter
SettingName : Automatic <-- Don’t worry about this configuration
Protocol : TCP
LocalPortStart : 0
LocalPortEnd : 65535
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
SettingName : InternetCustom <-- Good configuration
Protocol : TCP
LocalPortStart : 443
LocalPortEnd : 443
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
SettingName : InternetCustom <-- Good configuration
Protocol : TCP
LocalPortStart : 80
LocalPortEnd : 80
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
Beautiful! Our NetTransportFilters are looking good! Now let’s take a look at those templates.
PS C:Usersdahavey> Set-NetTCPSetting -SettingName InternetCustom -CongestionProvider LEDBAT
PS C:Usersdahavey> Set-NetTCPSetting -SettingName DatacenterCustom -CongestionProvider Cubic
PS C:Usersdahavey> Get-NetTCPSetting -SettingName DatacenterCustom, InternetCustom | Select Settingname, CongestionProvider
Settingname CongestionProvider
----------- ------------------
InternetCustom LEDBAT
DatacenterCustom CTCP <-- Or Cubic if you are using WS2019
Now we are correctly configured for LEDBAT on SCCM! Happy LEDBATing !
Continue reading...
The symptoms of the misconfiguration are that LEDBAT gets stuck in a slow transfer mode and will not recover unless you restart the connection. In other words, it does not leverage the unused bandwidth that is available on the network. If your LEDBAT connections are experiencing really low throughput even though there is bandwidth available this is probably the reason.
The problem has to do with TCP templates. In order to work properly, LEDBAT has to be configured using the InternetCustom template. In the misconfiguration LEDBAT is configured using the DatacenterCustom template. The good news is that there is a simple way to check your configuration as well as an easy fix.
There are two powershell commands used to configure LEDBAT. Set-NetTCPSettings and New-NetTransportFilter. The NetTCPSetting is used to configure the InternetCustom template for LEDBAT and the NetTransportFilter is used to guide LEDBAT connections into the InternetCustom template.
NetTransportFilters use IP address and port numbers to guide connections to a template. SCCM uses ports 80 and 443 so let’s use those for an example. Go ahead and try it out. Open an elevated powershell window and type Get-NetTransportFilter.
PS C:Usersdahavey> Get-NetTransportFilter
SettingName : Automatic
Protocol : TCP
LocalPortStart : 0
LocalPortEnd : 65535
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
SettingName : DatacenterCustom <-- Bad configuration, should be InternetCustom
Protocol : TCP
LocalPortStart : 443
LocalPortEnd : 443
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
SettingName : DatacenterCustom <-- Bad configuration, should be InternetCustom
Protocol : TCP
LocalPortStart : 80
LocalPortEnd : 80
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
The first thing we see is that the server is misconfigured for SCCM (port 80 and port 443). Do you see where the output says SettingName: DatacenterCustom? Those should say SettingName: InternetCustom. This LEDBAT is probably unable to leverage unused bandwidth because of this bad configuration.
*** Don’t worry about the automatic template and certainly don’t delete it! If you have read my tutorial on TCP Templates then you already know that this template is used to switch between Datacenter and Internet.
Cool, now we are getting somewhere! Let’s take a look at those templates next. Go ahead and try it:
PS C:Usersdahavey> Get-NetTCPSetting | Select Settingname, CongestionProvider
Settingname CongestionProvider
----------- ------------------
Automatic
InternetCustom CTCP <-- Bad configuration, should be LEDBAT
DatacenterCustom LEDBAT <-- Bad configuration, should be CTCP (WS2016) or Cubic (WS2019)
Compat NewReno
Datacenter DCTCP
Internet CTCP
Once again, the server is misconfigured. DatacenterCustom template is configured for LEDBAT and InternetCustom template is configured for CTCP (the old default).
Now all we have to do is fix it! First let’s remove the bad NetTransportFilters:
### Remove DatacenterCustom filters
PS C:Usersdahavey> Remove-NetTransportFilter -SettingName DatacenterCustom
Confirm
Are you sure you want to perform this action?
Performing operation "Remove" on Target "NetTransportFilter -SettingName DatacenterCustom -Protocol TCP -DestinationPrefix *
-LocalPortStart 443 -LocalPortEnd 443 -RemotePortStart 0 -RemotePortEnd 65535"
[Y] Yes [A] Yes to All [N] No [L] No to All
Confirm
Are you sure you want to perform this action?
Performing operation "Remove" on Target "NetTransportFilter -SettingName DatacenterCustom -Protocol TCP -DestinationPrefix *
-LocalPortStart 80 -LocalPortEnd 80 -RemotePortStart 0 -RemotePortEnd 65535"
[Y] Yes [A] Yes to All [N] No [L] No to All
Let’s have a look and see how it worked!
PS C:Usersdahavey> Get-NetTransportFilter
SettingName : Automatic
Protocol : TCP
LocalPortStart : 0
LocalPortEnd : 65535
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
Good work! The bad configuration is gone. Now let’s replace it with a good configuration. Here we go:
PS C:Usersdahavey> New-NetTransportFilter -SettingName InternetCustom -Protocol TCP -LocalPortStart 443 -LocalPortEnd 443 -RemotePortStart 0 -RemotePortEnd 65535
SettingName : InternetCustom <-- Good configuration
Protocol : TCP
LocalPortStart : 443
LocalPortEnd : 443
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
PS C:Usersdahavey> New-NetTransportFilter -SettingName InternetCustom -Protocol TCP -LocalPortStart 80 -LocalPortEnd 80 -RemotePortStart 0 -RemotePortEnd 65535
SettingName : InternetCustom <-- Good configuration
Protocol : TCP
LocalPortStart : 80
LocalPortEnd : 80
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
Looking good! We have the NetTransportFilters correctly configured. Let’s just verify that:
PS C:Usersdahavey> Get-NetTransportFilter
SettingName : Automatic <-- Don’t worry about this configuration
Protocol : TCP
LocalPortStart : 0
LocalPortEnd : 65535
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
SettingName : InternetCustom <-- Good configuration
Protocol : TCP
LocalPortStart : 443
LocalPortEnd : 443
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
SettingName : InternetCustom <-- Good configuration
Protocol : TCP
LocalPortStart : 80
LocalPortEnd : 80
RemotePortStart : 0
RemotePortEnd : 65535
DestinationPrefix : *
Beautiful! Our NetTransportFilters are looking good! Now let’s take a look at those templates.
PS C:Usersdahavey> Set-NetTCPSetting -SettingName InternetCustom -CongestionProvider LEDBAT
PS C:Usersdahavey> Set-NetTCPSetting -SettingName DatacenterCustom -CongestionProvider Cubic
PS C:Usersdahavey> Get-NetTCPSetting -SettingName DatacenterCustom, InternetCustom | Select Settingname, CongestionProvider
Settingname CongestionProvider
----------- ------------------
InternetCustom LEDBAT
DatacenterCustom CTCP <-- Or Cubic if you are using WS2019
Now we are correctly configured for LEDBAT on SCCM! Happy LEDBATing !
Continue reading...