资料中心

H3C Comware V7平台交换机 ACL Hardware-count 功能典型配置

2020-09-01发表
  • 1收藏
河子 八段

描述

组网及说明


需要对符合特定规则的报文,进行硬件统计。  

本实例对从S10500系列交换机 GigabitEthernet1/1/0/42端口匹配源IP为192.168.1.10的ICMP报文进行硬件统计。


配置步骤


 (1) 配置相关acl,以匹配特定报文

 [H3C] acl number 3333

 [H3C-acl-adv-3333] rule 1 permit icmp source 192.168.1.10 0 counting


 (2) 下发acl到对应端口G1/1/0/42

 [H3C] int g1/1/0/42

 [H3C-GigabitEthernet1/0/1] packet-filter 3001 inbound hardware-count


 (3) 检查统计结果

[H3C]display packet-filter statistics interface g 1/1/0/42 inbound

Interface: GigabitEthernet1/1/0/42

 Inbound policy:

  IPv4 ACL 3333, Hardware-count

   From 2019-01-31 02:57:37 to 2019-01-31 02:57:42

   rule 1 permit icmp source 192.168.1.10 0 counting

   Totally 0 packets permitted, 0 packets denied

   Totally 0% permitted, 0% denied


[H3C]ping 192.168.1.10

Ping 192.168.1.10 (192.168.1.10): 56 data bytes, press CTRL+C to break

56 bytes from 192.168.1.10: icmp_seq=0 ttl=255 time=2.021 ms

56 bytes from 192.168.1.10: icmp_seq=1 ttl=255 time=2.182 ms

56 bytes from 192.168.1.10: icmp_seq=2 ttl=255 time=1.522 ms

56 bytes from 192.168.1.10: icmp_seq=3 ttl=255 time=1.518 ms

56 bytes from 192.168.1.10: icmp_seq=4 ttl=255 time=1.674 ms

 

--- Ping statistics for 192.168.1.10 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 1.518/1.783/2.182/0.271 ms

[Spine]%Jan 31 00:25:03:165 2019 Spine PING/6/PING_STATISTICS: -MDC=1; Ping statistics for 192.168.1.10: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.518/1.783/2.182/0.271 ms.


[Spine]dis packet-filter statistics interface g 1/1/0/42 inbound

Interface: GigabitEthernet1/1/0/42

 Inbound policy:

  IPv4 ACL 3333, Hardware-count

   From 2019-01-31 02:57:37 to 2019-01-31 02:59:23

   rule 1 permit icmp source 192.168.1.10 0 counting (5 packets)

   Totally 5 packets permitted, 0 packets denied

   Totally 100% permitted, 0% denied


配置关键点


若需要重置统计计数,可通过reset packet-filter statistics interface命令操作

<H3C>reset packet-filter statistics interface GigabitEthernet 1/1/0/42 inbound


<H3C>display packet-filter statistics  interface GigabitEthernet 1/1/0/42 inbound

Interface: GigabitEthernet1/1/0/42

 Inbound policy:

  IPv4 ACL 3333, Hardware-count

   From 2019-01-31 03:03:45 to 2019-01-31 03:04:08

   rule 1 permit icmp source 192.168.1.10 0 counting

   Totally 0 packets permitted, 0 packets denied

   Totally 0% permitted, 0% denied

提出建议

    +

亲~登录后才可以操作哦!

确定

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作