Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring Static and Dynamic ECN

This example shows how to enable explicit congestion notification (ECN) on an output queue.

Requirements

This example uses the following hardware and software components:

  • One device that supports ECN.

Note:

Use Feature Explorer to confirm platform and release support for static and dynamic ECN.

Overview

ECN enables end-to-end congestion notification between two endpoints on TCP/IP based networks. The two endpoints are an ECN-enabled sender and an ECN-enabled receiver. ECN must be enabled on both endpoints and on all of the intermediate devices between the endpoints for ECN to work properly. Any device in the transmission path that does not support ECN breaks the end-to-end ECN functionality

A weighted random early detection (WRED) packet drop profile must be applied to the output queues on which ECN is enabled. ECN uses the WRED drop profile thresholds to mark packets when the output queue experiences congestion.

ECN reduces packet loss by forwarding ECN-capable packets during periods of network congestion instead of dropping those packets. (TCP notifies the network about congestion by dropping packets.) During periods of congestion, ECN marks ECN-capable packets that egress from congested queues. When the receiver receives an ECN packet that is marked as experiencing congestion, the receiver echoes the congestion state back to the sender. The sender then reduces its transmission rate to clear the congestion.

ECN is disabled by default. You can enable ECN on best-effort traffic. ECN should not be enabled on lossless traffic queues, which uses priority-based flow control (PFC) for congestion notification, and ECN should not be enabled on strict-high priority traffic queues.

There are two types of ECN available: Static ECN and Dynamic ECN. Static ECN requires you to manually set the threshold levels that trigger a notification event. Dynamic ECN automatically adjusts the thresholds based on real-time conditions like queue length and traffic patterns.

To enable ECN on an output queue, you not only need to enable ECN in the queue scheduler, you also need to:

  • Configure a WRED packet drop profile.

  • Configure a queue scheduler that includes the WRED drop profile and enables ECN. (This example shows only ECN and drop profile configuration; you can also configure bandwidth, priority, and buffer settings in a scheduler.)

  • Map the queue scheduler to a forwarding class (output queue) in a scheduler map.

  • If you are using enhanced transmission selection (ETS) hierarchical scheduling, add the forwarding class to a forwarding class set (priority group).

  • If you are using ETS, associate the queue scheduler map with a traffic control profile (priority group scheduler for hierarchical scheduling).

  • If you are using ETS, apply the traffic control profile and the forwarding class set to an interface. On that interface, the output queue uses the scheduler mapped to the forwarding class, as specified by the scheduler map attached to the traffic control profile. This enables ECN on the queue and applies the WRED drop profile to the queue.

    If you are using port scheduling, apply the scheduler map to an interface. On that interface, the output queue uses the scheduler mapped to the forwarding class in the scheduler map, which enables ECN on the queue and applies the WRED drop profile to the queue.

Table 1 shows the configuration components for this example.

Table 1: Components of the ECN Configuration Example

Component

Settings

Drop profile (with two fill level/drop probability pairs)

Name: be-dpDrop start fill level: 30 percentDrop end fill level: 75 percentDrop probability at drop start (minimum drop rate): 0 percentDrop probability at drop end (maximum drop rate): 80 percent

Scheduler

Name: be-schedECN: enabledDrop profile: be-dpTransmit rate: 25%Buffer size: 25%Priority: low

Scheduler map

Name: be-mapForwarding class: best-effortScheduler: be-sched

Note:

By default, the best-effort forwarding class is mapped to output queue 0.

Forwarding class set (ETS only)

Name: be-pgForwarding class: best-effort (queue 0)

Traffic control profile (ETS only)

Name: be-tcpScheduler map: be-map

Interface (ETS only)

Name: xe-0/0/20Forwarding class set: be-pg(Output) traffic control profile: be-tcp

Interface (port scheduling only)

Name: xe-0/0/20

Note:

Only devices that support ETS hierarchical scheduling support forwarding class set and traffic control profile configuration. Direct port scheduling does not use the hierarchical scheduling structure.

Configuration

CLI Quick Configuration

To quickly configure the drop profile, scheduler with ECN enabled, and to map the scheduler to an output queue on an interface, copy the following commands, paste them in a text file, remove line breaks, change variables and details to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

ETS Quick Configuration

Port Scheduling Quick Configuration

Configuring Static ECN

Step-by-Step Procedure

To configure Static ECN:

  1. Configure the WRED packet drop profile be-dp. This example uses a drop start point of 30 percent, a drop end point of 75 percent, a minimum drop rate of 0 percent, and a maximum drop rate of 80 percent:

  2. Create the scheduler be-sched with ECN enabled and associate the drop profile be-dp with the scheduler:

  3. Map the scheduler be-sched to the best-effort forwarding class (output queue 0) using scheduler map be-map:

  4. If you are using ETS, add the forwarding class best-effort to the forwarding class set be-pg; if you are using direct port scheduling, skip this step:

  5. If you are using ETS, associate the scheduler map be-mapwith the traffic control profile be-tcp; if you are using direct port scheduling, skip this step:

  6. If you are using ETS, associate the traffic control profile be-tcp and the forwarding class set be-pg with the interface on which you want to enable ECN on the best-effort queue:

    If you are using direct port scheduling, associate the scheduler map be-map with the interface on which you want to enable ECN on the best-effort queue:

Configuring Dynamic ECN

Step-by-Step Procedure

To configure Dynamic ECN:

  1. Follow the steps to configure Static ECN.

  2. Enable the Dynamic ECN profile:

    Floor and offset values range from 0 to 524287.

    Floor and offset values do not need to be configured. If no value is selected, the maximum value of 524287 will be selected by default.

  3. Assign the Dynamic ECN profile to an interface:

Verification

Verifying That ECN Is Enabled

Purpose

Verify that ECN is enabled in the scheduler be-sched by showing the configuration for the scheduler map be-map.

Action

Display the scheduler map configuration using the operational mode command show class-of-service scheduler-map be-map:

Meaning

The show class-of-service scheduler-map operational command shows the configuration of the scheduler associated with the scheduler map and the forwarding class mapped to that scheduler. The output shows that:

  • The scheduler associated with the scheduler map is be-sched.

  • The scheduler map applies to the forwarding class best-effort (output queue 0).

  • The scheduler be-sched has a transmit rate of 25 percent, a queue buffer size of 25 percent, and a drop priority of low.

  • Explicit congestion notification state is enable.

  • The WRED drop profile used for low drop priority traffic is be-dp.