FAQ: NE20 流量统计方法

发布时间:  2014-12-26 浏览次数:  187 下载次数:  0
问题描述
NE20&20E较早的设备如何做流量统计?

(适用版本  V2R3  V2R5)
解决方案
假如您的组网结构如下:
   PC-----2352----(eth1/0/0)NE20-(ethe2/0/0)--……server

假如PC ip 1.1.1.1 ,server ip 2.2.2.2 ,pc ping server 丢包,可通过如下方法测试

1、使能acl统计功能,系统视图下配置:acl statistic enable
2、配置策略并下发到接口

acl number 3000
rule 5 permit icmp source 1.1.1.1 0 destination 2.2.2.2 0

acl number 3001
rule 5 permit icmp source 1.1.1.1 0 destination 2.2.2.2 0

acl number 3002
rule 5 permit icmp source 2.2.2.2 0 destination 1.1.1.1 0

acl number 3003
rule 5 permit icmp source 2.2.2.2 0 destination 1.1.1.1 0

traffic classifier 1
if-match acl 3000
#
traffic classifier 2
if-match acl 3001

traffic classifier 3
if-match acl 3002

traffic classifier 4
if-match acl 3003

traffic behavior 1
car cir 1000000 cbs 98304 green pass yellow remark red discard
#

traffic policy test-ru
classifier 1 behavior 1

traffic policy test2-chu
classifier 2 behavior 1

traffic policy test2-ru
classifier 3 behavior 1

traffic policy test-chu
classifier 4 behavior 1

在上下行口分别下发策略:

interface Ethernet 1/0/0
ip address 100.0.35.1 255.255.255.252
traffic-policy test-ru inbound
traffic-policy test-ru outbound



interface Ethernet 2/0/0
ip address 10.0.0.1 255.255.255.252
traffic-policy test2-ru inbound
traffic-policy test2-chu outbound

然后PC ping 2.2.2.2 ping 100 个包,通过如下命令查看丢包计数:

[R3-NE20]disp acl statistic 3000
ACL  3001
  packets matched  = 40 pkts
  packets cared    = 0 pkts
  packets filtered = 0 pkts

假如4个acl 全部匹配100个包,则说明设备没问题,建议查看上层网络,如果匹配计数少了,可根据acl 号判断丢包在哪个方向,从而进一步分析定位

END