查询复杂流策略统计信息,确认流量是否已正确匹配
首先进入流策略视图,确认已经使能流统计功能。[HUAWEI]traffic policy test
[HUAWEI-trafficpolicy-test]display this
#
traffic policy test
undo share-mode
statistics enable //已经使能流统计功能
classifier test behavior test //该流策略下绑定的流分类和流动作的名字都是test
#
return
查询流策略统计信息,若流量已经正确匹配,则说明流分类已经生效。[HUAWEI]display traffic policy statistics interface GigabitEthernet 4/0/9 inbound
Item Packets Bytes
-------------------------------------------------------------------
Matched 11,206,347 874,093,882
+--Passed 662,111 51,644,332
+--Dropped 10,544,236 822,449,550
+--Filter 0 0
+--URPF 0 0
+--CAR 10,544,236 822,449,550
Missed 1 64
Last 30 seconds rate
Item pps bps
-------------------------------------------------------------------
Matched 1,274,326 795,178,968 //有值说明匹配到了流量
+--Passed 75,993 47,419,752
+--Dropped 1,198,333 747,759,216
+--Filter 0 0
+--URPF 0 0
+--CAR 1,198,333 747,759,216
如果未匹配到流量,请执行步骤2。
如果匹配到了流量,请执行步骤4。