最佳答案
[H3C]acl number 3333
[H3C-acl-adv-3333]description traffic accounting for host A to host B
[H3C-acl-adv-3333]rule 10 permit tcp source 1.1.1.1 0.0.0.0 destination 2.2.2.2 0.0.0.0 destination-port eq 80
定义流分类,匹配acl定义的PCA访问PCB的web流量。
[H3C]traffic classifier traffic_accounting_from_A_to_B
[H3C-classifier-traffic_accounting_from_A_to_B]if-match acl 3333
定义流行为,统计报文个数
[H3C]traffic behavior traffic_accounting_from_A_to_B
[H3C-behavior-traffic_accounting_from_A_to_B]accounting packet
定义qos策略,关联流分类和流行为
[H3C]qos policy traffic_accounting_from_A_to_B
[H3C-qospolicy-traffic_accounting_from_A_to_B]classifier traffic_accounting_from_A_to_B behavior traffic_accounting_from_A_to_B
在2/0/1的入方向和2/0/2的出访问下发qos策略,来统计报文是否到达设备和是否被设备转发给PCB。
[H3C]interface GigabitEthernet2/0/1
[H3C-GigabitEthernet2/0/1]qos apply policy traffic_accounting_from_A_to_B inbound
[H3C]interface GigabitEthernet2/0/2
[H3C-GigabitEthernet2/0/2]qos apply policy traffic_accounting_from_A_to_B outbound
使PCA访问PCB,查看接口GigabitEthernet2/0/1流量统计结果
[H3C]display qos policy interface GigabitEthernet 2/0/1
Interface: GigabitEthernet2/0/1
Direction: Inbound
Policy: traffic_accounting_from_A_to_B
Classifier: traffic_accounting_from_A_to_B
Operator: AND
Rule(s) : If-match acl 3333
Behavior: traffic_accounting_from_A_to_B
Accounting Enable:
详细参考https://zhiliao.h3c.com/Theme/details/3839
(0)
配置ACL匹配ping的源目地址
acl ad 3876
rule 0 permit icmp source 192.168.128.3 0 destination 192.168.128.2 0
rule 5 permit icmp source 192.168.128.2 0 destination 192.168.128.3 0
quit
traffic classifier aaa
if-match acl 3876
quit
traffic behavior aaa
accounting packet
quit
qos policy aaa
classifier aaa behavior aaa
quit
在流量经过的接口调用
interface GigabitEthernet 1/0/2
qos apply policy aaa inbound
qos apply policy aaa outbound
quit
interface GigabitEthernet1/0/1
qos apply policy aaa inbound
qos apply policy aaa outbound
quit
reset counters interface g1/0/2 清空接口下的统计数量
reset counters interface g1/0/1
上面这些配置完之后,ping一段时间,记录ping包个数,丢失个数,ping固定长度的包,比如50个
查看接口流量统计信息:
[H3C]display qos policy interface GigabitEthernet 1/0/1
[H3C]display qos policy interface GigabitEthernet 1/0/2
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论