ON THIS PAGE
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.
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.
Component |
Settings |
---|---|
Drop profile (with two fill level/drop probability pairs) |
Name: |
Scheduler |
Name: |
Scheduler map |
Name: Note:
By default, the |
Forwarding class set (ETS only) |
Name: |
Traffic control profile (ETS only) |
Name: |
Interface (ETS only) |
Name: |
Interface (port scheduling only) |
Name: |
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
[edit class-of-service] set drop-profile be-dp interpolate fill-level 30 fill-level 75 drop-probability 0 drop-probability 80 set schedulers be-sched explicit-congestion-notification set schedulers be-sched drop-profile-map loss-priority low protocol any drop-profile be-dp set schedulers be-sched transmit-rate percent 25 set schedulers be-sched buffer-size percent 25 set schedulers be-sched priority low set scheduler-maps be-map forwarding-class best-effort scheduler be-sched set forwarding-class-sets be-pg class best-effort set traffic-control-profiles be-tcp scheduler-map be-map set interfaces xe-0/0/20 forwarding-class-set be-pg output-traffic-control-profile be-tcp
Port Scheduling Quick Configuration
[edit class-of-service] set drop-profile be-dp interpolate fill-level 30 fill-level 75 drop-probability 0 drop-probability 80 set schedulers be-sched explicit-congestion-notification set schedulers be-sched drop-profile-map loss-priority low protocol any drop-profile be-dp set schedulers be-sched transmit-rate percent 25 set schedulers be-sched buffer-size percent 25 set schedulers be-sched priority low set scheduler-maps be-map forwarding-class best-effort scheduler be-sched set interfaces xe-0/0/20 scheduler-map be-map
Configuring Static ECN
Step-by-Step Procedure
To configure Static ECN:
Configure the WRED packet drop profile
be-dp
. This example uses a drop start point of30
percent, a drop end point of75
percent, a minimum drop rate of0
percent, and a maximum drop rate of80
percent:[edit class-of-service] user@switch# set drop-profile be-dp interpolate fill-level 30 fill-level 75 drop-probability 0 drop-probability 80
Create the scheduler
be-sched
with ECN enabled and associate the drop profilebe-dp
with the scheduler:[edit class-of-service] user@switch# set schedulers be-sched explicit-congestion-notification user@switch# set schedulers be-sched drop-profile-map loss-priority low protocol any drop-profile be-dp user@switch# set be-sched transmit-rate percent 25 user be-sched transmit-rate percent 25 user@switch# set be-sched buffer-size percent 25 user@switch# set be-sched buffer-size percent 25 user@switch# set be-sched priority low
Map the scheduler
be-sched
to thebest-effort
forwarding class (output queue 0) using scheduler mapbe-map
:[edit class-of-service] user@switch# set scheduler-maps be-map forwarding-class best-effort scheduler be-sched
If you are using ETS, add the forwarding class
best-effort
to the forwarding class setbe-pg
; if you are using direct port scheduling, skip this step:[edit class-of-service] user@switch# set forwarding-class-sets be-pg class best-effort
If you are using ETS, associate the scheduler map
be-map
with the traffic control profilebe-tcp
; if you are using direct port scheduling, skip this step:[edit class-of-service] user@switch# set traffic-control-profiles be-tcp scheduler-map be-map
If you are using ETS, associate the traffic control profile
be-tcp
and the forwarding class setbe-pg
with the interface on which you want to enable ECN on the best-effort queue:[edit class-of-service] user@switch# set interfaces xe-0/0/20 forwarding-class-set be-pg output-traffic-control-profile be-tcp
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:[edit class-of-service] user@switch# set interfaces xe-0/0/20 scheduler-map be-map
Configuring Dynamic ECN
Step-by-Step Procedure
To configure Dynamic ECN:
Follow the steps to configure Static ECN.
Enable the Dynamic ECN profile:
[edit class-of-service] user@switch# set decn-profile profile-name queue queue number floor floor value offset offset value
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.
Assign the Dynamic ECN profile to an interface:
[edit class-of-service] user@switch# set interfaces interface decn-profile profile-name
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
:
user@switch> show class-of-service scheduler-map be-map
Scheduler map: be-map, Index: 12240
Scheduler:be-sched, Forwarding class: best-effort, Index: 115
Transmit rate: 25 percent, Rate Limit: none, Buffer size: 25 percent,
Buffer Limit: none, Priority: low
Excess Priority: unspecified, Explicit Congestion Notification: enable
ECN Type: static/dynamic Offset offset-value Floor floor-value
Drop profiles:
Loss priority Protocol Index Name
Low any 3312 be-dp
Medium-high any 1 <default-drop-profile>
High any 1 <default-drop-profile>
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 of25
percent, a queue buffer size of25
percent, and a drop priority oflow
.Explicit congestion notification state is
enable
.The WRED drop profile used for low drop priority traffic is
be-dp
.