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 and Applying Scheduler Maps

date_range 02-Feb-21

This example shows how to configure and apply a scheduler map to a device’s interface.

Requirements

Before you begin:

Overview

After you define a scheduler, you can include it in a scheduler map, which maps a specified forwarding class to a scheduler configuration. You configure a scheduler map to assign a forwarding class to a scheduler, and then apply the scheduler map to any interface that must enforce DiffServ CoS.

After they are applied to an interface, the scheduler maps affect the hardware queues, packet schedulers, and RED drop profiles.

In this example, you create the scheduler map diffserv-cos-map and apply it to the device's Ethernet interface ge-0/0/0. The map associates the mf-classifier forwarding classes to the schedulers as shown in Table 1.

Table 1: Sample diffserv-cos-map Scheduler Mapping

mf-classifier Forwarding Class

For CoS Traffic Type

diffserv-cos-map Scheduler

be-class

Best-effort traffic

be-scheduler

ef-class

Expedited forwarding traffic

ef-scheduler

af-class

Assured forwarding traffic

af-scheduler

nc-class

Network control traffic

nc-scheduler

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 scheduler-maps diffserv-cos-map forwarding-class be-class scheduler be-scheduler
set class-of-service scheduler-maps diffserv-cos-map forwarding-class ef-class scheduler ef-scheduler 
set class-of-service scheduler-maps diffserv-cos-map forwarding-class af-class scheduler af-scheduler 
set class-of-service scheduler-maps diffserv-cos-map forwarding-class nc-class scheduler nc-scheduler 
set class-of-service  interfaces ge-0/0/0 unit 0 scheduler-map diffserv-cos-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 and apply a scheduler map to a device’s interface:

  1. Configure a scheduler map for DiffServ CoS.

    content_copy zoom_out_map
    [edit class-of-service]
    user@host# edit scheduler-maps diffserv-cos-map
    
  2. Configure a best-effort forwarding class and scheduler.

    content_copy zoom_out_map
     [edit class-of-service scheduler-maps diffserv-cos-map]
    user@host# set forwarding-class be-class scheduler be-scheduler
    
  3. Configure an expedited forwarding class and scheduler.

    content_copy zoom_out_map
    [edit class-of-service scheduler-maps diffserv-cos-map]
    user@host# set forwarding-class ef-class scheduler ef-scheduler
    
  4. Configure an assured forwarding class and scheduler.

    content_copy zoom_out_map
    [edit class-of-service scheduler-maps diffserv-cos-map]
    user@host# set forwarding-class af-class scheduler af-scheduler
    
  5. Configure a network control class and scheduler.

    content_copy zoom_out_map
    [edit class-of-service scheduler-maps diffserv-cos-map]
    user@host# set forwarding-class nc-class scheduler nc-scheduler
    
  6. Apply the scheduler map to an interface.

    content_copy zoom_out_map
    [edit class-of-service]
    user@host# set interfaces ge-0/0/0 unit 0 scheduler-map diffserv-cos-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 {
        unit 0 {
            scheduler-map diffserv-cos-map;
        }
    }
}
scheduler-maps {
    diffserv-cos-map {
        forwarding-class be-class scheduler be-scheduler;
        forwarding-class ef-class scheduler ef-scheduler;
        forwarding-class af-class scheduler af-scheduler;
        forwarding-class nc-class scheduler nc-scheduler;
    }
}

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

Verification

Verifying the Scheduler Map Configuration

Purpose

Verify that scheduler maps are configured properly.

Action

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

footer-navigation