RFC 3168: ECN: Signalling congestion without packet loss
Summary
In September 2001, Ramakrishnan, Sally Floyd and David Black specified Explicit Congestion Notification, ECN for short, in RFC 3168. Routers with active queue management can use it to mark impending congestion in two bits of the IP header instead of dropping packets, and TCP reports the mark back to the sender using its own flags. The scheme reduces latency and loss but took almost two decades until it was switched on widely.
Mark instead of drop
Classic TCP only learns about congestion by losing packets. RFC 3168 uses two bits in the former Type of Service field: Not-ECT for traffic without ECN, ECT(0) and ECT(1) for ECN-capable senders, and CE for Congestion Experienced. A router with active queue management such as RED sets CE when its queue fills up.
The receiver reports the mark back with the new TCP flag ECN-Echo, the sender reacts as if to a loss and halves its congestion window, at most once per round trip, and confirms this with the flag CWR. Both sides negotiate ECN during connection setup.
The long road into practice
For many years faulty middleboxes interfered by dropping packets with ECN bits set or aborting connections that negotiated ECN. Operating systems therefore long enabled ECN only when the other side requested it.
RFC 8087 summarised the benefits in 2017, RFC 8311 relaxed the rules for experiments in 2018, and L4S according to RFC 9330 from 2023 uses ECT(1) for very low latency. ECN has thus gone from a niche feature to the basis of modern congestion control.
Ideas
- Routers mark impending congestion instead of dropping packets.
- Two IP bits distinguish Not-ECT, ECT(0), ECT(1) and CE.
- TCP reports marks back with ECE and confirms with CWR.
- The sender reacts to CE as if to a packet loss.
- ECN requires active queue management in routers.
- Both endpoints must negotiate ECN.
Insights
- Packet loss is an expensive signal; an explicit mark saves retransmissions and waiting time.
- New bits in old headers often fail not because of the standard but because of devices relying on undefined behaviour.
Facts
- RFC 3168 appeared in September 2001 and replaces RFC 2481 from January 1999.
- ECN uses two bits in the IP header and two flags in the TCP header.
- RFC 8311 from January 2018 relaxes restrictions on ECN experiments.
- L4S according to RFC 9330 from January 2023 builds on ECT(1).
References
- RFC 3168: The Addition of Explicit Congestion Notification (ECN) to IP
- RFC 8087: The Benefits of Using ECN (2017)
- RFC 8311: Relaxing Restrictions on ECN Experimentation (2018)
- RFC 9330: Low Latency, Low Loss, and Scalable Throughput (L4S) (2023)
Remarks
- On Linux, net.ipv4.tcp_ecn controls the behaviour; the default value 2 accepts ECN when the other side requests it but does not request it itself.
Recommendations
- Enable ECN on your own servers and check with captures whether paths leave the bits unchanged.
- Use active queue management such as fq_codel or CAKE with ECN marking on routers.
- For latency problems under load, measure queueing delay, not just throughput.
Read the RFC at the RFC Editor
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.