博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
2.5. 流量控制
阅读量:7264 次
发布时间:2019-06-29

本文共 5200 字,大约阅读时间需要 17 分钟。

2.5.1. 基于接口

cir 它必须是64的倍数

qos lr outbound cir 64 64Kbps

qos lr outbound cir 1024 1Mbps

[H3C-GigabitEthernet1/0/18]di this#interface GigabitEthernet1/0/18 port access vlan 9 qos lr outbound cir 64 cbs 4000 qos apply policy 20 inbound dhcp-snooping trust#return

察看状态

display qos lr interface GigabitEthernet 1/0/18

2.5.2. 基于 ACL

acl number 3009rule 0 permit ip source 192.168.9.0 0.0.0.255traffic classifier traffic-limitif-match acl 3009traffic behavior traffic-limitcar cir 1024qos policy traffic-limitclassifier traffic-limit behavior traffic-limitinterface GigabitEthernet1/0/18qos apply policy traffic-limit inbound
[H3C]acl number 3009[H3C-acl-adv-3009]rule 0 permit ip source 192.168.9.0 0.0.0.255[H3C-acl-adv-3009][H3C-acl-adv-3009]traffic classifier traffic-limit[H3C-classifier-traffic-limit]if-match acl 3009[H3C-classifier-traffic-limit][H3C-classifier-traffic-limit]traffic behavior traffic-limit[H3C-behavior-traffic-limit]car cir 1024Warning: CBS is smaller than (100/16)CIR, and this maybe effect network traffic burst.[H3C-behavior-traffic-limit][H3C-behavior-traffic-limit]qos policy traffic-limit[H3C-qospolicy-traffic-limit]classifier traffic-limit behavior traffic-limit[H3C-qospolicy-traffic-limit][H3C-qospolicy-traffic-limit]interface GigabitEthernet1/0/18[H3C-GigabitEthernet1/0/18]qos apply policy traffic-limit inbound
display traffic behavior user-defined traffic-limit[H3C-GigabitEthernet1/0/18]display traffic behavior user-defined traffic-limit  User Defined Behavior Information:    Behavior: traffic-limit      Committed Access Rate:        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)        Green Action: pass        Red Action: discard        Yellow Action: pass[H3C-GigabitEthernet1/0/18]display traffic behavior user-defined  User Defined Behavior Information:    Behavior: traffic-limit      Committed Access Rate:        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)        Green Action: pass        Red Action: discard        Yellow Action: pass    Behavior: 3      Redirect enable:        Redirect type: next-hop        Redirect destination:          192.168.30.254    Behavior: 2      Redirect enable:        Redirect type: next-hop        Redirect destination:          192.168.20.1    Behavior: 1      Redirect enable:        Redirect type: next-hop        Redirect destination:          192.168.40.254
[H3C-GigabitEthernet1/0/18]display qos policy user-defined  User Defined QoS Policy Information:  Policy: 20   Classifier: 20     Behavior: 2      Redirect enable:        Redirect type: next-hop        Redirect destination:          192.168.20.1  Policy: traffic-limit   Classifier: traffic-limit     Behavior: traffic-limit      Committed Access Rate:        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)        Green Action: pass        Red Action: discard        Yellow Action: pass  Policy: 2   Classifier: 2     Behavior: 1      Redirect enable:        Redirect type: next-hop        Redirect destination:          192.168.40.254  Policy: 1   Classifier: 1     Behavior: 1      Redirect enable:        Redirect type: next-hop        Redirect destination:          192.168.40.254[H3C-GigabitEthernet1/0/18]display qos policy user-defined traffic-limit  User Defined QoS Policy Information:  Policy: traffic-limit   Classifier: traffic-limit     Behavior: traffic-limit      Committed Access Rate:        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)        Green Action: pass        Red Action: discard        Yellow Action: pass
[H3C-GigabitEthernet1/0/18]display qos policy interface  Interface: GigabitEthernet1/0/3  Direction: Inbound  Policy: 2   Classifier: 2     Operator: OR     Rule(s) : If-match acl 3000     Behavior: 1      Redirect enable:        Redirect type: next-hop        Redirect destination:          192.168.40.254  Interface: GigabitEthernet1/0/12  Direction: Inbound  Policy: 1   Classifier: 1     Operator: AND     Rule(s) : If-match acl 3001     Behavior: 1      Redirect enable:        Redirect type: next-hop        Redirect destination:          192.168.40.254  Interface: GigabitEthernet1/0/17  Direction: Inbound  Policy: 20   Classifier: 20     Operator: OR     Rule(s) : If-match acl 3020     Behavior: 2      Redirect enable:        Redirect type: next-hop        Redirect destination:          192.168.20.1  Interface: GigabitEthernet1/0/18  Direction: Inbound  Policy: traffic-limit   Classifier: traffic-limit     Operator: AND     Rule(s) : If-match acl 3009     Behavior: traffic-limit      Committed Access Rate:        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)        Green Action: pass        Red Action: discard        Yellow Action: pass        Green : 230(Packets)[H3C-GigabitEthernet1/0/18]display qos policy interface GigabitEthernet1/0/18  Interface: GigabitEthernet1/0/18  Direction: Inbound  Policy: traffic-limit   Classifier: traffic-limit     Operator: AND     Rule(s) : If-match acl 3009     Behavior: traffic-limit      Committed Access Rate:        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)        Green Action: pass        Red Action: discard        Yellow Action: pass        Green : 236(Packets)

原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

你可能感兴趣的文章
常见的WEB安全漏洞
查看>>
交换机span功能配置
查看>>
PHP课程总结20161227
查看>>
[JavaScript] js实现简单的代码运行框
查看>>
高可用集群原理
查看>>
网络安全系列之三十三 关闭端口
查看>>
学习C#感受
查看>>
php线程实现
查看>>
linux查看命令来自哪个安装包
查看>>
堡垒机-麒麟开源堡垒机代码分析-应用发布帐号同步部分
查看>>
Ceph集群搭建
查看>>
Linux环境下使用rpm包方式安装MySQL的方法
查看>>
HTTP协议
查看>>
Java电商项目面试题(六)
查看>>
全网备份
查看>>
Java 重大升级马上来了:JDK 11 新特性了解一下
查看>>
字符串转换成NSDate类型的 为nil解决方法
查看>>
Ubuntu git 与 gitlab 关联
查看>>
C++ 上溢和下溢(overflow underflow)
查看>>
Maven_运行时环境
查看>>