Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Example: Configuring Class-of-Service Schedulers on a Security Device

date_range 02-Feb-21

This example shows how to configure CoS schedulers on a device.

Requirements

Before you begin, determine the buffer size allocation method to use. See Scheduler Buffer Size Overview.

Overview

An individual device interface has multiple queues assigned to store packets temporarily before transmission. To determine the order in which to service the queues, the device uses a round-robin scheduling method based on priority and the queue's weighted round-robin (WRR) credits. Junos OS schedulers allow you to define the priority, bandwidth, delay buffer size, rate control status, and RED drop profiles to be applied to a particular queue for packet transmission.

You configure schedulers to assign resources, priorities, and drop profiles to output queues. By default, only queues 0 and 3 have resources assigned.

Note:

Juniper Network devices support hierarchical schedulers, including per-unit schedulers.

In this example, you configure a best-effort scheduler called be-scheduler. You set the priority as low and the buffer size to 40. You set the be-scheduler transmit-rate remainder percentage to 40. You configure an expedited forwarding scheduler called ef-scheduler and set the priority as high and the buffer size to 10. You set the ef-scheduler transmit-rate remainder percentage to 50.

Then you configure an assured forwarding scheduler called af-scheduler and set the priority as high and buffer size to 45. You set an assured forwarding scheduler transmit rate to 45. You then configure a drop profile map for assured forwarding as low and high priority. (DiffServ can have a RED drop profile associated with assured forwarding.)

Finally, you configure a network control scheduler called nc-scheduler and set the priority as low and buffer size to 5. You set a network control scheduler transmit rate to 5.

Table 1 shows the schedulers created in this example.

Table 1: Sample Schedulers

Scheduler

For CoS Traffic Type

Assigned Priority

Allocated Portion of Queue Buffer

Allocated Portion of Remainder (Transmit Rate)

be-scheduler

Best-effort traffic

Low

40 percent

40 percent

ef-scheduler

Expedited forwarding traffic

High

10 percent

50 percent

af-scheduler

Assured forwarding traffic

High

45 percent

nc-scheduler

Network control traffic

Low

5 percent

Configuration

Procedure

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from the configuration mode.

content_copy zoom_out_map
set class-of-service schedulers be-scheduler  priority low buffer-size percent 40
set class-of-service schedulers be-scheduler  transmit-rate remainder 40 
set class-of-service schedulers  ef-scheduler  priority high buffer-size percent 10 
set class-of-service schedulers ef-scheduler  transmit-rate remainder 50 
set class-of-service schedulers  af-scheduler  priority high buffer-size percent 45 
set class-of-service schedulers  af-scheduler  transmit-rate percent 45 
set class-of-service schedulers  af-scheduler  drop-profile-map loss-priority low protocol any drop-profile af-normal 
set class-of-service schedulers  af-scheduler  drop-profile-map loss-priority high protocol any drop-profile af-with-PLP 
set class-of-service schedulers nc-scheduler  priority low buffer-size percent 5
set class-of-service schedulers nc-scheduler  transmit-rate percent 5 

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.

To configure CoS schedulers:

  1. Configure a best-effort scheduler.

    content_copy zoom_out_map
    [edit]
    user@host# edit class-of-service schedulers be-scheduler
    
  2. Specify a best-effort scheduler priority and buffer size.

    content_copy zoom_out_map
    [edit class-of-service schedulers be-scheduler]
    user@host# set priority low
    user@host# set buffer-size percent 40
    
  3. Configure a remainder option for a best-effort scheduler transmit rate.

    content_copy zoom_out_map
    [edit class-of-service schedulers be-scheduler]
    user@host# set transmit-rate remainder 40
    
  4. Configure an expedited forwarding scheduler.

    content_copy zoom_out_map
    [edit]
    user@host# edit class-of-service schedulers ef-scheduler
    
  5. Specify an expedited forwarding scheduler priority and buffer size.

    content_copy zoom_out_map
    [edit class-of-service schedulers ef-scheduler]
    user@host# set priority high
    user@host# set buffer-size percent 10
    
  6. Configure a remainder option for an expedited forwarding scheduler transmit rate.

    content_copy zoom_out_map
    [edit class-of-service schedulers ef-scheduler]
    user@host# set transmit-rate remainder 50
    
  7. Configure an assured forwarding scheduler.

    content_copy zoom_out_map
    [edit]
    user@host# edit class-of-service schedulers af-scheduler
    
  8. Specify an assured forwarding scheduler priority and buffer size.

    content_copy zoom_out_map
    [edit class-of-service schedulers af-scheduler]
    user@host# set priority high
    user@host# set buffer-size percent 45
    
  9. Configure an assured forwarding scheduler transmit rate.

    content_copy zoom_out_map
    [edit class-of-service schedulers af-scheduler]
    user@host# set transmit-rate percent 45
    
  10. Configure a drop profile map for assured forwarding low and high priority.

    content_copy zoom_out_map
    [edit class-of-service schedulers af-scheduler]
    user@host# set drop-profile-map loss-priority low protocol any drop-profile af-normal
    user@host# set drop-profile-map loss-priority high protocol any drop-profile af-with-PLP
    
  11. Configure a network control scheduler.

    content_copy zoom_out_map
    [edit]
    user@host# edit class-of-service schedulers nc-scheduler
    
  12. Specify a network control scheduler priority and buffer size.

    content_copy zoom_out_map
    [edit class-of-service schedulers nc-scheduler]
    user@host# set priority low
    user@host# set buffer-size percent 5
    
  13. Configure a network control scheduler transmit rate.

    content_copy zoom_out_map
    [edit class-of-service schedulers nc-scheduler]
    user@host# set transmit-rate percent 5
    

Results

From configuration mode, confirm your configuration by entering the show class-of-service command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

content_copy zoom_out_map
[edit]
    user@host# show class-of-service
    schedulers {
    be-scheduler {
        transmit-rate remainder 40;
        buffer-size percent 40;
        priority low;
    }
    ef-scheduler {
        transmit-rate remainder 50;
        buffer-size percent 10;
        priority high;
    }
    af-scheduler {
        transmit-rate percent 45;
        buffer-size percent 45;
        priority high;
        drop-profile-map loss-priority low protocol any drop-profile af-normal;
        drop-profile-map loss-priority high protocol any drop-profile af-with-PLP;
    }
    nc-scheduler {
        transmit-rate percent 5;
        buffer-size percent 5;
        priority low;
    }
}

If you are done configuring the device, enter commit from configuration mode.

Verification

Verifying Schedulers Configuration

Purpose

Verify that the schedulers are configured properly.

Action

From operational mode, enter the show class-of-service command.

footer-navigation