Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Example: Configuring Queue Schedulers for Port Scheduling

 

Schedulers define the CoS properties of output queues. You configure CoS properties in a scheduler, then map the scheduler to a forwarding class. Forwarding classes are in turn mapped to output queues. Classifiers map incoming traffic into forwarding classes based on IEEE 802.1p, DSCP, or EXP code points. CoS scheduling 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:

  • One QFX10000 switch.

  • Junos OS Release 15.1X53-D10 or later for the QFX Series

Overview

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

The parameters you configure in a scheduler define the following characteristics for the queues mapped to the scheduler:

  • priority—One of three bandwidth priorities that queues associated with a scheduler can receive:

    • low—The scheduler has low priority.

    • high—The scheduler has high priority. High priority traffic takes precedence over low priority traffic.

    • strict-high—The scheduler has strict-high priority. Strict-high priority queues receive preferential treatment over low-priority queues and receive all of their configured bandwidth before low-priority queues are serviced. Low-priority queues do not transmit traffic until strict-high priority queues are empty.

      Note

      We strongly recommend that you configure a transmit rate on all strict-high priority queues to limit the amount of traffic the switch treats as strict-high priority traffic and prevent strict-high priority queues from starving other queues on the port. This is especially important if you configure more than one strict-high priority queue on a port. If you do not configure a transmit rate to limit the amount of bandwidth strict-high priority queues can use, then the strict-high priority queues can use all of the available port bandwidth and starve other queues on the port.

      The switch treats traffic in excess of the transmit rate as best-effort traffic that receives bandwidth from the leftover (excess) port bandwidth pool. On strict-high priority queues, all traffic that exceeds the transmit rate shares in the port excess bandwidth pool based on the strict-high priority excess bandwidth sharing weight of “1”, which is not configurable. The actual amount of extra bandwidth that traffic exceeding the transmit rate receives depends on how many other queues consume excess bandwidth and the excess rates of those queues.

  • transmit-rate—Minimum guaranteed bandwidth, also known as the committed information rate (CIR), set as a percentage rate or as an absolute value in bits per second. By default, the transmit rate also determines the amount of excess (extra) port bandwidth the queue can share if you do not explicitly configure an excess rate. Extra bandwidth is allocated among the queues on the port in proportion to the transmit rate of each queue. On queues that are not strict-high priority queues, you can configure a transmit rate as exact, which shapes the transmission by setting the transmit rate as the maximum bandwidth the queue can consume on the port.

    On strict-high priority queues, the transmit rate sets the amount of bandwidth used for strict-high priority forwarding; traffic in excess of the transmit rate is treated as best-effort traffic that receives the queue excess rate.

    Note

    Include the preamble bytes and interframe gap (IFG) bytes as well as the data bytes in your bandwidth calculations.

  • excess-rate—Percentage of extra bandwidth (bandwidth that is not used by other queues) a low-priority queue can receive. If not set, the switch uses the transmit rate to determine extra bandwidth sharing. You cannot set an excess rate on a strict-high priority queue.

  • drop-profile-map—Drop profile mapping to a packet loss priority to apply WRED to the scheduler and control packet drop for different packet loss priorities during periods of congestion.

  • 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—ECN enable 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

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 map schedulers to forwarding classes, and forwarding classes are mapped to output queues. After you configure schedulers and map them to forwarding classes in a scheduler map, you attach the scheduler map to an interface to implement the configured scheduling on output queues on that interface.

This process configures the bandwidth properties, scheduling, priority, and WRED characteristics that you map to forwarding classes (and thus to output queues) in a scheduler map.

Table 1 shows the configuration components for this example.

Table 1: Components of the Port Output Queue Scheduler Configuration Example

Component

Settings

Hardware

One switch

Scheduler

Name: be-sched

Transmit rate: 20%

Buffer size: 20%

Excess rate: 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

Configuring a CoS Scheduler

CLI Quick Configuration

To quickly configure a queue scheduler, 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 schedulers be-sched transmit-rate percent 20

set schedulers be-sched buffer-size percent 20

set schedulers be-sched excess-rate percent 20

set schedulers be-sched priority low

set schedulers be-sched drop-profile-map loss-priority low protocol any drop-profile be-dp

set scheduler-maps be-map forwarding-class best-effort scheduler be-sched

set interfaces xe-0/0/7 scheduler-map be-map

To configure a CoS scheduler:

  1. Create scheduler (be-sched) 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 buffer-size percent 20

    user@switch# set be-sched excess-rate 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 scheduler map (be-map) to associate 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 with an interface to apply scheduling to the best-effort forwarding class output queue:
    [edit class-of-service]

    set interfaces xe-0/0/7 scheduler-map be-map

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 (transmit-rate) of 2 Gbps, an extra bandwidth sharing rate (excess-rate) of 20 percent, 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

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.

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



Verifying That the Scheduler Is Associated with the Interface

Purpose

Verify that the scheduler map be-sched is attached to 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