Page 1 of 1

[Bypass] Windows 10 Restrictions (Templates,CongestionProvider) etc.

Posted: Sat Apr 17, 2021 7:52 pm
by st1cky
I found a way to change the CongestionProvider and the Template and other Settings listed in TCP Stack. :eek:

My approach was simple, I Reversed the settings of Windows 10 Server and applied them to Windows 10 Pro, with success.

Normally you can change Settings with these commands, on some Windows 10 Builds(1607,1703,1709,1803,1809,1903,1909..) it will fail.

Example:

Code: Select all

Powershell:
Set-NetTCPSetting -SettingName Internet -CongestionProvider CUBIC

Netsh:
netsh int tcp set supplemental Template=Internet CongestionProvider=CUBIC
netsh int tcp set supplemental Template=(Name)
Powershell Error Example:
Image

Netsh Error Example:
Image

CongestionProvider is regulated in this way via netsh.
Image

Posted: Sat Apr 17, 2021 8:04 pm
by st1cky
AutomaticUseCustom:

Code: Select all

AutomaticUseCustom = Disabled
HKLM\System\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\28\0200 Data: B8 0B 00 00 01 00 00 00 00 00 00 00 00 00 00 00
HKLM\System\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\28\1700 Data: B8 0B 00 00 01 00 00 00 00 00 00 00 00 00 00 00

AutomaticUseCustom = Enabled
HKLM\System\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\28\0200 Data: B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00
HKLM\System\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\28\1700 Data: B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00
NetworkDirectDisable:

Code: Select all

HKLM\System\CurrentControlSet\Services\NDIS\Parameters\NetworkDirectDisable -> 1
NetworkDirectAcrossIPSubnets (Allowed)

Code: Select all

HKLM\System\CurrentControlSet\Services\NDIS\Parameters\NetworkDirectGlobalFlags -> 1
NetworkDirectAcrossIPSubnets (Blocked)

Code: Select all

HKLM\System\CurrentControlSet\Services\NDIS\Parameters\NetworkDirectGlobalFlags -> 0
Complete overview:
Image


Be aware that not all parameters can be changed.

If you see LEDBAT has been removed from the Netsh context and is only available via Powershell.
I have not yet tried to force settings via wmi.

Still, I think it might be useful. :)

Posted: Sat Apr 17, 2021 8:19 pm
by st1cky
Template is regulated in this way via netsh.

Image

Code: Select all

;;Internet 0
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\27]
"06000000"=hex:00,00,00,00,ff,ff,ff,ff

;;DataCenter 1
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\27]
"06000000"=hex:01,00,00,00,ff,ff,ff,ff

;;Compat 2
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\27]
"06000000"=hex:02,00,00,00,ff,ff,ff,ff

;;Custom 3
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\27]
"06000000"=hex:03,00,00,00,ff,ff,ff,ff

;;InternetCustom 4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\27]
"06000000"=hex:04,00,00,00,ff,ff,ff,ff

;;Automatic 7 ( Removed? )
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\27]
"06000000"=hex:07,00,00,00,ff,ff,ff,ff

Posted: Sun Apr 18, 2021 10:53 am
by Philip
Very interesting, thanks for sharing! This should be very useful for some Windows Home Builds. My current machine is: Windows 10 Pro version 20H2 Build 19042.928, so I can modify most settings via netsh/PowerShell cmdlets, but here are my keys.

In Windows 10 Pro I only have the "00000000" and "04000000" templates it seems.. Hmm. If I change the CongestionProvider via netsh (netsh int tcp set supplemental template=internet congestionprovider=ctcp), then only the "00000000" binary value changes, not the "04000000".

My HKLM.../27 key seems to be completely empty by the way ([HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\27])

So, for reference, I tried changing the CongestionProvider with other templates (using netsh), and changing the CongestionProvider of the "InternetCustom" template changes the registry value ...\26"04000000".

With the default CUBIC/Automatic congestion provider

