2020-12-14 12:03 PM
本ドキュメントでは、Catalyst 9000 シリーズにおける「show policy-map interface x/x/x」にある「packets」項目について記載します。
*** Catalyst 9000 シリーズ全般が対象となります。
Catalyst 9000 シリーズでは、「show policy-map interface x/x/x」というコマンドがあり、QoS 適用がある場合、そのコマンドの出力から各 Class-map に流れている Traffic 量が確認可能です。「(bytes output)」という項目はいつも表示されていますが、「packets」という項目には利用している QoS の設定によりカウントする/しない場合があります。
実機実行例:
C9300-1#show policy-map interface gi1/0/1
GigabitEthernet1/0/1
Service-policy input: Test_1
Class-map: Test_1 (match-all)
235 packets <<< カウントされている
Match: access-group 2
police:
rate 10000 bps, burst 1500 bytes
conformed 25960 bytes; actions:
transmit
exceeded 1770 bytes; actions:
drop
conformed 0000 bps, exceeded 0000 bps
Class-map: class-default (match-any)
606 packets <<< カウントされている
Match: any
police:
cir 80000 bps, bc 2500 bytes
conformed 45699 bytes; actions:
transmit
exceeded 0 bytes; actions:
drop
conformed 0000 bps, exceeded 0000 bps
Service-policy output: Test2
queue stats for all priority classes:
Queueing
priority level 1
(total drops) 0
(bytes output) 42484
Class-map: af22 (match-all)
0 packets <<< カウントされていない
Match: dscp af22 (20)
Priority: 10% (100000 kbps), burst bytes 2500000,
Priority Level: 1
Class-map: class-default (match-any)
0 packets <<< カウントされていない
Match: any
Queueing
(total drops) 0
(bytes output) 11800
bandwidth remaining 100%
queue-buffers ratio 50
QoS のコンポーネントとして、主に下記が挙げられます。
機器内部のメカニズムを開示することはできませんが、 input / output 方向に関わらず、異なる QoS コンポーネントの内部処理に異なる H/W コンポーネントで動作する場合があります。それにより、「show policy-map interface x/x/x」にある「packets」項目にカウントされるか/しないかの区別があります。
纏めて言いますと、Service-policy に Queuing policy (例: policy with PQ、bandwidth、WRED、 queue-buffer など) の設定がありましたら、「show policy-map interface x/x/x」の出力に Queueing 表示があり、パケットのカウンターが 0 表示で、上昇しません。
**各コンポーネントの定義については、参照情報のドキュメントの記載をご参照ください。
実機表示例:
Class-map: class-default (match-any)
0 packets <<< カウントされていない
Match: any
Queueing <<< Queuing 表示あり
(total drops) 0
(bytes output) 11682
bandwidth remaining 100%
queue-buffers ratio 50
全ての設定サンプルを網羅することは困難ですが、参考レベルで実機上の確認結果を共有します。
■ 「show policy-map interface x/x/x」 にある「packets」項目にカウントされている
** Marking
C9300-1#show policy-map inter gi1/0/1 output
GigabitEthernet1/0/1
Service-policy output: Test
Class-map: Test (match-all)
30 packets <<<カウントされている
Match: access-group 1
QoS Set
dscp af22
Class-map: class-default (match-any)
6 packets <<<カウントされている
Match: any
QoS Set
dscp cs
** policing
C9300-1#show policy-map inter gi1/0/1 input
GigabitEthernet1/0/1
Service-policy input: Test_1
Class-map: Test_1 (match-all)
100 packets <<<カウントされている
Match: access-group 2
police:
rate 10000 bps, burst 1500 bytes
conformed 10974 bytes; actions:
transmit
exceeded 826 bytes; actions:
drop
conformed 1000 bps, exceeded 0000 bps
Class-map: class-default (match-any)
35 packets <<<カウントされている
Match: any
police:
cir 80000 bps, bc 2500 bytes
conformed 2703 bytes; actions:
transmit
exceeded 0 bytes; actions:
drop
conformed 0000 bps, exceeded 0000 bps
■「show policy-map interface x/x/x」 にある「packets」項目にカウントされていなく、0 表示
** Shaping
C9300-1#show policy-map interface gi1/0/1 output
GigabitEthernet1/0/1
Service-policy output: Test_shape
Class-map: class-default (match-any)
0 packets <<<カウントされていない
Match: any
Queueing <<<
(total drops) 0
(bytes output) 2798
shape (average) cir 100000, bc 400, be 400
target shape rate 100000
** Queuing
C9300-1#show policy-map interface gi1/0/1 output
GigabitEthernet1/0/1
Service-policy output: Test2
queue stats for all priority classes:
Queueing <<<<
priority level 1
(total drops) 0
(bytes output) 27234
Class-map: af22 (match-all)
0 packets <<<カウントされていない
Match: dscp af22 (20)
Priority: 10% (100000 kbps), burst bytes 2500000
Priority Level: 1
Class-map: class-default (match-any)
0 packets <<<カウントされていない
Match: any
Queueing <<<
(total drops) 0
(bytes output) 11682
bandwidth remaining 100%
queue-buffers ratio 50
** Bandwidth
C9300-1#show policy-map interface gi1/0/1 output
GigabitEthernet1/0/1
Service-policy output: Test_bandwidth
Class-map: class-default (match-any)
0 packets <<<カウントされていない
Match: any
Queueing <<<
(total drops) 0
(bytes output) 1714
bandwidth 20% (200000 kbps)
※「0 packets 」表示になる場合、下記いずれかのコマンドから QoS の Statistics を確認してください。
** 両項目とも Default は Bytes 表記ですが、「qos queue-stats-frame-count」コマンドでパケット表記へ変更可能です。
1.「show policy-map interface x/x/x」の「(bytes output)」/ (pkts output) 項目
C9300-24P-A-2#show policy-map inter gi1/0/1
GigabitEthernet1/0/1
Service-policy output: test3
Class-map: class-default (match-any)
0 packets
Match: any
Queueing
(total drops) 0
(bytes output) 648 <<<<
shape (average) cir 15000, bc 60, be 60
target shape rate 15000
C9300-24P-A-2(config)#qos queue-stats-frame-count
clear the counters by executing "clear counters"
C9300-24P-A-2(config)#exit
C9300-24P-A-2#
C9300-24P-A-2#clear counter
Clear "show interface" counters on all interfaces [confirm]
C9300-24P-A-2#
C9300-24P-A-2#show policy-map inter gi1/0/1
GigabitEthernet1/0/1
Service-policy output: test3
Class-map: class-default (match-any)
0 packets
Match: any
Queueing
(total drops) 0
(pkts output) 3 <<<<
shape (average) cir 15000, bc 60, be 60
target shape rate 15000
2.「show platform hardware fed switch x qos queue stats interface x/x/x」の「Enqueue Counters」項目
C9300-24P-A-2#show platform hardware fed switch 1 qos queue stats interface gigabitEthernet 1/0/1
<略>
----------------------------------------------------------------------------------------------
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 512 18444 0 <<<<
1 0 0 0 0 0
2 0 0 0 0 0
<略>
C9300-24P-A-2#
C9300-24P-A-2(config)#qos queue-stats-frame-count
clear the counters by executing "clear counters"
C9300-24P-A-2(config)#exit
C9300-24P-A-2#
C9300-24P-A-2#show platform hardware fed switch 1 qos queue stats interface gigabitEthernet 1/0/1
<略>
----------------------------------------------------------------------------------------------
Asic:0 Core:1 DATA Port:0 Hardware Enqueue Counters
----------------------------------------------------------------------------------------------
Q Buffers Enqueue-TH0 Enqueue-TH1 Enqueue-TH2 Qpolicer
(Count) (Frames) (Frames) (Frames) (Frames) <<<<
-- ------- -------------------- -------------------- -------------------- --------------------
0 0 0 8 118 0 <<<<
1 0 0 0 0 0
2 0 0 0 0 0
<略>
Quality of Service Configuration Guide, Cisco IOS XE Gibraltar 16.12.x (Catalyst 9300 Switches)
Chapter: Configuring QoS
Cisco Catalyst 9000 Switching Platforms: QoS and Queuing White Paper
https://www.cisco.com/c/en/us/products/collateral/switches/catalyst-9000/white-paper-c11-742388.html
検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう
シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします
下記より関連するコンテンツにアクセスできます