Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
 

Related Documentation

 

Example: Configuring Queue Schedulers

Schedulers define the CoS properties of output queues. These properties include the amount of interface bandwidth assigned to the queue, the priority of the queue, whether explicit congestion notification (ECN) is enabled on the queue, and the WRED packet drop profiles associated with the queue.

Requirements

This example uses the following hardware and software components:

  • Juniper Networks QFX3500 Switch
  • Junos OS Release 11.1 or later for the QFX Series

Overview

Scheduler parameters define the following characteristics for the queues mapped to the scheduler:

  • transmit-rate—Minimum bandwidth, also known as the committed information rate (CIR). Each queue mapped to the scheduler receives a minimum of either the configured amount of absolute bandwidth or the configured percentage of bandwidth. The transmit rate also determines the amount of excess (extra) priority group bandwidth that the queue can share. Extra priority group bandwidth is allocated among the queues in the priority group in proportion to the transmit rate of each queue. You cannot configure a transmit rate for strict-high priority queues. Queues (forwarding classes) with a configured transmit rate cannot be included in a forwarding class set that has strict-high priority queues.

    Note: The transmit-rate setting works only if you also configure the guaranteed-rate in the traffic control profile that is attached to the forwarding class set to which the queue belongs. If you do not configure the guaranteed-rate, the transmit-rate does not work. The sum of all queue transmit rates in a forwarding class set should not exceed the traffic control profile guaranteed rate. If you configure transmit rates whose sum exceeds the forwarding class set guaranteed rate, the commit check fails, and the system rejects the configuration.

    Note: Include the preamble bytes and interframe gap bytes as well as the data bytes in your bandwidth calculations.

  • shaping-rate—Maximum bandwidth, also known as the peak information rate (PIR). Each queue receives a maximum of the configured amount of absolute bandwidth or the configured percentage of bandwidth, even if more bandwidth is available.

    Note: Include the preamble bytes and interframe gap bytes as well as the data bytes in your bandwidth calculations.

  • priority—One of two bandwidth priorities that queues associated with a scheduler can receive:
    • low—The scheduler has low priority.
    • strict-high—The scheduler has strict-high priority. You can configure only one queue as a strict-high priority queue. Strict-high priority allocates the scheduled bandwidth to the queue before any other queue receives bandwidth. Other queues receive the bandwidth that remains after the strict-high queue has been serviced.

      We recommend that you always apply a shaping rate to strict-high priority queues to prevent them from starving other queues. If you do not apply a shaping rate to limit the amount of bandwidth a strict-high priority queue can use, then the strict-high priority queue can use all of the available port bandwidth and starve other queues on the port.

  • drop-profile-map—Mapping of a drop profile to a loss priority and protocol to apply WRED to the scheduler.
  • buffer-size—Size of the queue buffer as a percentage of the dedicated buffer space on the port, or as a proportional share of the dedicated buffer space on the port that remains after the explicitly configured queues are served.
  • explicit-congestion-notification—Enables ECN on a best-effort queue. ECN enables end-to-end congestion notification between two ECN-enabled endpoints on TCP/IP based networks. ECN must be enabled on both endpoints and on all of the intermediate devices between the endpoints for ECN to work properly. ECN is disabled by default.

Note: Ingress port congestion can occur during periods of egress port congestion if an ingress port forwards traffic to more than one egress port, and at least one of those egress ports experiences congestion. If this occurs, the congested egress port can cause the ingress port to exceed its fair allocation of ingress buffer resources. When the ingress port exceeds its buffer resource allocation, frames are dropped at the ingress. Ingress port frame drop affects not only the congested egress ports, but also all of the egress ports to which the congested ingress port forwards traffic.

If a congested ingress port drops traffic that is destined for one or more uncongested egress ports, configure a weighted random early detection (WRED) drop profile and apply it to the egress queue that is causing the congestion. The drop profile prevents the congested egress queue from affecting egress queues on other ports by dropping frames at the egress instead of causing congestion at the ingress port.

Note: Do not configure drop profiles for the fcoe and no-loss forwarding classes. FCoE and other lossless traffic queues require lossless behavior. Use priority-based flow control (PFC) to prevent frame drop on lossless priorities.

Scheduler maps associate schedulers with forwarding classes (queues). After defining schedulers and mapping them to queues in a scheduler map, to configure hardware queue scheduling (port scheduling) you:

  1. Associate a scheduler map with a traffic control profile (a traffic control profile schedules resources for a group of forwarding classes, called a forwarding class set or priority group).
  2. Attach a forwarding class and a traffic control profile to an interface.

