Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Priority Scheduling Overview

Junos supports multiple levels of transmission priority, which in order of increasing priority are low, low-medium, low-high, medium-low, medium-high, high, strict-high, and low-latency. This allows the software to service higher-priority queues before lower-priority queues.

Priority scheduling determines the order in which an output interface transmits traffic from its queues, thus ensuring that queues containing important traffic have better access to the outgoing interface. Junos accomplishes priority scheduling by examining the assigned priority of each individual queue and whether each individual queue is within its defined bandwidth profile. Junos determines whether an individual queue is within its bandwidth profile by comparing, at regular intervals, the amount of data transmitted by the queue against the amount of bandwidth allocated to it by the configured scheduler transmission rate (transmit-rate) defined at the [edit class-of-service schedulers scheduler-name] hierarchy level. When the transmitted amount is less than the allocated amount, the queue is considered to be in profile. A queue is out of profile when its transmitted amount is larger than its allocated amount.

The queues for a given output physical or logical interface are divided into sets based on their priority. Any such set contains queues of the same priority.

Junos traverses the sets in descending order of priority. If at least one of the queues in the set has a packet to transmit, the software selects that set. A queue from the set is selected based on the weighted round robin (WRR) algorithm, which operates within the set.

Junos performs priority queuing using the following steps:

  1. The software locates all high-priority queues that are currently in profile. These queues are serviced first in a weighted round-robin fashion.

  2. The software locates all medium-high priority queues that are currently in profile. These queues are serviced second in a weighted round-robin fashion.

  3. The software locates all medium-low priority queues that are currently in profile. These queues are serviced third in a weighted round-robin fashion.

  4. The software locates all low-priority queues that are currently in profile. These queues are serviced fourth in a weighted round-robin fashion.

  5. The software locates all high-priority queues that are currently out of profile and are not rate limited. The weighted round-robin algorithm is applied to these queues for servicing.

  6. The software locates all medium-high priority queues that are currently out of profile and are not rate limited. The weighted round-robin algorithm is applied to these queues for servicing.

  7. The software locates all medium-low priority queues that are currently out of profile and are not rate limited. The weighted round-robin algorithm is applied to these queues for servicing.

  8. The software locates all low-priority queues that are currently out of profile and are also not rate limited. These queues are serviced last in a weighted round-robin manner.

Strict-High Priority Configuration Overview

You can configure one queue per interface to have strict-high priority, which works the same as high priority, but provides unlimited transmission bandwidth. As long as the queue with strict-high priority has traffic to send, it receives precedence over all other queues, except queues with high priority. Queues with strict-high and high priority take turns transmitting packets until the strict-high queue is empty, the high priority queues are empty, or the high priority queues run out of bandwidth credit. Only when these conditions are met can lower priority queues send traffic.

When you configure a queue to have strict-high priority, you do not need to include the transmit-rate statement in the queue configuration at the [edit class-of-service schedulers scheduler-name] hierarchy level because the transmission rate of a strict-high priority queue is not limited by the WRR configuration. If you do configure a transmission rate on a strict-high priority queue, it does not affect the WRR operation. The transmission rate does, however, affect the calculation of the delay buffer and also serves as a placeholder in the output of commands such as the show interface queue command.

strict-high priority queues might starve low priority queues, and under certain circumstances might limit high priority queues. The high priority allows you to protect traffic classes from being starved by traffic in a strict-high queue. For example, a network-control queue might require a small bandwidth allocation (say, 5 percent). You can assign high priority to this queue to prevent it from being underserved.

A queue with strict-high priority supersedes bandwidth guarantees for queues with lower priority; therefore, we recommend that you use the strict-high priority to ensure proper ordering of special traffic, such as voice traffic. You can preserve bandwidth guarantees for queues with lower priority by allocating to the queue with strict-high priority only the amount of bandwidth that it generally requires by applying the rate-limitoption to the strict-high queue’s transmission rate. For example, consider the following allocation of transmission bandwidth:

  • Q0 BE—20 percent, low priority

  • Q1 EF—30 percent, strict-high priority

  • Q2 AF—40 percent, low priority

  • Q3 NC—10 percent, low priority

This bandwidth allocation assumes that, in general, the EF forwarding class requires only 30 percent of an interface’s transmission bandwidth. However, if short bursts of traffic are received on the EF forwarding class, and the rate-limitoption is not applied, 100 percent of the bandwidth is given to the EF forwarding class because of the strict-high setting.