Traffic statistics collection on S series switch

19

On S series switches (except S1700 switches), the statistic enable command in the traffic behavior view can be used to enable traffic statistics collection in the traffic behavior.
To view the statistics about packets matching a traffic policy, enable the traffic statistics collection function. After the traffic statistics collection function is enabled, you can run the display traffic policy statistics command to view packet statistics.
For the example for configuring traffic statistics, see "Example for Configuring Traffic Statistics" in Typical QoS Configuration.

Other related questions:
Traffic statistics collection on S series switch
On S series switches (except S1700 switches), the statistic enable command in the traffic behavior view can be used to enable traffic statistics collection in the traffic behavior. To view the statistics about packets matching a traffic policy, enable the traffic statistics collection function. After the traffic statistics collection function is enabled, you can run the display traffic policy statistics command to view packet statistics. For the example for configuring traffic statistics, see "Example for Configuring Traffic Statistics" in Typical QoS Configuration.

How to configure a CE series switch to collect traffic statistics using traffic policies
- Configure a switch to collect statistics on traffic from a specified host. In the following example, the switch is configured to collect traffic statistics on packets with the source MAC address of 0000-0000-0003. <HUAWEI> system-view [~HUAWEI] acl 4000 [*HUAWEI-acl-L2-4000] rule permit source-mac 0000-0000-0003 ffff-ffff-ffff [*HUAWEI-acl-L2-4000] quit [*HUAWEI] traffic classifier c1 [*HUAWEI-classifier-c1] if-match acl 4000 [*HUAWEI-classifier-c1] quit [*HUAWEI] traffic behavior b1 [*HUAWEI-behavior-b1] statistic enable [*HUAWEI-behavior-b1] quit [*HUAWEI] traffic policy p1 [*HUAWEI-trafficpolicy-p1] classifier c1 behavior b1 [*HUAWEI-trafficpolicy-p1] quit [*HUAWEI] interface 10ge 1/0/1 [*HUAWEI-10GE1/0/1] traffic-policy p1 inbound [*HUAWEI-10GE1/0/1] traffic-policy p1 outbound [*HUAWEI-10GE1/0/1] quit [*HUAWEI] commit - Configure a switch to collect traffic statistics on ICMP packets received and sent on an interface. <HUAWEI> system-view [~HUAWEI] acl 3000 [*HUAWEI-acl4-advance-3000] rule 0 permit icmp source 192.168.1.1 0 destination 192.168.2.1 0 [*HUAWEI-acl4-advance-3000] rule 5 permit icmp source 192.168.2.1 0 destination 192.168.1.1 0 [*HUAWEI-acl4-advance-3000] quit [*HUAWEI] traffic classifier c1 [*HUAWEI-classifier-c1] if-match acl 3000 [*HUAWEI-classifier-c1] quit [*HUAWEI] traffic behavior b1 [*HUAWEI-behavior-b1] statistic enable [*HUAWEI-behavior-b1] quit [*HUAWEI] traffic policy p1 [*HUAWEI-trafficpolicy-p1] classifier c1 behavior b1 [*HUAWEI-trafficpolicy-p1] quit [*HUAWEI] interface 10ge 1/0/1 [*HUAWEI-10GE1/0/1] traffic-policy p1 inbound [*HUAWEI-10GE1/0/1] traffic-policy p1 outbound [*HUAWEI-10GE1/0/1] quit [*HUAWEI] commit - Configure a switch to collect traffic statistics on ARP packets received and sent on an interface. <HUAWEI> system-view [~HUAWEI] traffic classifier arp-request [*HUAWEI-classifier-arp-request] if-match l2-protocol arp [*HUAWEI-classifier-arp-request] if-match source-mac 1111-1111-1111 [*HUAWEI-classifier-arp-request] if-match destination-mac ffff-ffff-ffff [*HUAWEI-classifier-arp-request] quit [*HUAWEI] traffic classifier arp-reply [*HUAWEI-classifier-arp-reply] if-match l2-protocol arp [*HUAWEI-classifier-arp-reply] if-match source-mac 2222-2222-2222 [*HUAWEI-classifier-arp-reply] if-match destination-mac 1111-1111-1111 [*HUAWEI-classifier-arp-reply] quit [*HUAWEI] traffic behavior b1 [*HUAWEI-behavior-b1] statistic enable [*HUAWEI-behavior-b1] quit [*HUAWEI] traffic policy arp-request [*HUAWEI-trafficpolicy-arp-request] classifier arp-request behavior b1 [*HUAWEI-trafficpolicy-arp-request] quit [*HUAWEI] traffic policy arp-reply [*HUAWEI-trafficpolicy-arp-reply] classifier arp-reply behavior b1 [*HUAWEI-trafficpolicy-arp-reply] quit [*HUAWEI] interface 10ge 1/0/1 [*HUAWEI-10GE1/0/1] traffic-policy arp-request inbound [*HUAWEI-10GE1/0/1] traffic-policy arp-reply outbound [*HUAWEI-10GE1/0/1] quit [*HUAWEI] commit - Check packet statistics. After configuring a switch to collect packet statistics using a traffic policy, run the following command to view packet statistics. # Display the statistics on incoming packets matching a rule after the traffic policy is applied to the system. <HUAWEI> display traffic-policy statistics global inbound rule-base Traffic policy: p1, inbound -------------------------------------------------------------------------------- Classifier: c1, Behavior: b1 Slot : 1 ---------------------------------------------------------------------------- if-match any Passed Packets 2100593, Passed Bytes 135076448 Dropped Packets 9269310796, Dropped Bytes 595376105640 ----------------------------------------------------------------------------

How to configure the interval for collecting traffic statistics on an interface of a CE series switch
The procedure for configuring the interval for collecting traffic statistics on an interface of a CE series switch is described on the right.

Do CE12800 series switches support traffic statistics collection on sub-interfaces
In V200R001C00 and later versions, CE12800 series switches support traffic statistics collection on Layer 3 sub-interfaces.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top