12-28-2022 01:26 PM
We have following QoS policy on every port:
policy-map QOS_LAN_OUT
class QOS_VOICERTP_OUT
priority level 1
police cir 2952000 bc 7380
conform-action transmit
exceed-action set-dscp-transmit dscp table QOS_OUT
class QOS_CITRIX_OUT
bandwidth remaining ratio 40
class QOS_VOICESIP_OUT
bandwidth remaining ratio 30
class QOS_SAP_OUT
bandwidth remaining ratio 15
class QOS_TRASH_OUT
bandwidth remaining ratio 1
class class-default
bandwidth remaining ratio 9
So there is a strange limitation about the QoS statistics when i issue show policy-map interface gi1/0/1 command, which is, that the stats are the same for every interface. Quote from Cat9k QoS whitepaper
If a policy with the same name is shared on multiple ports, the policy map counters will be aggregated, as the TCAM entries are shared between the ports. As result, an interface without traffic might see increments, but the TCAM usage will be reduced, as the entries are shared.
So i would like to not use the counters from the show policy-map command, but rather would like to use the output from the command: show platform hardware fed switch active qos queue conf interface gigabitEthernet 1/0/1
The output of this command looks like this:
switch#show platform hardware fed switch active qos queue stats interface gigabitEthernet 1/0/1
----------------------------------------------------------------------------------------------
AQM Global counters
GlobalHardLimit: 2766 | GlobalHardBufCount: 0
GlobalSoftLimit: 17082 | GlobalSoftBufCount: 0
----------------------------------------------------------------------------------------------
Asic:0 Core:1 DATA Port:0 Hardware Enqueue Counters
----------------------------------------------------------------------------------------------
Q Buffers Enqueue-TH0 Enqueue-TH1 Enqueue-TH2 Qpolicer
(Count) (Bytes) (Bytes) (Bytes) (Bytes)
-- ------- -------------------- -------------------- -------------------- --------------------
0 0 0 11860642691 27796760518 0
1 0 0 0 27804051498 0
2 0 0 0 0 0
3 0 0 0 681833630 0
4 0 0 0 53363014152 0
5 0 0 0 5164026700 0
6 0 0 0 0 0
7 0 0 0 0 0
Asic:0 Core:1 DATA Port:0 Hardware Drop Counters
--------------------------------------------------------------------------------------------------------------------------------
Q Drop-TH0 Drop-TH1 Drop-TH2 SBufDrop QebDrop QpolicerDrop
(Bytes) (Bytes) (Bytes) (Bytes) (Bytes) (Bytes)
-- -------------------- -------------------- -------------------- -------------------- -------------------- --------------------
0 0 0 0 0 0 0
1 0 0 0 0 0 0
2 0 0 0 0 0 0
3 0 0 0 0 0 0
4 0 0 724459 0 0 0
5 0 0 321119 0 0 0
6 0 0 0 0 0 0
7 0 0 0 0 0 0
So these counters are different for every interface. So i would like to take these in a script to show how many packets have been enqueued and dropped for every class in my policy map per interface. The problem is, how do i know which class corresponds to which queue? I have read that per default, Threshold2 is used for every class. If i look at the command:
switch#show platform hardware fed switch active qos queue conf interface gigabitEthernet 1/0/1
Asic:0 Core:1 DATA Port:0 GPN:1 LinkSpeed:0x1
AFD:Disabled FlatAFD:Disabled QoSMap:0 HW Queues: 0 - 7
DrainFast:Disabled PortSoftStart:4 - 510
DTS Hardmax Softmax PortSMin GlblSMin PortStEnd
----- -------- -------- -------- -------- ---------
0 1 4 85 7 85 0 0 0 0 5 680
1 1 0 0 8 340 19 201 8 85 5 680
2 1 0 0 8 340 19 201 8 85 5 680
3 1 0 0 8 340 19 201 8 85 5 680
4 1 0 0 9 320 19 190 8 80 5 680
5 1 0 0 9 320 19 190 8 80 5 680
6 1 0 0 0 0 0 0 0 0 5 680
7 1 0 0 0 0 0 0 0 0 5 680
Priority Shaped/shared weight shaping_step sharpedWeight
-------- ------------- ------ ------------ -------------
0 1 Shared 2000 0 0
1 7 Shared 50 0 0
2 7 Shared 66 0 0
3 7 Shared 133 0 0
4 7 Shared 2000 0 0
5 7 Shared 222 0 0
6 0 Shared 10000 0 0
7 0 Shared 10000 0 0
Port Port Port Port
Priority Shaped/shared weight shaping_step
-------- ------------- ------ ------------
2 Shaped 256 255
Weight0 Max_Th0 Min_Th0 Weigth1 Max_Th1 Min_Th1 Weight2 Max_Th2 Min_Th2
------- ------- ------- ------- ------- ------- ------- ------- ------
0 0 135 0 0 151 0 0 170 0
1 0 270 0 0 302 0 0 340 0
2 0 270 0 0 302 0 0 340 0
3 0 270 0 0 302 0 0 340 0
4 0 255 0 0 285 0 0 320 0
5 0 255 0 0 285 0 0 320 0
6 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0
I can see, that there are 6 queues used as they have buffer allocated to them. Which matches the configuration that also has 6 queues. I read on the same guide linked above, that i can look for the class2queue matching with following command:
switch#show platform hardware fed switch active qos queue label2qmap qmap-egress-data interface gigabitEthernet 1/0/2
Egress DATA Queue Mapping - Asic/Core/Port: 0/1/1
===============================================================================
Label Q Threshold VQ | Label Q Threshold VQ | Label Q Threshold VQ
===== === ========= === | ===== === ========= === | ===== === ========= ===
0 5 2 2 1 5 2 2 2 5 2 2
3 5 2 2 4 5 2 2 5 5 2 2
6 5 2 2 7 5 2 2 8 5 2 2
9 4 2 2 10 5 2 2 11 5 2 2
12 5 2 2 13 5 2 2 14 5 2 2
15 5 2 2 16 5 2 2 17 3 2 2
18 5 2 2 19 5 2 2 20 5 2 2
21 5 2 2 22 5 2 2 23 5 2 2
24 5 2 2 25 2 2 2 26 5 2 2
27 5 2 2 28 5 2 2 29 5 2 2
30 5 2 2 31 5 2 2 32 5 2 2
33 1 2 2 34 5 2 2 35 5 2 2
36 5 2 2 37 5 2 2 38 5 2 2
39 5 2 2 40 5 2 2 41 5 2 2
42 5 2 2 43 5 2 2 44 5 2 2
45 5 2 2 46 5 2 2 47 0 1 2
48 5 2 2 49 5 2 2 50 5 2 2
51 5 2 2 52 5 2 2 53 5 2 2
54 5 2 2 55 5 2 2 56 5 2 2
57 5 2 2 58 5 2 2 59 5 2 2
60 5 2 2 61 5 2 2 62 5 2 2
63 5 2 2 64 5 2 2 65 5 2 2
66 5 2 2 67 5 2 2 68 5 2 2
69 5 2 2 70 5 2 2 71 5 2 2
72 5 2 2 73 5 2 2 74 5 2 2
75 5 2 2 76 5 2 2 77 5 2 2
78 5 2 2 79 5 2 2 80 5 2 2
81 5 2 2 82 5 2 2 83 5 2 2
84 5 2 2 85 5 2 2 86 5 2 2
87 5 2 2 88 5 2 2 89 5 2 2
90 5 2 2 91 5 2 2 92 5 2 2
93 5 2 2 94 5 2 2 95 5 2 2
96 5 2 2 97 5 2 2 98 5 2 2
99 5 2 2 100 5 2 2 101 5 2 2
102 5 2 2 103 5 2 2 104 5 2 2
105 5 2 2 106 5 2 2 107 5 2 2
108 5 2 2 109 5 2 2 110 5 2 2
111 5 2 2 112 5 2 2 113 5 2 2
114 5 2 2 115 5 2 2 116 5 2 2
117 5 2 2 118 5 2 2 119 5 2 2
120 5 2 2 121 5 2 2 122 5 2 2
123 5 2 2 124 5 2 2 125 5 2 2
126 5 2 2 127 5 2 2 128 0 2 2
129 0 1 2 130 5 2 2 131 5 2 2
132 5 2 2 133 5 2 2 134 0 2 2
135 5 2 2 136 5 2 2 137 5 2 2
138 5 2 2 139 5 2 2 140 5 2 2
141 5 2 2 142 5 2 2 143 5 2 2
144 5 2 2 145 5 2 2 146 5 2 2
147 5 2 2 148 5 2 2 149 5 2 2
150 5 2 2 151 5 2 2 152 5 2 2
153 5 2 2 154 5 2 2 155 5 2 2
156 5 2 2 157 5 2 2 158 5 2 2
159 5 2 2 160 5 2 2 161 5 2 2
162 5 2 2 163 5 2 2 164 5 2 2
165 5 2 2 166 5 2 2 167 5 2 2
168 5 2 2 169 5 2 2 170 5 2 2
171 5 2 2 172 5 2 2 173 5 2 2
174 5 2 2 175 5 2 2 176 5 2 2
But according to this table, everything is queued into Queue5 Threshold2, which is not true since i can see enqueueing of packets in different queues from the output above... So how can i find out which Queue correlates to which class?
Talking about C9300 Switch with current IOS 16.12.05b
Solved! Go to Solution.
07-10-2024 12:51 AM
The last issued command label2qmap was indeed correct. In the output you can see that some labels have a different queue and threshold assigned than Q5T2:
Label9 is Q4T2
Label33 is Q1T2
There are some more examples but you get the gist. I wrote a TCL script that shows me all the different queues, thresholds and drops for all QoS classes...
07-10-2024 12:51 AM
The last issued command label2qmap was indeed correct. In the output you can see that some labels have a different queue and threshold assigned than Q5T2:
Label9 is Q4T2
Label33 is Q1T2
There are some more examples but you get the gist. I wrote a TCL script that shows me all the different queues, thresholds and drops for all QoS classes...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide