White paper: Optimising your broadband connection

Status
Not open for further replies.

Osiris

Golden Master
Messages
36,817
Location
Kentucky
Although Windows XP and Windows 2000 are significantly better at handling diverse network connection types, the operating system is geared towards ethernet-style networks rather than modems or broadand internet connections.

Broadband connections, in particular, can prove a little tricky. Although they feature sustained transfer speed, latency can still be an issue, especially for people who play games online. These tweaks can help improve performance of your broadband connection. They are suitable for applying even if your broadband connection is routed over ethernet to a standalone router.

To optimise your broadband connection

Please note that many of these registry hacks involve calculations based upon the core TCP protocol - itself a complicated thing. We've suggested a recommended value for each change listed, but these may need tuning for your particular connection.

Use a registry editing tool to navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ Tcpip\Parameters

TCP Window Size
The size of the TCP Window is represented in the registry by a DWORD value with a range of 0 through 230 (1073741824). For the best results, the TCP Window should be a multiple of the MSS. The MSS is generally the MTU minus 40 bytes, where the MTU is the largest packet size that can be transmitted on the network. The MTU is usually 1500, though PPPoE connections have an MTU of 1492.

To set the TCP Window Size:

Insert or change a value with the following details:
Data Type:DWORD
Value Name:GlobalMaxTcpWindowSize
Value:256960
The valid range is from the value of the MSS through 230.
To create a custom value, follow the rules below:

Calculate a scale factor for the MTU so the result is less than 65535: e.g.: 1460 * 44 = 64240.
Multiply the result of the previous calculation by a factor of two: e.g.: 64240 * 22 = 256960
If you choose to use a TCP Windows size lower than 65535, then simply make it a multiple of the MSS and turn scaling off (see below).
RFC 1323 Options
RFC 1323 define TCP Large Window Support. Previously, TCP Windows were limited to 65535 bytes. Following the adoption of the standards laid down in RFC 1323, this limit was raised to 230 bytes. Microsoft first supported TCP Large Window sizes in Windows 98 with the introduction of Winsock version 2. RFC 1323 also allows for timestamping of individual packets.

To set RFC 1323 options

Insert or change a value with the following details:
Data Type:DWORD
Value Name:Tcp1323Opts
Value:1
The possible settings are:
0: Disable RFC 1323 Options
1: Enable TCP Window scaling, but do not enable timestamping
2: Enable timestamping but not TCP Window scaling
3: Enable TCP Window scaling and timestamping
If you suffer from packet loss, setting the Tcp1323Opts value to 3 may help, but will decrease overall performance as timestamping adds 12 bytes to each packet header

Default TTL
The default TTL determines the time in seconds and the number of hops that a packet lives. Whilst this setting does not directly affect speed, setting the value too high can cause delays as it increases the amount of time before a packet is considered lost and setting the value too low could mean that packets never reach distant servers at all.

To set the default TTL

Insert or change a value with the following details:
Data Type:DWORD
Value Name:DefaultTTL
Value:64
Maximum Transmission Unit Discovery
Windows can be set to either us a fixed MTU value or attempt to discover the network's actual MTU. By discovering the Path MTU and limiting TCP segments to this size, TCP can eliminate fragmentation at routers connecting networks with different MTUs. Fragmentation reduces TCP throughput and increases network congestion.

To enable MTU Discovery

Insert or change a value with the following details:
Data Type:DWORD
Value Name:EnablePMTUDiscovery
Value:1
Note: Although this value is not present in the registry, Windows 2000 and above perform Path MTU discovery by default.

Black Hole Router Discovery
If when communicating over a network, one intermediary segment has a lower MTU than the segment preceeding it and the segment fails to send the approriate ICMP response, communications can fail. The segment that creates this problem is sometimes refered to as a black hole router.

Windows can attempt to identify black hole router when trying to establish MTU discovery. When enabled, the TCP stack recognises when it has transmitted the same segment several times without response. If this condition is triggered, Windows reduces the MSS to 536 bytes and sets the Don't-Fragment bit. If this results is the segment responding, TCP continues this behaviour on all subsequent connections.

Whilst this function can improve connection reliability, it will adversely affect all communications that are not routed via the at-fault segment.

To disable black hole router discovery

Insert or change a value with the following details:
Data Type:DWORD
Value Name:EnablePMTUBHDetect
Value:0
Note: Although this value is not present in the registry, Windows 2000 and above do not perform black hole router discovery by default.

Selective Acknowledgements
SACKs as defined in RFC 2018, are important when using large TCP windows. SACKs lets the client acknowledge receipt of individual blocks of data in a continuous sequence, rather than just the last sequence number. The client can identify if data is missing from the middle of the sequence and request just the missing data, rather than triggering the resend of the whole sequence.

To enable Selective Acknowledgements

Insert or change a value with the following details:
Data Type:DWORD
Value Name:SackOpts
Value:1
Note: Although this value is not present in the registry, Windows 2000 and above utilise Selective Acknowledgements by default.

Duplicate Acknowledgements
Should duplicate ACKs be received for the same sequence numbers, the system will transmit a signal to force the sender to resend the segment in question.

When data arrives with a sequence number that is greater than expected, the receiver assumes that data with the expected number was dropped, and it immediately sends an ACK with the ACK number set to the expected sequence number. The receiver sends ACKs set to the same missing number each time it receives a TCP segment that has a sequence number greater than expected. The sender recognizes the duplicate ACKs and sends the missing segment.

To specify how many duplicate Acknowledgements need to received

Insert or change a value with the following details:
Data Type:DWORD
Value Name:TcpMaxDupAcks
Value:2
Acceptable range: 1 through 3
Note: Although this value is not present in the registry, Windows 2000 and above trigger a fast resend with after receipt of two duplicate acknowledgements.

Sponsored Links
Registry Settings Summary
Key NameHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Value NameGlobalMaxTcpWindowSize
Value TypeREG_DWORD
Value Data0x0003EBC0
Key NameHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Value NameTcp1323Opts
Value TypeREG_DWORD
Value Data0x00000001
Key NameHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Value NameDefaultTTL
Value TypeREG_DWORD
Value Data0x00000040
Key NameHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Value NameEnablePMTUDiscovery
Value TypeREG_DWORD
Value Data0x00000001
Key NameHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Value NameEnablePMTUBHDetect
Value TypeREG_DWORD
Value Data0x00000000
Key NameHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Value NameSackOpts
Value TypeREG_DWORD
Value Data0x00000001
Key NameHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Value NameTcpMaxDupAcks
Value TypeREG_DWORD
Value Data0x00000002
[download]
 
Status
Not open for further replies.
Back
Top Bottom