FAQ:NE、AR 系列路由器流量统计配置以及差异

发布时间:  2014-11-26 浏览次数:  425 下载次数:  1
问题描述
NE 系列以及AR G1 、G3  系列路由器流量统计配置以及差异
解决方案
AR G1 系列流量统计命令:
[R16-AR4620]firewall enable

[R16-AR4620]acl number 3333
[R16-AR4620-acl-adv-3333]rule permit icmp source 100.12.16.0 0.0.0.3 destination 100.16.17.0 0.0.0.3

[R16-AR4620]int ethe0/0/1
[R16-AR4620-Ethernet0/0/1]firewall packet-filter 3333 inbound


AR G3系列流量统计
[AR2220]acl 3001
[AR2220-acl-adv-3000]rule deny ip destination 220.1.1.8 0  设定需要屏蔽的目的地址

[AR2220]traffic classifier abc
[[AR2220-classifier-abc]if-match acl 3001   定义流分类的原则为该acl3001

[AR2220]traffic behavior abc
[AR2220-behavior-abc]permit        定义流行为的原则为允许

[AR2220]traffic policy abc             
[AR2220-trafficpolicy-abc]classifier abc behavior abc       定义一个流策略,将流分类和流行为关联起来

[AR2220]interface gig 0/0/0
[AR2220 -GigabitEthernet0/0/0]traffic-policy abc outbound        在出接口的出方向使能该流策略


查看流通结果方法:
[AR2200]display traffic policy statistics interface GigabitEthernet 0/0/0 outbound
NE20流量统计命令:
[R15-NE20]acl statistic enable

[R15-NE20]acl 3333
[R15-NE20-acl-adv-3333]rule permit icmp source 100.8.15.0 0.0.0.3 destination 100.15.19.0 0.0.0.3

[R15-NE20]traffic classifier icmp
[R15-NE20-classifier-icmpin]if-match acl 3333

[R15-NE20]traffic behavior icmpin
[R15-NE20-behavior-icmpin]car cir 1000000

[R15-NE20]traffic policy icmpin
[R15-NE20-trafficpolicy-icmpin]classifier icmpin behavior icmpin

[R15-NE20]interface ethe 1/0/0
[R15-NE20-Ethernet1/0/0]traffic-policy icmpin inbound


NE40-4流量统计命令:
[R10-NE40-4]acl 11111
[R10-NE40-4-acl-simple-10002]rule icmp source 100.9.17.1 0.0.0.3 destination 100.9.17.2 0.0.0.3

[R10-NE40-4]traffic classifier icmpin l2/l3
[R10-NE40-4-classifier-icmpin]if-match acl 11111

[R10-NE40-4]traffic behavior icmpin
[R10-NE40-4-behavior-icmpin]q

[R10-NE40-4]traffic policy icmpin
[R10-NE40-4-trafficpolicy-icmpin]classifier icmpin behavior icmpin

[R10-NE40-4]interface ethe 4/0/1
[R10-NE40-4-Ethernet4/0/1]traffic-policy icmpin inbound

[R10-NE40-4]acl ?
  INTEGER<1000-1999>    Interface access-list(add to current using rules)
  INTEGER<10000-42767>  Specify a simple acl group
  INTEGER<2000-2999>    Basic access-list(add to current using rules)
  INTEGER<3000-3999>    Advanced access-list(add to current using rules)
  INTEGER<5000-5999>    Specify a L2 acl group
  number                Specify a numbered acl

[R10-NE40-4]commit traffic policy



NE40E流量统计命令:
[R2-NE40E-8]acl 3001
[R2-NE40E-8-acl-adv-3001]rule permit icmp source 100.3.9.1 0.0.0.3 destination 100.3.9.2 0.0.0.3

[R2-NE40E-8]traffic classifier icmpin operator or
[R2-NE40E-8-classifier-icmpin]if-match acl 3001

[R2-NE40E-8]traffic behavior icmpin
[R2-NE40E-8-behavior-icmpin]q

[R2-NE40E-8]traffic policy icmpin
[R2-NE40E-8-trafficpolicy-icmpin]classifier icmpin behavior icmpin

[R2-NE40E-8]interface gig 3/0/0
[R2-NE40E-8-GigabitEthernet3/0/0]traffic-policy icmpin inbound

[R2-NE40E-8]traffic policy icmpin
[R2-NE40E-8-trafficpolicy-icmpin]statistics enable

[R2-NE40E-8]display traffic policy statistics interface gig 3/0/0 inbound verbose rule-based 
Info: The statistics is shared because the policy is shared.
Interface: GigabitEthernet3/0/0
Traffic policy inbound: icmpin
Traffic policy applied at 2000-01-25 12:16:14
Statistics enabled at 2000-01-25 12:35:32
Statistics last cleared: Never
Rule number: 5 IPv4, 0 IPv6
Current status: OK!

Classifier: icmpin operator or
if-match ACL 3001
rule 5 permit icmp source 100.2.32.1 0 destination 100.2.32.2 0
0 bytes, 0 packets
Last 30 seconds rate 0 pps, 0 bps
rule 10 permit icmp source 100.3.9.0 0.0.0.3 destination 100.3.9.0 0.0.0.3
0 bytes, 0 packets
Last 30 seconds rate 0 pps, 0 bps

END