1. Enable QoS globally
> set qos enable
2. Mapping CoS to Queue/Threshold
> set qos map <queue type> tx <queue#> <threshold#> cos <values>
> set qos map 2q2t tx 1 1 cos 0 1
> set qos map 2q2t tx 1 2 cos 2 3
3. Setting Tail drop or WRED
> set qos drop-threshold <queue-type> tx queue <queue#> <threshold1> <threshold2>
> set qos drop-threshold 2q2t tx queue 1 80 100
> set qos wred 1p2q2t tx queue 1 50 90
4. Setting WRR scheduling
> set qos wrr <queue type> <queue1> <queue2>
> set qos wrr 2q2t 10 255
This defines the number of bytes emptied from queue 1 before moving to queue 2
If you want to empty equal amount of bytes from both queues, configure 255, 255.
5. Setting the TX-Queue ratio
This defines the number of bytes allocated to each queue
> set qos txq-ratio <queue-type> <queue1> <queue2>
> set qos txq-ratio 2q2t 80 20
Queues are always numbered to start with the lowest possible priority queue and end with the strict priority queue that is available. Here is an example:
- Queue 1 is the low-priority WRR queue
- Queue 2 is the high-priority WRR queue
- Queue 3 is the strict priority queue