Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem reset winsock:
- netsh winsock reset
- rem reset ip/dhcp:
- netsh int ip reset
- rem reset tcp params:
- netsh int tcp reset
- rem Get the status of these tcp => netsh int tcp show global
- netsh interface tcp set global rss=enabled chimney=automatic netdma=disabled dca=disabled autotuninglevel=normal
- netsh interface tcp set global congestionprovider=none ecncapability=disabled timestamps=disabled
- netsh interface tcp set heuristics enabled
- netsh interface tcp set heuristics wsh=enabled
- rem Large Scale Offload (LSO) is buggy on a lot of NIC's. You can disable it with these commands
- netsh interface tcp set global chimney=disabled
- rem Other ip releated settings => netsh int ip show global
- netsh interface ip set global neighborcachelimit=4096
- netsh interface ip set global defaultcurhoplimit=64
- netsh interface ip set global taskoffload=enabled mediasenseeventlog=disabled
- rem [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters]
- rem "AllowUnqualifiedQuery"=dword:00000001 # allow DNS query without domain name
- rem "DefaultTTL"=dword:00000040 # 64 hops
- rem "DisableMediaSenseEventLog"=dword:00000001 # no entry in eventlog of cable (dis-)connect
- rem "DisableRss"=dword:00000000 # disable Receiver Side Scaling tcp windows
- rem "DisableTaskOffload"=dword:00000000 # disable task offloading to nic
- rem "DisableTcpChimneyOffload"=dword:00000000 # disable chimney offload
- rem "DnsOutstandingQueriesCount"=dword:000003e8 #
- rem "DnsQueryTimeouts"=REG_MULTI_SZ:"1 1 2 2 4 0" # don't wat too long for DNS server response
- rem "EnableAddrMaskReply"=dword:00000000 # dont reply to subnet pings
- rem "EnableBcastArpReply"=dword:00000000 # dont reply to arp broadcast requests
- rem "EnableConnectionRateLimiting"=dword:00000000 # bypass the limitation on half open tcp
- rem "EnableDca"=dword:00000000 # enable Direct Cache Access from nic to cpu
- rem "EnableHeuristics"=dword:00000001 # let windows tcp find optimum, works with Chimney offload
- rem "EnableIPAutoConfigurationLimits"=dword:00000000 # no auto ip from microsoft
- rem "EnableTCPA"=dword:00000000 # enable Net DMA
- rem "EnableWsd"=dword:00000000 # enable Windows Scaling Diagnostics, choppy flash video if enable!!!
- rem "IPEnableRouter"=dword:00000000 # don't discover routers
- rem "QualifyingDestinationThreshold"=dword:ffffffff # QOS no threshold
- rem "StrictTimeWaitSeqCheck"=dword:00000001 # does activate TcpTimedWaitDelay (only from win8+?)
- rem "SynAttackProtect"=dword:00000001 # protect against syn flood (DOS) attacks
- rem "Tcp1323Opts"=dword:00000001 # windows scaling (1) and timestamps (2)
- rem "TCPMaxDataRetransmissions"=dword:00000002 # limit the max nr of data retransmissions
- rem "TcpTimedWaitDelay"=dword:0000001e # wait 30 secs before closing inactive connection (StrictTimeWaitSeqCheck 1)
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v AllowUnqualifiedQuery /d 1 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v DisableMediaSenseEventLog /d 1 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v DisableRss /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v DisableTaskOffload /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v DisableTcpChimneyOffload /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v DnsOutstandingQueriesCount /d 1000 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v DnsQueryTimeouts /d "1 1 2 2 4 0" /t REG_MULTI_SZ /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v EnableAddrMaskReply /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v EnableBcastArpReply /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v EnableConnectionRateLimiting /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v EnableDca /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v EnableHeuristics /d 1 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v EnableIPAutoConfigurationLimits /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v EnableTCPA /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v EnableWsd /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v IPEnableRouter /d 0 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v QualifyingDestinationThreshold /d "0xffffffff" /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v StrictTimeWaitSeqCheck /d 1 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v SynAttackProtect /d 1 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v Tcp1323Opts /d 1 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v TCPMaxDataRetransmissions /d 2 /t REG_DWORD /f
- reg add HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters /v TcpTimedWaitDelay /d "0x0000001e" /t REG_DWORD /f
- rem [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\<UID>]
- rem "TcpAckFrequency"=dword:00000001 # def 2 outstanding ACKS. Use 5 for 100Mbit, 13 for 1Gbit network connection (1 beats timeouts Outlook)
- rem "TcpDelAckTicks"=dword:00000000 # Disable Nagling
- rem [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NDIS\Parameters]
- rem "RssBaseCpu"=dword:00000001 #
- rem "MaxNumRssCpus"=dword:00000002 # (4) (2=server, 1=workstation) Receive Side Scaling to one CPU (all cores)
- rem [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters]
- rem "FastCopyReceiveThreshold"=dword:000005dc # UDP streaming threshold 1500 bytes/s
- rem "FastSendDatagramThreshold"=dword:000005dc # UDP streaming threshold 1500 bytes/s
- rem Other settings affecting copying files with explorer over tcpip:
- reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v CopyBufferSize /d 65536 /t REG_DWORD /f
- rem [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
- rem "CopyBufferSize"=dword:00010000 # x2000-x100000 else x40000 (64 KB)
- reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\System /v CopyFileBufferedSynchronousIo /d 1 /t REG_DWORD /f
- reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\System /v CopyFileChunkSize /d "0x00004000" /t REG_DWORD /f
- reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\System /v CopyFileOverlappedCount /d "0x10" /t REG_DWORD /f
- rem [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]
- rem "CopyFileBufferedSynchronousIo"=dword:00000001 # do it synchronous
- rem "CopyFileChunkSize"=dword:00004000 # copy 16KB blocks
- rem "CopyFileOverlappedCount"=dword:00000010 # ?, 16 (0x10) works best
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement