Configure the Traffic Statistics Function on S2300&S3300&S5300

m7g
m7g  Diamond  (1)
7 years 10 months ago  View: 1373  Reply: 1
1F
        Assume that the statistics on ping packets from 10.1.1.0/24 need to be collected on the interface Ethernet0/0/1. The configuration is as follows:


# Configuration the acl rule.

[HUAWEI] acl number 3333
[HUAWEI-acl-adv-3333] rule 5 permit icmp source 10.1.1.0 0.0.0.255

[HUAWEI-acl-adv-3333] quit


# Configuration the traffic classifier.
[HUAWEI] traffic classifier test
[HUAWEI-classifier-test] if-match acl 3333

[HUAWEI-classifier-test] quit


# Configuration the traffic behavior:
  •  Before the version of S2300&S3300&S5300 V100R005.
[HUAWEI] traffic behavior test
[HUAWEI-behavior-test] count

[HUAWEI-behavior-test] quit

  •  After the version of S2300&S3300&S5300 V100R005.
[HUAWEI] traffic behavior test
[HUAWEI-behavior-test] statistic enable

[HUAWEI-behavior-test] quit


# Configuration the traffic policy.
[HUAWEI] traffic policy test
[HUAWEI-trafficpolicy-test] classifier test behavior test

[HUAWEI-trafficpolicy-test] quit


# Apply the traffic policy:
  •  # Apply the traffic policy test to the S2300 or S3300.
[HUAWEI] interface ethernet0/0/1
[HUAWEI-Ethernet0/0/1] traffic-policy test inbound
  •  # Apply the traffic policy test to the S5300.
[HUAWEI] interface gigabitethernet0/0/1
[HUAWEI-GigabitEthernet0/0/1] traffic-policy test inbound


After the configuration, run the display traffic policy statistics interface interface-type interface-number command to view the traffic statistics. To re-collect traffic statistics, run the reset traffic policy statistics interface interface-type interface-number command to clear existing traffic statistics first.


m7g
m7g  Diamond 
7 years 10 months ago
2F

 The S2300 or S3300 can collect statistics only on incoming packets.

 The S5300 can collect statistics on incoming and outgoing packets, but cannot collect statistics on packets sent from its own CPU.