Windows Server 2012 is the first Windows Server version to enable Explicit Congestion Notification, or ECN, in the TCP stack. This is also known as ECN Capability. Explicit Congestion Notification is an extension to the Internet Protocol and to the Transmission Control Protocol and is defined in RFC 3168. ECN allows end-to-end notification of network congestion without dropping packets.
ECN is an optional feature that may be used between two ECN-enabled endpoints when the underlying network infrastructure also supports it. Unfortunately, having one ECN Capability enabled endpoint may slow down outbound network connections to outdated network equipment.
Outdated network equipment dropping packets that have ECN bits set
Unfortunately, rather than responding properly or ignoring the bits, some outdated or faulty network equipment drop packets that have ECN bits set. This slows down your outbound connections, because packets need to be retransmitted without ECN bits. As retransmission intervals increase, it may take up to 10 seconds before a connection is made.
Until most network equipment supports ECN bits in packets, my advise is to disable ECN on Windows Server 2012 (R2) server. This is easily done with netsh
:
Disable Windows Server Explicit Congestion Notification (ECN) capabilities
You may choose to disable Explicit Congestion Notification support on Windows Server 2012 if you experience slow outbound connections. Connections with up to a 10 second delay. Here is how to disable ECN Capability using netsh
. A reboot is not required.
- First verify ECN Capability is enabled. Look for "Enabled" in the command output from
netsh interface tcp show global
- Second, if ECN Capability is enabled, you can disable it:
netsh interface tcp set global ecncapability=disabled
A reboot is not required.
Enjoy your fast(er) outbound connections from now on!
A note on Windows TCP AutoTuningLevel:
Like all modern operating systems Windows has receive window auto-tuning to dynamically adjust the receive buffer size to the throughput and latency of the link. Disabling this feature will definitely limit your Internet speeds. Auto-tuning is consistent throughout all variants of TCP and present in all modern operating systems.
Read An Update on Windows TCP AutoTuningLevel (Wayback Machine archived link) for more information.
Reset TCP parameters and re-enable ECN
You can use the following netsh
command to reset all TCP parameters to their default values:
netsh interface tcp reset
Or if you just wish to re-enable ECN:
netsh interface tcp set global ecncapability=enabled