No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Common Operation Guide

CloudEngine 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring Traffic Statistics in a Traffic Policy

Configuring Traffic Statistics in a Traffic Policy

Configuring the Switch to Collect Traffic Statistics About a Specified Host

Configure the switch to collect 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

Configuring the Switch to Collect Statistics on ICMP Packets

Configure the switch to collect 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

Configuring the Switch to Collect Statistics on ARP Packets

Configure the switch to collect statistics on ARP Request and Reply packets sent by 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

Checking Packet Statistics

After the traffic statistics action is defined in a traffic policy, run the following command to view packet statistics.

# Display statistics on incoming packets matching the traffic policy that has been 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                       0, Passed Bytes                       0
    Passed pps                           0, Passed bps                         0
    Dropped Packets                   2000, Dropped Bytes                 200000
    Dropped pps                          0, Dropped bps                        0
    ----------------------------------------------------------------------------
Translation
Download
Updated: 2018-10-08

Document ID: EDOC1000102369

Views: 142242

Downloads: 3158

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next