The display traffic policy statistics command displays statistics about the traffic policy.
display traffic policy [ [ name ] policy-name ] statistics interface { interface-name | interface-type interface-number } [ vlan vlan-id | pe-vid pe-vid ce-vid ce-vid | vid vid | ce-vid ce-vid | vid vid ce-vid ce-vid ] { inbound | outbound } [ verbose { classifier-based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
display traffic policy [ [ name ] policy-name ] statistics bridge-domain bdid { inbound | outbound } [ verbose { classifier-based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
display traffic policy statistics global-acl [ slot slot-id ] { inbound | outbound } [ verbose { classifier-based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
display traffic policy statistics ucl [ slot slot-id ] { inbound | outbound } [ verbose { classifier-based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
display traffic policy name policy-name statistics ucl [ slot slot-id ] { inbound | outbound } [ verbose { classifier-based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
display traffic policy [ name policy-name ] statistics { bridge-domain bdid vxlan-mode | vpn-instance vpn-instance-name vxlan-mode } { inbound | outbound } [ verbose { classifier-based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
display traffic policy statistics evpn-instance evpn-instance-name inbound [ verbose { classifier-based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
display traffic policy statistics accounting-service [ slot slot-id ] { inbound | outbound } [ verbose { classifier-based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
display traffic policy [ name policy-name ] statistics { vsi vsi-instance-name [ ac-mode ] | vpn-instance vpn-instance-name } { inbound | outbound } [ verbose { classifier-based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
display traffic policy [ name policy-name ] statistics { vsi vsi-instance-name [ ac-mode ] | vpn-instance vpn-instance-name } slot slot-id { inbound | outbound } [ verbose { classifier-based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
Parameter | Description | Value |
---|---|---|
slot slot-id |
Specifies a slot ID. |
The value is different for different devices. |
inbound |
Displays the statistics about the traffic policy applied to the interface in the inbound direction. |
- |
outbound |
Displays the statistics about the traffic policy applied to the interface in the outbound direction. |
- |
verbose |
Displays detailed information about the traffic policy. |
- |
classifier-based |
Displays the statistics about the traffic policy based on traffic classifiers. If this keyword is specified, you can view the detailed statistics about the traffic classifier and traffic behavior in the traffic policy. |
- |
class class-name |
Specifies the name of a traffic classifier to be displayed. |
The value is a string of 1 to 127 case-sensitive characters. |
rule-based |
Displays the statistics about the traffic policy based on the traffic classification rule. If this keyword is specified, you can view the detailed statistics about the rules that are used for traffic classification. |
- |
filter |
Filters out statistics of 0. |
- |
name |
Specify the name of traffic policy. |
- |
name policy-name |
Specifies the name of a traffic policy. |
The value is a string of 1 to 127 case-sensitive characters. |
interface |
Interface. |
- |
interface-type |
Specifies the type of an interface. |
- |
interface-number |
Specifies the number of an interface. |
- |
vlan vlan-id |
Specifies a VLAN ID. |
The value is an integer in the range 1 to 4094. |
pe-vid pe-vid |
Specifies a PE VLAN ID. |
The value is an integer in the range 1 to 4094. |
ce-vid ce-vid |
Specifies a CE VLAN ID. |
The value is an integer in the range 1 to 4094. |
vid vid |
Specifies the external VLAN ID of the interface traffic policy statistics. |
The value is an integer in the range 1 to 4094. |
bridge-domain bdid |
Specifies the ID of a bridge domain. |
The value is an integer in the range 1 to 16777215. |
global-acl |
Displays global traffic policy statistics. |
- |
ucl |
Displays the statistics about the UCL-based traffic policy. |
- |
vsi vsi-instance-name |
Specifies the name of a VSI. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
vpn-instance |
Vpn-instance. |
- |
vpn-instance vpn-instance-name |
VPN instance name. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
vxlan-mode |
Displays traffic policy statistics in the L2VNI/L3VNI scenarios. |
- |
evpn-instance evpn-instance-name |
Specifies the name of a EVPN instance. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
accounting-service |
Displays traffic policy statistics about DAA services. |
- |
ac-mode |
Indicates AC-side traffic policies. |
- |
Usage Scenario
After a traffic policy is configured and applied to an interface, you can run the display traffic policy statistics command to view detailed statistics about the traffic policy on a specified interface.
Precautions
When traffic behaviors and traffic classifiers change, the statistics inherit the historical data.
The output of the command includes three time values: the time when the traffic policy is applied, the time when the last policy statistics function is enabled or disabled, and the time when the last policy statistics are cleared. If the traffic policy is applied to different interfaces, the three values vary with the interfaces because they are set respectively on the interfaces. The display traffic policy statistics command based on the BD, VPN instance or VSI does not have a corresponding MIB object.The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display traffic policy statistics interface gigabitethernet 0/1/0 inbound verbose rule-based class test2 Info: The statistics is shared because the policy is shared. Interface: GigabitEthernet0/1/0 Traffic policy inbound: test2 Traffic policy applied at 2007-08-30 18:30:20 Statistics enabled at 2007-08-30 18:30:20 Statistics last cleared: Never Rule number: 7 IPv4, 0 IPv6 Current status: OK! Classifier: test2 operator or if-match acl 3000 precedence 1 rule 5 permit ip source 1.1.1.1 0 0 bytes, 0 packets Last 30 seconds rate 0 pps, 0 bps
<HUAWEI> display traffic policy statistics evpn-instance evpn inbound Traffic policy inbound: evpn Slot: 1 Traffic policy applied at 2016-07-22 13:20:45 Statistics enabled at 2016-07-22 13:20:45 Statistics last cleared: Never Rule number: 6 IPv4, 0 IPv6 Current status: OK! Item Packets Bytes ------------------------------------------------------------------- Matched 7,539,912 965,108,736 +--Passed 7,539,912 965,108,736 +--Dropped 0 0 Missed 0 0 Last 30 seconds rate Item pps bps ------------------------------------------------------------------- Matched 827,653 847,515,912 +--Passed 827,653 847,515,912 +--Dropped 0 0 Missed 0 0
<HUAWEI> display traffic policy statistics vsi vsi1 inbound Traffic policy inbound: vsi1 Slot: 1 Traffic policy applied at 2016-07-22 13:20:45 Statistics enabled at 2016-07-22 13:20:45 Statistics last cleared: Never Rule number: 6 IPv4, 0 IPv6 Current status: OK! Item Packets Bytes ------------------------------------------------------------------- Matched 7,539,912 965,108,736 +--Passed 7,539,912 965,108,736 +--Dropped 0 0 Missed 0 0 Last 30 seconds rate Item pps bps ------------------------------------------------------------------- Matched 827,653 847,515,912 +--Passed 827,653 847,515,912 +--Dropped 0 0 Missed 0 0
<HUAWEI> display traffic policy statistics bridge-domain 1 inbound
Bridge-domain: 1
Info: Shared policy statistics are displayd based on a board.
Traffic policy inbound: 1
Traffic policy applied at 1970-01-01 01:03:29
Statistics enabled at 1970-01-01 00:20:55
Statistics last cleared: Never
Rule number: 3 IPv4, 1 IPv6
Current status: OK!
Item Packets Bytes
-------------------------------------------------------------------
Matched 0 0
+--Passed 0 0
+--Dropped 0 0
Missed 0 0
Last 30 seconds rate
Item pps bps
-------------------------------------------------------------------
Matched 0 0
+--Passed 0 0
+--Dropped 0 0
Missed
<HUAWEI> display traffic policy statistics interface gigabitethernet 0/1/0 inbound Interface: GigabitEthernet0/1/0 Traffic policy inbound: test Traffic policy applied at 2007-08-30 18:30:20 Statistics enabled at 2007-08-30 18:30:20 Statistics last cleared: Never Rule number: 7 IPv4, 1 IPv6 Current status: OK! Item Packets Bytes ------------------------------------------------------------------- Matched 1,000 100,000 +--Passed N/A N/A +--Dropped N/A N/A Missed 500 50,000 Last 30 seconds rate Item pps bps ------------------------------------------------------------------- Matched 1,000 100,000 +--Passed N/A N/A +--Dropped N/A N/A Missed 500 50,000
<HUAWEI> display traffic policy statistics interface gigabitethernet 0/1/0 inbound verbose classifier-based Info: The statistics is shared because the policy is shared. Interface: GigabitEthernet0/1/0 Traffic policy inbound: test Traffic policy applied at 2007-08-30 18:30:20 Statistics enabled at 2007-08-30 18:30:20 Statistics last cleared: Never Rule number: 7 IPv4, 0 IPv6 Current status: OK! Classifier: test1 operator and Behavior: test1 Firewall: permit Marking: remark dscp 4 Item Packets Bytes ------------------------------------------------------------------- Matched 1,000 100,000 +--Passed N/A N/A +--Dropped N/A N/A Last 30 seconds rate Item pps bps ------------------------------------------------------------------- Matched 1,000 100,000 +--Passed N/A N/A +--Dropped N/A N/A Current CAR statistics: Item Packets Bytes ------------------------------------------------------------------- Green 1,000 100,000 Yellow 500 50,000 Red 500 50,000 Passed 100 10,000 Dropped 100 10,000 Last 30 seconds rate Item pps bps ------------------------------------------------------------------- Green 1,000 100,000 Yellow 500 50,000 Red 500 50,000 Passed 100 10,000 Dropped 100 10,000
Item | Description |
---|---|
inbound | Inbound. |
Traffic policy inbound | Name of the traffic policy applied in the inbound direction. |
Traffic policy applied at 2007-08-30 18:30:20 | Time when the traffic policy is applied. |
Traffic policy outbound | Name of the traffic policy applied to outgoing traffic. |
Statistics last cleared | Last time when the statistics are cleared. |
Rule number | Rule number. |
Current CAR statistics | Current statistics about the CAR. The information is displayed only when CAR is configured for the traffic behavior of the current traffic classifier. |
Current status | Current status. |
Last 30 seconds rate | Statistics about the traffic rate in the last 30 seconds,in pps and bps.For the meaning of the items under this item,see the preceding description.The difference is that the preceding statistics show the number of packets and bytes;here,the statistics show packet rate (in pps) and bit rate (in bps). |
Last 30 seconds rate | Traffic rate in the last 30 seconds, in pps and bps. For the meaning of the items under this item, see the preceding description. The difference is that the preceding statistics show the number of packets and bytes; here, the statistics show packet rate (in pps) and bit rate (in bps). |
Matched | Number and bytes of packets that match the classifier. All statistics from the last time the historical statistics are cleared are displayed. |
Missed | Number and bytes of packets that do not match the classifier. All statistics from the last time the historical statistics are cleared are displayed. |
Green | Number and bytes of packets marked with green color in the traffic classifier and will be performed with the CAR behavior. All the current statistics are displayed. |
Yellow | Number and bytes of packets marked with yellow color in the traffic classifier and will be performed with the CAR behavior. All the current statistics are displayed. |
Red | Number and bytes of packets marked with red color in the traffic classifier and will be performed with the CAR behavior. All the current statistics are displayed. |
Passed | Number and bytes of the packets that match the classifier and are permitted to pass. All statistics from the last time the historical statistics are cleared are displayed. |
Dropped | Number and bytes of the packets that match the classifier and are discarded. All statistics from the last time the historical statistics are cleared are displayed. The value is the statistics on the packets only dropped through Filter. |
Interface | Interface where the traffic policy is applied. |
Behavior | Traffic behavior name. |
Classifier | Name of the traffic classifier and the logical relationship between its classification rules. If the logical relationship between the classification rules is AND, the classifier does not support statistics based on traffic classification rules and only the matching statistics are displayed. |
Bridge-domain | Bridge-domain where the traffic policy is applied. |