You can associate up to four user-defined scheduler maps with forwarding class sets.

This process configures the hardware queues, packet schedulers, and WRED characteristics that operate according to the scheduler mapping. The traffic control profile uses the scheduler CoS properties to determine the resources that should be allocated to the individual output queues from the total resources available to the priority group.

Table 1 shows the configuration components for this example.

Table 1: Components of the Queue Scheduler Configuration Example

Component

Settings

Hardware

QFX3500 switch

Scheduler

Name: be-sched
Transmit rate: 20%
Shaping rate: 40%
Buffer size: 20%
Priority: low
Drop profile: be-dp
ECN: disable (default)

Scheduler map

Name: be-map
Forwarding class to associate with the be-sched scheduler: best-effort

Traffic control profile

Name: be-tcp

Note: This topic does not describe how to define a traffic control profile.

Forwarding class set

Name: lan-pg

Configuring a CoS Scheduler

To configure a CoS scheduler using the CLI:

  1. Create a scheduler (be-sched) with a minimum guaranteed bandwidth of 2 Gbps, a maximum bandwidth of 4 Gbps, low priority, and map it to the drop profile be-dp:
    [edit class-of-service schedulers]
    user@switch# set be-sched transmit-rate percent 20
    user@switch# set be-sched shaping-rate percent 40
    user@switch# set be-sched buffer-size percent 20
    user@switch# set be-sched priority low
    user@switch# set be-sched drop-profile-map loss-priority low protocol any drop-profile be-dp

    Note: Because ECN is disabled by default, no ECN configuration is shown.


  2. Configure a scheduler map (be-map) that associates the scheduler (be-sched) with the forwarding class (best-effort):
    [edit class-of-service scheduler-maps]
    user@switch# set be-map forwarding-class best-effort scheduler be-sched


  3. Associate the scheduler map be-map with a traffic control profile (be-tcp):
    [edit class-of-service traffic-control-profiles]
    user@switch# set be-tcp scheduler-map be-map


  4. Associate the traffic control profile be-tcp with a forwarding class set (lan-pg) and a 10-Gigabit Ethernet interface (xe-0/0/7):
    [edit class-of-service]
    user@switch# set interfaces xe-0/0/7 forwarding-class-set lan-pg output-traffic-control-profile be-tcp


  5. Alternatively, you can assign the scheduler map (be-map) to all the 10-Gigabit Ethernet interfaces using wildcards (xe-*):
    [edit class-of-service interfaces]
    user@switch# set xe-* forwarding-class-set lan-pg output-traffic-control-profile be-tcp

Verification

To verify that the queue scheduler has been created and is mapped to the correct interfaces, perform these tasks:

Verifying the Scheduler Configuration

Purpose

Verify that the queue scheduler be-sched has been created with a minimum guaranteed bandwidth of 2 Gbps, a maximum bandwidth of 4 Gbps, the priority set to low, and the drop profile be-dp.

Action

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

user@switch> show configuration class-of-service schedulers be-sched
transmit-rate percent 20;
shaping-rate percent 40;
buffer-size percent 20
priority low;
drop-profile-map loss-priority low protocol any drop-profile be-dp;

Verifying the Scheduler Map Configuration

Purpose

Verify that the scheduler map be-map has been created and associates the forwarding class best-effort with the scheduler be-sched, and also that the scheduler map is attached to the traffic control profile be-tcp.

Action

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

user@switch> show configuration class-of-service scheduler-maps be-map
forwarding-class best-effort scheduler be-sched;


Display the traffic control profile to verify that the scheduler map be-map is attached using the operational mode command show configuration class-of-service traffic-control-profiles be-tcp scheduler-map:

user@switch> show configuration class-of-service traffic-control-profiles be-tcp scheduler-map
scheduler-map be-map;

Note: This topic does not describe how to configure a traffic control profile or its allocation of port bandwidth. Using a traffic control profile to configure the port resource allocation to the priority group is necessary to implement hierarchical scheduling.

Verifying That the Scheduler Is Associated with the Interface

Purpose

Verify that the forwarding class set (lan-pg) and the traffic control profile (be-tcp) that are associated with the queue scheduler are attached to the interface xe-0/0/7.

Action

List the interface using the operational mode command show configuration class-of-service interfaces xe-0/0/7:

user@switch> show configuration class-of-service interfaces xe-0/0/7
forwarding-class-set {
    lan-pg {
        output-traffic-control-profile be-tcp;
    }
}
 

Related Documentation

 

Published: 2014-07-23

Supported Platforms

 

Related Documentation

 

Published: 2014-07-23