S8500交换机 流量统计的配置
一、简单介绍
流量统计用于统计指定业务流的数据包,它统计的是交换机转发的数据包中匹配已定义的访问控制列表的数据信息。在进行了流量统计配置之后,用户可以使用命令display qos-interface traffic-statistic显示统计的信息。
二、S8500设备配置实例
1.组网需求
PC的IP地址为192.168.0.2/24,连接交换机端口GE5/1/1,Server的IP地址为196.1.1.1/24,连接交换机端口GE5/1/1。要求在每天24小时时间段内,交换机对PC发往Server的报文进行统计。
2.组网图
流量统计配置组网图
3. 配置步骤
<H3C>sys
System View: return to User View with Ctrl+Z.
(1)定义PC报文的流规则。
[H3C]acl num 3000
[H3C-acl-adv-3000] rule 0 permit ip sou 192.168.0.2 0.0.0.0 des 196.1.1.1 0.0.0.0
(2)在端口GE5/1/1上对PC发往Server的报文进行统计 [H3C-GigabitEthernet5/1/1] traffic-statistic inbound ip-group 3000 rule 0
(3)通过display命令查看统计结果,由于此时没有任何报文从PC发往Server,因此看到统计数据均为零。
[H3C] display qos-interface GigabitEthernet5/1/1 traffic-statistic
GigabitEthernet5/1/1: traffic-statistic
Inbound:
Matches: Acl 3000 rule 0 running
0 byte (green 0 byte(s), yellow 0 byte(s), red 0 byte(s) )
0 packet
(4)在PC向Server发送大量ping包后再查看
[H3C-acl-adv-3000]dis qos-interface gi5/1/1 traffic-statistic
GigabitEthernet5/1/1: traffic-statistic
Inbound:
Matches: Acl 3000 rule 0 running
1204224 bytes (green 0 byte(s), yellow 0 byte(s), red 0 byte(s) )
804 packets
(5)在以太网端口视图视图下执行reset traffic-statistic命令可以将有关QoS的统计信息清除。
[H3C-GigabitEthernet5/1/1]reset traffic-statistic in ip 3000 rule 0
[H3C-GigabitEthernet5/1/1]dis qos-interface gi5/1/1 traffic-statistic
GigabitEthernet5/1/1: traffic-statistic
Inbound:
Matches: Acl 3000 rule 0 running
0 byte (green 0 byte(s), yellow 0 byte(s), red 0 byte(s) )
0 packet
三、正确配置状态显示
[H3C]dis qos-interface gi5/1/1 traffic-statistic
GigabitEthernet5/1/1: traffic-statistic
Inbound:
Matches: Acl 3000 rule 0 running
1204224 bytes (green 0 byte(s), yellow 0 byte(s), red 0 byte(s) )
804 packets
[H3C]dis cu
#
acl number 3000
rule 0 permit ip source 192.168.0.2 0 destination 196.1.1.1 0
#
interface GigabitEthernet5/1/1
port access vlan 2
traffic-statistic inbound ip-group 3000 rule 0 system-index 1 tc-index 1
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作