Enable ECN

ECN (Explicit congestion notification) is a means to signal congestion without dropping packets. It uses 2 bits in
the IP packet header that can be modified by routers along the path. A “2” in this field indicates that the protocol
on the other side (usually TCP) is prepared to respond to congestion notifications, and a “3” observed in this field
means that congestion occured and the other side of the link should take action.

See Stuart Cheshire and Dave Taht’s presentation at ietf 89

for some tcp trace analysis of how ECN works and can smooth delivery of tcp data under congestion.

Enabling ECN does not much good unless both hosts on the path have it enabled, and the congested router on the path is running SQM and supports ECN. But see above for how good the end result can be…

Many servers do support ECN negotiation already, but few clients do.

Enabling ECN on OSX

sudo sysctl -w net.inet.tcp.ecn_initiate_out=1  
sudo sysctl -w net.inet.tcp.ecn_negotiate_in=1  

To make the settings persistent,
 put the following lines in /etc/sysctl.conf:

net.inet.tcp.ecn_initiate_out=1

net.inet.tcp.ecn_negotiate_in=1

Enabling ECN on Windows

netsh interface tcp set global ecncapability=enabled

Enabling ECN on Linux

sudo sysctl -w net.ipv4.tcp_ecn=1   

Like Mac OS X, to make setting persistent,
 add line in /etc/sysctl.conf

Using ECN in CeroWrt

All the interfaces have ECN enabled by default for most queues. It is disabled for the wireless voice queue (better to lose a packet than suffer extra delay).

In CeroWrt, at least, is presently recommended that ECN be disabled on low bandwidth links, and enabled for high bandwidth ones. Thus the SQM system in CeroWrt, typically used in scenarios where there is a high rate down and a slow rate up, enables ECN asymmetrically by default - ECN is on on the high speed down, and off on the slow speed up.

To edit this page, submit a pull request to the Github repository.
RSS feed

Recent News & Articles

Feb 10, 2017 Wiki page
What to do about Bufferbloat?
Feb 10, 2017 Wiki page
More about Bufferbloat
Dec 27, 2016 Wiki page
RRUL Chart Explanation
Jul 4, 2016 Wiki page
Getting SQM Running Right

Find us elsewhere

Bufferbloat Mailing Lists
#bufferbloat on Twitter
Google+ group
Archived Bufferbloat pages from the Wayback Machine

Sponsors

Comcast Research Innovation Fund
Nlnet Foundation
Shuttleworth Foundation
GoFundMe

Bufferbloat Related Projects

Congestion Control Blog
Lede Project (OpenWrt)
Flent Network Test Suite
Sqm-Scripts
The Cake shaper
AQMs in BSD
IETF AQM WG

Network Performance Related Resources


Jim Gettys' Blog - The chairman of the Fjord
Toke's Blog - Karlstad University's work on bloat
Voip Users Conference - Weekly Videoconference mostly about voip
Candelatech - A wifi testing company that "gets it".