Code: Select all

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\26]
"00000000"=hex:00,00,00,00,00,00,00,00,00,00,00,00,[color=red]05[/color],00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,ff,00,00,00,00,00,00,00

With CTCP (set via netsh, using: netsh int tcp set supplemental template=internet congestionprovider=ctcp)

Code: Select all

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\26]
"00000000"=hex:00,00,00,00,00,00,00,00,00,00,00,00,[color=red]02[/color],00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,ff,00,00,00,00,00,00,00
If the congestion provider binary value is set via the Registry Editor, reboot shows the new setting in PowerShell (using Get-NetTCPSetting -SettingName Internet)

So this seems to work great for setting congestion control provider at least, should be very useful if it works with older Windows 10 Home builds that don't allow modifying it using netsh or PowerShell.

Posted: Sun Apr 18, 2021 11:39 pm
by st1cky
I think [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\27] will only be created when using Netsh, since all these Parameters are from netsh.
Powershell uses WMI Context to change stuff.
"00000000" -> ;;Internet
"04000000" -> ;;InternetCustom

This key must be set before hand and the PC must be restarted in order to use the InternetCustom template. InternetCustom Template should then be used.

Code: Select all

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\27]
"06000000"=hex:04,00,00,00,ff,ff,ff,ff
What is even stranger is that there is no custom template in Powershell but in Netsh.
Why it might be good to change the template, because the Delayack & DelayFreq are set lower, I haven't found a way to change these 2 parameters yet. Even changing it manually via the registry does not work (Only on Server).

:)

Posted: Sun Apr 18, 2021 11:54 pm
by st1cky

Posted: Mon Apr 19, 2021 9:13 am
by Philip
I do have both Internet, and InternetCustom templates (along with: Automatic, Compat, Datacenter, DatacenterCustom) in Windows 10 Pro when listing them with PowerShell.
Trying to change CongestionProvider in PowerShell gives a "Read Only" error, so I use netsh to change the congestion provider (but not the template), and it was changing those "00000000" and "04000000" values in the "..\26" key, as in:

Code: Select all

netsh int tcp set supplemental template=internetcustom congestionprovider=cubic


In Windows 8, there was a way to change the CongestionProvider to CTCP in the following key ("...\0" instead of "...\26"):

Code: Select all

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{eb004a03-9b1a-11d4-9123-0050047759bc}\0]
"0200"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,[color=red]02[/color],00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"1700"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,[color=red]02[/color],00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
I don't remember exactly which pair, but likely the "02" is the congestion algorithm. This key also exists in Windows 10, not sure if/when it is used.

Posted: Tue Mar 29, 2022 2:44 am
by MagikMark
Is there a work around for Windows 11 Pro? I noticed these tweaks work. However, the systems removes them later on

Posted: Tue Mar 29, 2022 7:56 am
by Philip
The Registry can get updated with changes to the OS... You can create a registry file and run it at startup, or at some interval I suppose.

Posted: Tue Mar 29, 2022 4:36 pm
by MagikMark
There are 6 templates. Which one would you recommend? Shall I use all of them?

Posted: Sun Apr 03, 2022 1:04 pm
by Philip
I'd use/change the default one, use either "Internet" or "InternetCustom". Some settings are not editable in all the templates.

Posted: Wed Feb 15, 2023 3:44 pm
by erpguy2
hi Philip

I recently read this blog from here:
https://borncity.com/win/2023/02/14/microsofts-tcp-mess-how-to-optimize-in-windows-10-11/

what do you think?

Posted: Thu Feb 16, 2023 2:35 pm
by Philip
I looked over that Github script they recommend.. ( https://github.com/MysticFoxDE/WINDOWS- ... ZATION.ps1 )

It is quite extensive, it is interesting, but the optimizations are more into setting the NIC properties than tuning the TCP parameters, or choosing the TCP template. It turns off Energy Efficient Ethernet, RSS, packet coalescing, etc. It actually adds many of the recommendations from our Network Adapter tweaking article. My guess is the sheer number of tweaks it applies is more beneficial than changing the template as the article implies.