Common QoS Operations : Configuring Traffic Statistics in a Traffic Policy

Latest reply: Jul 26, 2016 13:15:20 2390 1 0 1

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 gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] traffic-policy p1 inbound
[HUAWEI-GigabitEthernet0/0/1] traffic-policy p1 outbound

Configuring the Switch to Collect Statistics on ICMP Packets

<HUAWEI> system-view 
[HUAWEI] acl 3000
[HUAWEI-acl-adv-3000] rule 0 permit icmp source 192.168.1.1 0 destination 192.168.2.1 0
[HUAWEI-acl-adv-3000] rule 5 permit icmp source 192.168.2.1 0 destination 192.168.1.1 0
[HUAWEI-acl-adv-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 gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] traffic-policy p1 inbound
[HUAWEI-GigabitEthernet0/0/1] traffic-policy p1 outbound

Configuring the Switch to Collect Statistics on ARP Packets

Configure the switch to collect statistics on ARP Request and Reply packets.

<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 gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] traffic-policy arp-request inbound
[HUAWEI-GigabitEthernet0/0/1] traffic-policy arp-reply outbound

Checking Packet Statistics

After traffic statistics 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 interface gigabitethernet 0/0/1 inbound verbose rule-base

  Interface: GigabitEthernet0/0/1                                                
  Traffic policy inbound: arp-request                                            
  Rule number: 1                                                                 
  Current status: success                                                            
  Statistics interval: 300                                                       
 ---------------------------------------------------------------------           
  Classifier: arp-request operator and                                           
  Behavior: b1                                                                   
  if-match l2-protocol arp                                                       
  if-match source-mac 1111-1111-1111                                             
  if-match destination-mac ffff-ffff-ffff                                        
  Board : 0                                                                      
 ---------------------------------------------------------------------           
  Passed           |      Packets:                             0                 
                   |      Bytes:                               0                 
                   |      Rate(pps):                           0                 
                   |      Rate(bps):                           0                 
 ---------------------------------------------------------------------           
  Dropped          |      Packets:                             0                 
                   |      Bytes:                               0                 
                   |      Rate(pps):                           0                 
                   |      Rate(bps):                           0                 
 --------------------------------------------------------------------- 
 
 
  • x
  • convention:

user_235153 Created Jul 26, 2016 13:15:20 Helpful(0) Helpful(0)

Common QoS Operations : Configuring Traffic Statistics in a Traffic Policy

感谢分享。

  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!

Login and enjoy all the member benefits

Login
Fast reply Scroll to top