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 Priority Scheduling

date_range 26-Jan-21

This example shows how to configure priority scheduling so important traffic receives better access to the outgoing interface.

Requirements

Before you begin, review how to assign forwarding classes. See Example: Assigning Forwarding Classes to Output Queues.

Overview

In this example, you configure CoS and a scheduler called be-sched with a medium-low priority. Then you configure scheduler map be-map to associate be-sched with the best-effort forwarding class. Finally, you apply be-map to interface ge-0/0/0.

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-sched priority medium-low
set class-of-service scheduler-maps be-map forwarding-class best-effort scheduler be-sched 
set class-of-service interfaces ge-0/0/0 scheduler-map be-map 

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 priority scheduling:

  1. Configure CoS and a scheduler.

    content_copy zoom_out_map
    [edit]
    user@host# edit class-of-service
    user@host# edit schedulers be-sched
    
  2. Set a priority.

    content_copy zoom_out_map
    [edit class-of-service schedulers be-sched]
    user@host# set priority medium-low
    
  3. Configure a scheduler map.

    content_copy zoom_out_map
    [edit]
    user@host# edit class-of-service
    user@host# edit scheduler-maps be-map
    
  4. Specify the best-effort forwarding class.

    content_copy zoom_out_map
    [edit class-of-service scheduler-maps be-map]
    user@host# set forwarding-class best-effort scheduler be-sched
    
  5. Apply best-effort map to an interface.

    content_copy zoom_out_map
    [edit]
    user@host# edit class-of-service
    user@host# set interfaces ge-0/0/0 scheduler-map be-map
    

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
    interfaces {
    ge-0/0/0 {
    scheduler-map be-map;
        }
        }
        scheduler-maps {
            be-map {
            forwarding-class best-effort scheduler be-sched;
        }
        }
        schedulers {
            be-sched {
        priority medium-low;
    }
}

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

Verification

Verifying Priority Scheduling

Purpose

Verify that the priority scheduling is configured properly on a device.

Action

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

footer-navigation