Example: Configuring and Applying Scheduler Maps
This example shows how to configure and apply a scheduler map to a device’s interface.
Before you begin:
Create and configure the forwarding classes. See Configuring a Custom Forwarding Class for Each Queue.
Create and configure the schedulers. See Example: Configuring Class-of-Service Schedulers on a Security Device.
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
Expedited forwarding traffic
Assured forwarding traffic
Network control traffic
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  hierarchy level, and then enter commit from the configuration mode.
To configure and apply a scheduler map to a device’s interface:
- Configure a scheduler map for DiffServ CoS.[edit class-of-service]user@host# edit scheduler-maps diffserv-cos-map
- Configure a best-effort forwarding class and scheduler.[edit class-of-service scheduler-maps diffserv-cos-map]user@host# set forwarding-class be-class scheduler be-scheduler
- Configure an expedited forwarding class and scheduler.[edit class-of-service scheduler-maps diffserv-cos-map]user@host# set forwarding-class ef-class scheduler ef-scheduler
- Configure an assured forwarding class and scheduler.[edit class-of-service scheduler-maps diffserv-cos-map]user@host# set forwarding-class af-class scheduler af-scheduler
- Configure a network control class and scheduler.[edit class-of-service scheduler-maps diffserv-cos-map]user@host# set forwarding-class nc-class scheduler nc-scheduler
- Apply the scheduler map to an interface.[edit class-of-service]user@host# set interfaces ge-0/0/0 unit 0 scheduler-map diffserv-cos-map
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.
If you are done configuring the device, enter commit from configuration mode.
Verifying the Scheduler Map Configuration
Verify that scheduler maps are configured properly.
From operational mode, enter the show class-of-service command.