H3C S5500-24P-SI 限速方法
Comware Software, Version 5.20, Release 2220P02
第一种方法 speed限速率
[H3C]interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1]speed 10 限速为10M速率
第二种 qos lr 端口带宽速度限速,只能限制outbound
[H3C]interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] qos lr outbound cir 2048 限制端口out带宽为2M
第三种ACL+qos端口带宽限速
1,定义acl列表
number:2000~2999:基本IPv4 ACL;
number:3000~3999:高级IPv4 ACL;
number:4000~4999:二层ACL;
number:5000~5999:用户自定义ACL。
[H3C]acl number 2000 创建一条基于IPv4 acl访问控制列表
[H3C-acl-basic-2000] rule 0 permit source 192.168.1.0 0.0.0.255 建立一条限制源IP规则 192.168.1.1-192.168.1.244
[H3C-acl-basic-2000] rule 1 permit source 192.168.1.0 0.0.1.255 建立一条限制源IP规则 192.168.2.1-192.168.2.244
[H3C-acl-basic-2000] quit
[H3C]traffic classifier 2M operator and 建立一条名称为2M的traffic类别
[H3C-classifier-2M]if-match acl 2000 把创建的acl 为2000的访问控制列表用if-match加入到traffic类别里
[H3C-classifier-2M]traffic behavior 2M 为其创建一个行为,名称为2M
[H3C-behavior-2M]car cir 2048 设置承诺信息速率 为2048kbps 突发和超出突发为缺省不设置它
[H3C-behavior-2M]quit
[H3C]qos policy 2M 创建一个qos政策名称为2M,后续进入端口限速时候要应用到
[H3C-qospolicy-2M]classifier 2M behavior 2M 把之前设置的 classifier 应用到qos政策里面
[H3C-qospolicy-2M]quit
[H3C]interface GigabitEthernet1/0/1 进入端口1
[H3C-GigabitEthernet1/0/1]qos apply policy 2M inbound 限速规则加入端口配置里去
[H3C]display current-configuration 最后显示交换机所有的配置情况
#
version 5.20, Release 2220P02
#
sysname H3C
#
acl number 2000
rule 0 permit source 192.168.1.0 0.0.0.255
rule 1 permit source 192.168.1.0 0.0.1.255
#
traffic classifier 2M operator and
if-match acl 2000
#
traffic behavior 2M
car cir 2048 cbs 128000 ebs 4000 green pass red discard yellow pass
#
qos policy 2M
classifier 2M behavior 2M
#
interface GigabitEthernet1/0/1
qos lr outbound cir 2048 cbs 2000000
qos apply policy 2M inbound
#
interface GigabitEthernet1/0/2
qos lr outbound cir 2048 cbs 2000000
qos apply policy 2M inbound
#
[H3C]quit