The JUNOS software supports multiple levels of transmission priority, which in order of increasing priority are low, medium-low, medium-high, and high, and strict-high. 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 the queues, thus ensuring that queues containing important traffic are provided better access to the outgoing interface. This is accomplished through a procedure in which the software examines the priority of the queue. In addition, the software determines if the individual queue is within its defined bandwidth profile. The bandwidth profile is discussed in Configuring the Transmission Rate. This binary decision, which is reevaluated on a regular time cycle, compares the amount of data transmitted by the queue against the amount of bandwidth allocated to it by the scheduler. 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 interface (or output logical interface if per-unit scheduling is enabled on that interface) are divided into sets based on their priority. Any such set contains queues of the same priority.
The software 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.
The JUNOS software performs priority queuing using the following steps:
To configure priority scheduling, include the priority statement at the [edit class-of-service schedulers scheduler-name] hierarchy level:
- [edit class-of-service schedulers scheduler-name]
-
priority priority-level;
The priority level can be low, medium-low, medium-high, high, or strict-high. The priorities map to numeric priorities in the underlying hardware. In some cases, different priorities behave similarly, because two software priorities behave differently only if they map to two distinct hardware priorities. For more information, see Table 34.
Higher-priority queues transmit packets ahead of lower priority queues as long as the higher-priority forwarding classes retain enough bandwidth credit. When you configure a higher-priority queue with a significant fraction of the transmission bandwidth, the queue might lock out (or starve) lower priority traffic.
Strict priority queuing works differently on different platforms. For more information and examples, see the following sections: