最佳答案
# 配置下载方向的限速时,需要配置为基于源的IP地址的CAR列表(destination-ip-address)
<H3C>system-view
[H3C] qos carl 1 source-ip-address range 192.168.1.2 to 192.168.1.254 per-address
#在外网口配置基于之前配置好的CAR列表的限速,限速速率为1000, inbound表示下载方向
[H3C] interface GigabitEthernet 0/0
[H3C- GigabitEthernet0/0] qos car inbound carl 1 cir 1000
[H3C- GigabitEthernet0/0] quit
#完成上述设置以后,保存配置
[H3C]save force
(0)
您好,请知:
可以使用QOS CAR对IP进行限速,以下是配置命令说明和命令配置举例:
(1) 进入系统视图。
system-view
(2) 创建CAR列表并配置匹配规则。
qos carl carl-index { dscp dscp-list | mac mac-address | mpls-exp mpls-exp-value | precedence precedence-value | { destination-ip-address | source-ip-address } { range start-ip-address to end-ip-address | subnet ip-address mask-length } [ per-address [ shared-bandwidth ] ] }
本命令中object-group和time-range参数的支持情况与设备的型号有关,具体请参见命令参考。
(3) 进入接口视图。
interface interface-type interface-number
(4) 在接口上配置基于CAR列表的CAR策略。
(绝对值配置方式)
qos car { inbound | outbound } carl carl-index cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [green action | red action | yellow action ] *
qos car { inbound | outbound } carl carl-index cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebsexcess-burst-size ] [ green action | red action | yellow action ] *
(百分比配置方式)
qos car { inbound | outbound } carl carl-index percent cir cir-percent [ cbs cbs-time [ ebs ebs-time ] ] [ green action | red action | yellowaction ] *
qos car { inbound | outbound } carl carl-index percent cir cir-percent [ cbs cbs-time ] pir pir-percent [ ebs ebs-time ] [ green action | red action | yellow action ] *
缺省情况下,接口上未应用CAR策略。
# 配置下载方向的限速时,需要配置为基于源的IP地址的CAR列表(destination-ip-address)
<H3C>system-view
[H3C] qos carl 1 source-ip-address range 192.168.1.2 to 192.168.1.254 per-address
#在外网口配置基于之前配置好的CAR列表的限速,限速速率为1000, inbound表示下载方向
[H3C] interface GigabitEthernet 0/0
[H3C- GigabitEthernet0/0] qos car inbound carl 1 cir 1000
[H3C- GigabitEthernet0/0] quit
#完成上述设置以后,保存配置
[H3C]save force
(0)
您好,参考
# 创建基本IPv4 ACL2000,匹配IP电话发送的流量(源地址为192.168.3.0/24网段)。
<SwitchA> system-view
[SwitchA] acl basic 2000
[SwitchA-acl-basic-2000] rule permit source 192.168.3.0 0.0.0.255
[SwitchA-acl-basic-2000] quit
# 创建流分类voice,匹配规则为IPv4 ACL 2000。
[SwitchA] traffic classifier voice
[SwitchA-classifier-voice] if-match acl 2000
[SwitchA-classifier-voice] quit
# 创建基本IPv4 ACL2001,匹配业务软件终端发送的流量(源地址为192.168.2.0/24网段)。
[SwitchA] acl basic 2001
[SwitchA-acl-basic-2001] rule permit source 192.168.2.0 0.0.0.255
[SwitchA-acl-basic-2001] quit
# 创建流分类service,匹配规则为IPv4 ACL 2001。
[SwitchA] traffic classifier service
[SwitchA-classifier-service] if-match acl 2001
[SwitchA-classifier-service] quit
# 创建高级IPv4 ACL 3000,匹配普通PC发送的FTP流量(源地址为192.168.1.0/24网段,目的端口为20)。
[SwitchA] acl advanced 3000
[SwitchA-acl-adv-3000] rule permit tcp destination-port eq 20 source 192.168.1.0 0.0.0.255
[SwitchA-acl-adv-3000] quit
# 创建流分类ftp,匹配规则为IPv4 ACL 3000。
[SwitchA] traffic classifier ftp
[SwitchA-classifier-ftp] if-match acl 3000
[SwitchA-classifier-ftp] quit
# 创建流行为voice,动作为重标记本地优先级为6。
[SwitchA] traffic behavior voice
[SwitchA-behavior-voice] remark local-precedence 6
[SwitchA-behavior-voice] quit
# 创建流行为service,动作为重标记本地优先级为4。
[SwitchA] traffic behavior service
[SwitchA-behavior-service] remark local-precedence 4
[SwitchA-behavior-service] quit
# 创建流行为ftp,动作为重标记本地优先级为2。
[SwitchA] traffic behavior ftp
[SwitchA-behavior-ftp] remark local-precedence 2
[SwitchA-behavior-ftp] quit
# 创建QoS策略shaping,将上面三组流分类和流行为进行关联。
[SwitchA] qos policy shaping
[SwitchA-qospolicy-shaping] classifier voice behavior voice
[SwitchA-qospolicy-shaping] classifier service behavior service
[SwitchA-qospolicy-shaping] classifier ftp behavior ftp
[SwitchA-qospolicy-shaping] quit
# 将QoS策略应用到GigabitEthernet1/0/2端口的入方向。
[SwitchA] interface GigabitEthernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] qos apply policy shaping inbound
[SwitchA-GigabitEthernet1/0/2] quit
经过上述配置,三类报文在SwitchA中的本地优先级已经被修改,即可以确定三类报文的输出队列分别为6、4、2。
# 在GigabitEthernet1/0/1端口上配置流量整形,为语音报文(队列6)配置承诺速率为1024Kbps,承诺突发尺寸建议配置为500ms内通过的报文容量(65536bytes)。
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] qos gts queue 6 cir 1024 cbs 65536
# 在GigabitEthernet1/0/1端口上配置流量整形,为业务软件报文(队列4)配置承诺速率为768Kbps,承诺突发尺寸为49152bytes。
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] qos gts queue 4 cir 768 cbs 49152
# 在GigabitEthernet1/0/1端口上配置流量整形,为FTP报文(队列2)配置承诺速率为512Kbps,承诺突发尺寸为32768bytes。
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] qos gts queue 2 cir 512 cbs 32768
# 在GigabitEthernet1/0/1端口上配置端口限速,对出端口方向的流量配置承诺速率为2048Kbps,承诺突发尺寸配置为500ms内通过的流量,即131072bytes。
[SwitchA-GigabitEthernet1/0/1] qos lr outbound cir 2048 cbs 131072
# 保存配置信息
<H3C>save force
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
限速速率为1000,单位是?
bps