Page 1 of 1

Powershell & Networking, TCP Stack, etc

Posted: Mon Feb 15, 2016 3:43 pm
by PCgamer
I am new when it comes to powershell command lines. I wouldn't know how to adjust any TCP setting. The only bit of knowledge I know was from coming across this page from speedguide. I'm curious about the DelayedAcktimeout and how to adjust this setting, as well as others. Also does it work only if TcpDelAckTicks is enabled (eg 1-6 in registry) or does the argument still work when the registry setting entry is set to "0"?

Posted: Wed Feb 17, 2016 8:29 am
by Philip
"delayedacktimeout" is a netsh/PowerShell setting having to do with CTCP
"TcpDelAckTicks" is a registry/PowerShell setting related to Nagle's algorithm, it can be set as per the article...

Keep in mind some netsh commands are deprecated in Windows 8, and PowerShell shows both as read-only.. You can still try something like:
Set-NetTCPSetting -DelayedAckFrequency 1 -DelayedAckTimeoutMs 30 -SettingName internetcustom


Ultimately, it may be easier if you use the TCP Optimizer to adjust all those settings, it takes out all the guesswork.

Posted: Wed Feb 17, 2016 10:31 am
by PCgamer
Philip wrote:"delayedacktimeout" is a netsh/PowerShell setting having to do with CTCP
"TcpDelAckTicks" is a registry/PowerShell setting related to Nagle's algorithm, it can be set as per the article...

Keep in mind some netsh commands are deprecated in Windows 8, and PowerShell shows both as read-only.. You can still try something like:
Set-NetTCPSetting -DelayedAckFrequency 1 -DelayedAckTimeoutMs 30 -SettingName internetcustom


Ultimately, it may be easier if you use the TCP Optimizer to adjust all those settings, it takes out all the guesswork.

Thanks for the reply! I haven't used TCP Optimizer in a loooong time. I've mainly just manually edited registry settings, it's the powershell that I'm unfamiliar with. Thanks for the tips!

Are all the powershell commands I need listed on that page I linked?

Posted: Wed Feb 17, 2016 12:40 pm
by Philip
The PowerShell cmdlet above is just for reference, I think PowerShell doesn't let you change those under Windows 8.

Posted: Wed Feb 17, 2016 12:52 pm
by PCgamer
Philip wrote:The PowerShell cmdlet above is just for reference, I think PowerShell doesn't let you change those under Windows 8.
Hmm, I'm on Windows 10 and it didn't seem to change to internetcustom

Posted: Wed Feb 17, 2016 7:01 pm
by Philip
Yeah, that's what I meant, those settings in PowerShell are read-only, you'd get an error if you try to change them. Windows 8.1 and 10 have the same syntax (they both use the InternetCustom template).

The Registry setting as per the article, or the TCP Optimizer should work.

Posted: Wed Feb 17, 2016 10:00 pm
by PCgamer
Philip wrote:Yeah, that's what I meant, those settings in PowerShell are read-only, you'd get an error if you try to change them. Windows 8.1 and 10 have the same syntax (they both use the InternetCustom template).

The Registry setting as per the article, or the TCP Optimizer should work.

How do I know which template is implemented?

EDIT: I mean which command will tell me the template being used? Set-NetTCPSetting = Internetcustom, ?

Posted: Thu Feb 18, 2016 12:14 pm
by Philip
Get-NetTcpConnection , or Get-NetTransportFilter will show the currently used template.
Get-NetTcpSetting InternetCustom will show the current settings in the InternetCustom template.

Posted: Thu Feb 18, 2016 1:04 pm
by PCgamer
Philip wrote:Get-NetTcpConnection , or Get-NetTransportFilter will show the currently used template.
Get-NetTcpSetting InternetCustom will show the current settings in the InternetCustom template.

Sorry for all the elementary questions.

TransportFilter worked, under admin credentials. SettingName :Internet.

This brings up a few more questions. Is "DelayedAckFrequency" the same as any of the TCP: AckFrequency, DelAckTicks, NoDelay, settings, or does it do a totally different function? I have AckFrequency - 1, DelAckTicks - 1, and NoDelay - 1. Does those settings conflict with "DelayedAckFrequency" ???

Also "Internet" setting shows that there is CTCP for the congestion provider, but when I open command prompt and run netsh int tcp show global there is no congestion provider.

Posted: Thu Feb 18, 2016 9:27 pm
by Philip
netsh is deprecated in Windows 10 and some of the commands don't work. In theory the PowerShell cmdlet should show the correct setting. There is a registry hack in that article above (and the TCP Optimizer) that shows the correct congestion provider in netsh.

There is no conflict when using a mix of Registry/netsh/Powershell cmdlets simply because neither works 100%. The problem with Powershell cmdlets is that with every version of Windows they improve it a bit, however, there are many read-only and non-working/unchangeable settings, especially in non-server OSes. The problem with using the netsh equivalents is that they are no longer supported/updated, and some are starting to break (like setting congestion provider).

Posted: Thu Feb 18, 2016 9:50 pm
by PCgamer
Philip wrote:netsh is deprecated in Windows 10 and some of the commands don't work. In theory the PowerShell cmdlet should show the correct setting. There is a registry hack in that article above (and the TCP Optimizer) that shows the correct congestion provider in netsh.

There is no conflict when using a mix of Registry/netsh/Powershell cmdlets simply because neither works 100%. The problem with Powershell cmdlets is that with every version of Windows they improve it a bit, however, there are many read-only and non-working/unchangeable settings, especially in non-server OSes. The problem with using the netsh equivalents is that they are no longer supported/updated, and some are starting to break (like setting congestion provider).

I've tried setting a few things with no luck, afaik. Is there a way to reset things back to default, so I can just set things back to normal and just walk away from it? lol

Sorry for all the hassle and thank you for taking the time to help me and answer my questions :)

Posted: Fri Feb 19, 2016 6:18 pm
by Philip
There are instructions on how to reset TCP/IP here: http://www.speedguide.net/faq/how-to-re ... -stack-272 ... or you can use the TCP Optimizer "File" menu.

No problem, it's getting harder and less user-friendly to control these settings with newer OSes.