设备型号:SR6602
软件版本:version 5.20, Release 2603P04
需求:在子接口配置基于队列的QoS的限速。
基于类的队列CBQ的配置步骤如下:
(1)定义类
acl number 3150
description NM
rule 0 permit ip vpn-instance bo-general source 5.5.5.5 0
acl number 3140
description VC
rule 0 permit ip vpn-instance bo-general source 4.4.4.4 0
acl number 3130
description IS
rule 0 permit tcp vpn-instance bo-general source 3.3.3.3 0 source-port eq 8073
acl number 3120
description NS
rule 5 permit tcp vpn-instance bo-general source 2.2.2.2 0 source-port eq ftp
traffic classifier NM operator or
if-match acl 3150
traffic classifier VC operator or
if-match acl 3140
traffic classifier IS operator or
if-match acl 3130
traffic classifier NS operator or
if-match acl 3120
(2)定义流行为
traffic behavior VC_2M
queue af bandwidth 1500
traffic behavior IS_2M
queue af bandwidth 125
traffic behavior NS_2M
queue af bandwidth 125
traffic behavior NM_2M
queue af bandwidth 50
(3)定义策略
qos policy TQ_BJDC_2M
classifier NM behavior NM_2M
classifier VC behavior VC_2M
classifier IS behavior IS_2M
classifier NS behavior NS_2M
(4)在接口视图或PVC视图下应用QoS策略
interface GigabitEthernet2/2/1.898
description HLZCA1-CP02_G2/0/2
vlan-type dot1q vid 898
qos max-bandwidth 2250
bandwidth 2048
ip address 10.1.1.2 255.255.255.0
qos lr outbound cir 2048 cbs 128000 ebs 0
qos apply policy TQ_BJDC_2M outbound
#
1.若是子接口,则接口需要使能LR功能以保证CBQ队列功能生效,同时需要配置qos max-bandwidth命令以提供CBQ计算的基准带宽。
2.qos max-bandwidth基准带宽仅80%用于流行为里面的限速,即基准带宽乘以0.8需大于等于流行为里限速的叠加(本案例即2250x0.8 大于等于(1500+125+125+50))不满足则会报错,比如配置2048。
3.在未配置子接口基准带宽条件下,计算CBQ时实际使用的基准带宽取值为0Kbps,如:
traffic behavior 1
queue af bandwidth pct 5
#
interface GigabitEthernet0/0/0.100
vlan-type dot1q vid 100
qos lr outbound cir 100 cbs 6225 ebs 0
qos apply policy 1 outbound
#
[SR6602X-1]dis qos poli int g 0/0/0.100
Interface: GigabitEthernet0/0/0.100
Direction: Outbound
Policy: 1
Classifier: default-class
Matched : 0(Packets) 0(Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Rule(s) : If-match any
Behavior: be
Default Queue:
Flow Based Weighted Fair Queuing
Max number of hashed queues: 256
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
Discard Method: Tail
Classifier: 1
Matched : 0(Packets) 0(Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Operator: AND
Rule(s) : If-match acl 3000
Behavior: 1
Assured Forwarding:
Bandwidth 0 (bps)
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
Discard Method: Tail
[SR6602X-1]int g 0/0/0.100
[SR6602X-1-GigabitEthernet0/0/0.100]qos max-bandwidth 5000
[SR6602X-1-GigabitEthernet0/0/0.100]dis this
#
interface GigabitEthernet0/0/0.100
vlan-type dot1q vid 100
qos max-bandwidth 5000
qos lr outbound cir 100 cbs 6225 ebs 0
qos apply policy 1 outbound
#
return
[SR6602X-1-GigabitEthernet0/0/0.100]qui
[SR6602X-1]dis qos poli int g 0/0/0.100
Interface: GigabitEthernet0/0/0.100
Direction: Outbound
Policy: 1
Classifier: default-class
Matched : 0(Packets) 0(Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Rule(s) : If-match any
Behavior: be
Default Queue:
Flow Based Weighted Fair Queuing
Max number of hashed queues: 256
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
Discard Method: Tail
Classifier: 1
Matched : 0(Packets) 0(Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Operator: AND
Rule(s) : If-match acl 3000
Behavior: 1
Assured Forwarding:
Bandwidth 200 (kbps)
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
Discard Method: Tail
4.流行为中配置实际带宽或者pct百分比注意事项是一样的。
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作