It is my understanding that ASR9Ks (and CSR12K) platforms support only MDRR scheduling technique. Now, MDRR can operate in one of two modes when configured with Priority Queue - Strict Priority mode, and Alternate mode.
My questions are-
1. What mode does ASR9K use for PQ? What command can be used to check this mode?
2. Is the mode and Quantum/Weight configurable? Can we check this using a show command?
3. Consider this - If mode is Strict Priority and there are 3 queues - Queue1 (Priority queue), Queue2 (normal queue) and Queue3 (normal queue). If the Quantum value is high enough (based on MTU and Weight) and Queue1 always has packets, will Queue2 and Queue3 always starve?
4. Consider the same scenario as  but with Alternate mode.
Correct, the QOS scheduler in the NPU is closest to the MDRR way of operating.
When a priority queue is configured it gets served until all packets are drained of that queue (so strict), so it is imperative to have a policer on this queue to ensure that it can't starve teh other queues.
Some XR releases enforce the need of a policer, but if you want to create a strict prio queue, then you can use a policer with a rate of 100% or set the exceed/violate actions to transmit.
The weight of shaped queues is derived from their assigned bandwidth of the circuit (parent) shaper. But you can affect that weight by using the bw remaining option.
Your scenario "3" is indeed why you would want a policer on the PQ to make sure that it wont starve the other guys.
It doesnt do alternate mode; for as long as there are packets in the PQ it gets served. PQ-1 before PQ-2 before the remaining bw is weighted shared over the shaped queues. Whatever is left after that, is for the class-default.
You can see the hw programming of the queues with the command:
show qos interface <intf> <direction> Example below.
If you like to understand this output more or get some more guidance on QOS, see the article on this forum "quality of service architecture asr9000" and also check cisco live 2904 from orlando last year and sanfran this year. (available for download from the ciscolive websites.
Thank you for replying. I would like to extend this discussion bit more using the output you provided.
Okay, so from Cisco Press book -
Bytes Dequeued (Quantum) = Number of bytes a queue can serve in each round
Deficit Counter = Number of bytes served by a queue in each round
Also from the book,
Bytes Dequeued = MTU+(Configured Weight-1)*512
If we use this formula and the output above, the values come out as (ignoring the Shaping rate of Parent Policy, and assuming an interface MTU of 9000 bytes) -
Class : m2 (Priority Queue)
bytes dequeued = 7500 bytes = Bc
Class : m1
Quantum = 9000 + (1937-1)*512 = 1000232 bytes
Class : class-default
Quantum = 9000 + (1-1)*512 = 9000 bytes
Due to Strict Priority mode, Class m2 will always be served in each round and depending on the data in the queue, 7500 bytes of data will always be dequeued first.
Question : If I had another Class configured with Priority Level-2, would that be served next?
Then packets from Class m1 will be dequeued until the deficit counter reaches 0 or negative.
Question : Since Queue Limit is 40Kbytes (from output), what happens to the packets that cannot be accomodated in this queue? What role is played by bandwidth configured under the Class since we have the Quantum and Deficit Counter values?
Question : Does this leave enough time to serve Class class-default?
That what you described AB, is MDRR to the "T". But the scheduler inside this NPU operates in somewhat different.
The pmap definition is below for reference, it is a parent shaper at 200M and a child class at 100M and a PQ of 600k. Worst case in that model is that class-default has about 99.4M
shaped classes use a token bucket that is by default refreshed every 4msec (Tc) for the bw worth of tokens. If there are no tokens left at a dequeue cycle the packet is buffered and in this config we buffer up to 150 packets (which in the end converts to an x number of bytes worth of packet buffer memory.
The bandwidth command on a class creates a queue and its rate defines the token number refresh at every "Tc".
Shaped classes at the same priority level are dequeued at their weighted rate to retain fairness between the same (low priority) classes.
RP/0/RSP0/CPU0:A9K-BNG#sh run policy-map xt Thu Jun 19 07:31:47.711 EDT policy-map xt class m2 priority level 2 police rate 600 kbps ! ! class m1 bandwidth 100 mbps queue-limit 150 packets ! class class-default ! end-policy-map !
RP/0/RSP0/CPU0:A9K-BNG#sh run policy-map xtp Thu Jun 19 07:31:51.467 EDT policy-map xtp class class-default service-policy xt shape average 200 mbps ! end-policy-map
1. Introduction Internet security is important with the increasing
attacks that are happening every day. Many internet and browsing
security solutions exist, but some are not very easy to use or maybe the
question is how can I enable them? In this referen...
Cisco Software Manager Server API Guide This document describes the
programmatic interfaces, RESTful APIs, which are supported by Cisco
Software Manager Server (CSM Server). Overview CSM Server supports a set
of finite RESTful APIs. The first step to use ...
If you are using Cisco's new linux-based Cisco Software Manager server,
then you probably want to make sure there is a startup service for
it.I'll assume that you've already installed the CSM server on a
systemd-based linux system. The commands given belo...