> Source: [sk40661](https://support.checkpoint.com/results/sk/sk40661)

# sk40661 - What is the ECN (Explicit Congestion Notification) flag within a TCP header used for?

| Property | Value |
|----------|-------|
| Solution ID | sk40661 |
| Date Created | 2009-04-14 |
| Last Modified | 2019-03-27 |
| Technical Level | General |
| Products | Security Gateway |
| Versions | R82.10, R82, R81.20 |

## Solution

**Explicit Congestion Notification (ECN)** is an extension to the TCP packet as defined in RFC 3168.

**ECN allows end to end notification of network congestion without dropping packets.**

ECN must be used on both endpoints. ECN provides some level of performance improvement over a packet drop. With large bulk data transfers, the improvement is moderate, based on the difference between the packet retransmission and congestion-window adjustment.  

**ECN works as follows:**

* The initial TCP SYN handshake includes the addition of ECN-echo capability and Congestion Window Reduced (CWR) capability flags to allow each system to negotiate with its peer as to whether it will properly handle packets with the CE bit set during the data transfer.
* The sender sets the ECN Capable Transport (ECT) bit in all packets sent.
* If the sender receives a TCP packet with the ECN-echo flag set in the TCP header, the sender will adjust its congestion window, as if it had undergone fast recovery from a single lost packet.
* The next sent packet will set the TCP CWR flag, to indicate to the receiver that it has reacted to the congestion. **The additional caveat is that the sender will react in this way at most once every RTT interval. Further, TCP packets with the ECN-echo flag set will have no further effect on the sender within the same RTT interval.**
* The receiver will set the ECN-echo flag in all packets, when it receives a packet with the CE bit set. This will continue until it receives a packet with the CWR bit set, indicating that the sender has reacted to the congestion. **The ECT flag is set only in packets that contain a data payload.** TCP ACK packets that contain no data payload should be sent with the ECT bit clear.

For more information, refer to <https://en.wikipedia.org/wiki/Explicit_Congestion_Notification>

**Example:**

1. Host A is sending TCP data to host B.
2. Host A sends Segments 1 through 5.
3. Segment 2 is forwarded by an ECN-capable router that is experiencing congestion, which sets the ECN field in the IP header to 11.
4. When Host B receives this segment, it sends ACKs with the ECE flag set.
5. When Host A receives the first ACK with the ECE flag set, it lowers its transmission rate and sends its next segment (Segment 6) with the CWR flag set.
6. Upon receipt of Segment 6 with the CWR flag set, Host B sends subsequent ACKs with the ECE flag cleared.

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
