Supported Platforms
Related Documentation
- QFabric System, QFX Series standalone switches
- Example: Configuring Queue Schedulers
- Example: Configuring WRED Drop Profiles
- Example: Configuring Forwarding Class Sets
- Example: Configuring Traffic Control Profiles (Priority Group Scheduling)
- Example: Configuring CoS Hierarchical Port Scheduling (ETS)
- QFX Series standalone switches
- Understanding CoS Explicit Congestion Notification
Example: Configuring 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 Juniper Networks QFX Series switch
- Junos OS Release 13.2X51-D25 or later for the QFX Series
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.
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).
- Add the forwarding class to a forwarding class set (priority group, for hierarchical scheduling).
- Associate the queue scheduler with a traffic control profile (priority group scheduler for hierarchical scheduling).
- Apply the traffic control profile and the forwarding class set to an interface. On that interface, the specified output queue (the queue mapped to the forwarding class) uses the scheduler that is mapped to the traffic control profile, 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 |
---|---|
Hardware | QFX Series switch |
Drop profile | Name: be-dp |
Scheduler | Name: be-sched |
Scheduler map | Name: be-map Note: By default, the best-effort forwarding class is mapped to output queue 0. |
Forwarding class set | Name: be-pg |
Traffic control profile | Name: be-tcp |
Interface | Name: xe-0/0/20 |
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:
[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 shaping-rate
percent 50
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
Configuring ECN
Step-by-Step Procedure
To configure ECN using the CLI:
- 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:
[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 profile be-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@switch# set be-sched shaping-rate percent 50
user@switch# set be-sched buffer-size percent 25
user@switch# set be-sched priority low - Map the scheduler be-sched to the best-effort forwarding class (output queue 0) using scheduler map be-map:
[edit class-of-service]
user@switch# set scheduler-maps be-map forwarding-class best-effort scheduler be-sched - Add the forwarding class best-effort to the
forwarding class set be-pg:
[edit class-of-service]
user@switch# set forwarding-class-sets be-pg class best-effort - Associate the scheduler map be-mapwith the
traffic control profile be-tcp:
[edit class-of-service]
user@switch# set traffic-control-profiles be-tcp scheduler-map be-map - 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:
[edit class-of-service]
user@switch# set interfaces xe-0/0/20 forwarding-class-set be-pg output-traffic-control-profile be-tcp
Verification
To verify that ECN is enabled, perform the following task:
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 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 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.
Related Documentation
- QFabric System, QFX Series standalone switches
- Example: Configuring Queue Schedulers
- Example: Configuring WRED Drop Profiles
- Example: Configuring Forwarding Class Sets
- Example: Configuring Traffic Control Profiles (Priority Group Scheduling)
- Example: Configuring CoS Hierarchical Port Scheduling (ETS)
- QFX Series standalone switches
- Understanding CoS Explicit Congestion Notification
Published: 2014-07-23
Supported Platforms
Related Documentation
- QFabric System, QFX Series standalone switches
- Example: Configuring Queue Schedulers
- Example: Configuring WRED Drop Profiles
- Example: Configuring Forwarding Class Sets
- Example: Configuring Traffic Control Profiles (Priority Group Scheduling)
- Example: Configuring CoS Hierarchical Port Scheduling (ETS)
- QFX Series standalone switches
- Understanding CoS Explicit Congestion Notification