WRED discards packets and that is one way for the router to indicate a congestion. Routers will be now able to indicate a congestion condition by signaling it with an approach called Explicit Congestion Notification (ECN).

ECN uses the two last bits in the TOS to indicate whether a device is ECN capable , and if so, whether congestion is experienced.

  • If the bit combination is 00 , then the router means that it is not ECN capable .
  • If the bit combination is 01 or 10 , then the router means that it is ECN capable and is not experiencing congestion
  • If the bit combination is 11 , then the router means that it is ECN capable and is currently experiencing congestion

The 7th bit is the ECT bit and the 8th bit is the CE bit.

Cisco routers can use ECN as an extension to WRED and mark packets that exceed a specified value , instead of dropping the packets. So if the queue depth is at or below the WRED minimum threshold, the packets are sent normally,  just as with WRED.

Also if the queue depth is above the WRED maximum threshold, all packets are dropped , just as with WRED.

But if the queue depth is currently in the range between the minimum and the maximum threshold, one of the following action can happen:

  • If both endpoints are ECN capable , ECT and CE bits are set to 1 and sent to the destination, indicating that the transmission rate should be reduced.
  • If neither endpoints support ECN, the normal WRED behaviour occurs.
  • A packet with its ECN and CE bits marked can reach a destination router that has already a full queue. In such an instance, the notification is dropped.

To activate ECN , use the following command under the policy-map : random-detect ecn ( so it is applied under the MQC but you can apply it also under the interface)