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.
123456789101112131415161718192021222324 PS C:Usersdahavey> Get-NetTransportFilterSettingName : AutomaticProtocol : TCPLocalPortStart : 0LocalPortEnd : 65535RemotePortStart : 0RemotePortEnd : 65535DestinationPrefix : *<strong>SettingName : DatacenterCustom <-- Bad configuration, should be InternetCustom</strong>Protocol : TCPLocalPortStart : 443LocalPortEnd : 443RemotePortStart : 0RemotePortEnd : 65535DestinationPrefix : *<strong>SettingName : DatacenterCustom <--</strong><strong> Bad configuration, should be InternetCustom</strong>Protocol : TCPLocalPortStart : 80LocalPortEnd : 80RemotePortStart : 0RemotePortEnd : 65535DestinationPrefix : *
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:
12345678910 PS C:Usersdahavey> Get-NetTCPSetting | Select Settingname, CongestionProviderSettingname CongestionProvider----------- ------------------Automatic<strong>InternetCustom CTCP <--</strong><strong> Bad configuration, should be LEDBAT</strong><strong>DatacenterCustom LEDBAT <--</strong><strong> Bad configuration, should be CTCP (WS2016) or Cubic (WS2019)</strong>Compat NewRenoDatacenter DCTCPInternet 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:
1234567891011121314 ### Remove DatacenterCustom filtersPS C:Usersdahavey> Remove-NetTransportFilter -SettingName DatacenterCustomConfirmAre 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 [S] Suspend [?] Help (default is "Y"): yConfirmAre 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 [S] Suspend [?] Help (default is "Y"): y
Let’s have a look and see how it worked!
123456789 PS C:Usersdahavey> Get-NetTransportFilterSettingName : AutomaticProtocol : TCPLocalPortStart : 0LocalPortEnd : 65535RemotePortStart : 0RemotePortEnd : 65535DestinationPrefix : *
Good work! The bad configuration is gone. Now let’s replace it with a good configuration. Here we go:
1234567891011121314151617181920 PS C:Usersdahavey> New-NetTransportFilter -SettingName InternetCustom -Protocol TCP -LocalPortStart 443 -LocalPortEnd 443 -RemotePortStart 0 -RemotePortEnd 65535<strong>SettingName : InternetCustom <--</strong><strong> Good configuration</strong>Protocol : TCPLocalPortStart : 443LocalPortEnd : 443RemotePortStart : 0RemotePortEnd : 65535DestinationPrefix : *PS C:Usersdahavey> New-NetTransportFilter -SettingName InternetCustom -Protocol TCP -LocalPortStart 80 -LocalPortEnd 80 -RemotePortStart 0 -RemotePortEnd 65535<strong>SettingName : InternetCustom <--</strong><strong> Good configuration</strong>Protocol : TCPLocalPortStart : 80LocalPortEnd : 80RemotePortStart : 0RemotePortEnd : 65535DestinationPrefix : *
Looking good! We have the NetTransportFilters correctly configured. Let’s just verify that:
12345678910111213141516171819202122232425 PS C:Usersdahavey> Get-NetTransportFilter<strong>SettingName : Automatic <--</strong><strong> Don’t worry about this configuration</strong>Protocol : TCPLocalPortStart : 0LocalPortEnd : 65535RemotePortStart : 0RemotePortEnd : 65535DestinationPrefix : *<strong>SettingName : InternetCustom <--</strong><strong> Good configuration</strong>Protocol : TCPLocalPortStart : 443LocalPortEnd : 443RemotePortStart : 0RemotePortEnd : 65535DestinationPrefix : *<strong>SettingName : InternetCustom <--</strong><strong> Good configuration</strong>Protocol : TCPLocalPortStart : 80LocalPortEnd : 80RemotePortStart : 0RemotePortEnd : 65535DestinationPrefix : *
Beautiful! Our NetTransportFilters are looking good! Now let’s take a look at those templates.
12345678 PS C:Usersdahavey> Set-NetTCPSetting -SettingName InternetCustom -CongestionProvider LEDBATPS C:Usersdahavey> Set-NetTCPSetting -SettingName DatacenterCustom -CongestionProvider CubicPS C:Usersdahavey> Get-NetTCPSetting -SettingName DatacenterCustom, InternetCustom | Select Settingname, CongestionProviderSettingname CongestionProvider----------- ------------------<strong>InternetCustom LEDBAT</strong><strong>DatacenterCustom CTCP <-- Or Cubic if you are using WS2019</strong>
Now we are correctly configured for LEDBAT on SCCM! Happy LEDBATing !