Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


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

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


Before you begin, determine the buffer size allocation method to use. See Scheduler Buffer Size 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.


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


For CoS Traffic Type

Assigned Priority

Allocated Portion of Queue Buffer

Allocated Portion of Remainder (Transmit Rate)


Best-effort traffic


40 percent

40 percent


Expedited forwarding traffic


10 percent

50 percent


Assured forwarding traffic


45 percent


Network control traffic


5 percent



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.

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.

  2. Specify a best-effort scheduler priority and buffer size.

  3. Configure a remainder option for a best-effort scheduler transmit rate.

  4. Configure an expedited forwarding scheduler.

  5. Specify an expedited forwarding scheduler priority and buffer size.

  6. Configure a remainder option for an expedited forwarding scheduler transmit rate.

  7. Configure an assured forwarding scheduler.

  8. Specify an assured forwarding scheduler priority and buffer size.

  9. Configure an assured forwarding scheduler transmit rate.

  10. Configure a drop profile map for assured forwarding low and high priority.

  11. Configure a network control scheduler.

  12. Specify a network control scheduler priority and buffer size.

  13. Configure a network control scheduler transmit rate.


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 Schedulers Configuration


Verify that the schedulers are configured properly.


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