好消息,超酷的在线虚拟网络实验室上线了!点击开始实验

为获得更好的浏览效果,建议您使用 Firefox 或者 Chrome 浏览器



11.4      CBQ的配置

【需求】

路由器执行染色并执行cbq

对内网发过来的数据包染色

数据包分类:

为方便运行维护管理,供QoS使用的访问控制列表号码统一规范为下述命令中的号码

acl n 3181        //视频业务

…….

acl n 3182        //关键业务1

……

acl n 3183        //关键业务2

…….

acl n 3184        //关键业务3

……

acl n 3185        //信息网站

……….

acl n 3186        //下载业务

…………

acl n 3187        //其他业务

………….

 

根据上面acl对路由器接收到的不同类型的数据包标记不同的dscp值:

[Quidway]traffic classifier VideoAudio

[Quidway-classifier-VideoAudio]if-match acl 3181

[Quidway]traffic classifier Critical-1

[Quidway-classifier- Critical-1] if-match acl 3182

[Quidway]traffic classifier Critical-2

[Quidway-classifier- Critical-2] if-match acl 3183

[Quidway]traffic classifier Critical-3

[Quidway-classifier- Critical-3] if-match acl 3184

[Quidway]traffic classifier Information

[Quidway-classifier- Information] if-match acl 3185

[Quidway]traffic classifier Quantity

[Quidway-classifier- Quantity] if-match acl 3186

[Quidway]traffic classifier default

[Quidway-classifier-default] if-match acl 3187

 

定义染色的动作:

//语音视频业务

[Quidway]traffic behavior VideoAudio

[Quidway-behavior-VideoAudio]remark dscp 46

//关键业务1

[Quidway]traffic behavior Critical-1

[Quidway-behavior-Critical-1]remark dscp 34

//关键业务2

[Quidway]traffic behavior Critical-2

[Quidway-behavior-Critical-2]remark dscp 26

//关键业务3

[Quidway]traffic behavior Critical-3

[Quidway-behavior-Critical-3]remark dscp 35

//信息网站

[Quidway]traffic behavior Information

[Quidway-behavior-Information]remark dscp 18

//批量业务

[Quidway]traffic behavior Quantity

[Quidway-behavior-Quantity]remark dscp 10

//其它业务

[Quidway]traffic behavior default

[Quidway-behavior-default]remark dscp 0

 

对本地交换机快速以太网接口上行包染色:

[Quidway]#qos policy RS_down_local //至本地交换机快速以太网接口

[Quidway-qospolicy-RS_down_local]class VideoAudio behavior VideoAudio2

[Quidway-qospolicy-RS_down_local]class Critical-1 behavior Critical-1

[Quidway-qospolicy-RS_down_local]class Critical-2 behavior Critical-2

[Quidway-qospolicy-RS_down_local]class Information behavior Information

[Quidway-qospolicy-RS_down_local]class Quantity behavior Quantity

[Quidway-qospolicy-RS_down_local]class default behavior default

策略应用:

在相应的端口应用相应的QOS保障策略

[Quidway]int 端口(至本地交换机)

[Quidway-端口]qos apply policy RS_down_local in

对符合染色定义的包执行cbq

根据本规范中第2.1.2小节定义,对路由器接收到的不同优先级的数据包,划分不同的服务类别:

[Quidway]traffic classifier VideoAudio2

[Quidway-classifier-VideoAudio]if-match dscp 46

[Quidway]traffic classifier Critical-12

[Quidway-classifier- Critical-1]if-match dscp 34

[Quidway]traffic classifier Critical-22

[Quidway-classifier- Critical-2]if-match dscp 26

[Quidway]traffic classifier Critical-32

[Quidway-classifier- Critical-3]if-match dscp 35

[Quidway]traffic classifier Information2

[Quidway-classifier- Information]if-match dscp 18

[Quidway]traffic classifier Quantity2

[Quidway-classifier- Quantity]if-match dscp 10

[Quidway]traffic classifier default2

[Quidway-classifier-default]if-match dscp 0

  策略定义:

针对不同的链路出口定义不同的策略

 

至省会X的主线路接口:

//语音视频业务

[Quidway]traffic behavior VideoAudio2

[Quidway-behavior-VideoAudio2]queue af bandwidth 800

//关键业务1

[Quidway]traffic behavior Critical-12

[Quidway-behavior-Critical-12]queue ef bandwidth pct 10

[Quidway-behavior-Critical-12]wred dscp

[Quidway-behavior-Critical-12]wred dscp 34 low-limit 24 high-limit 40 discard-probability 10

//关键业务2

[Quidway]traffic behavior Critical-22

[Quidway-behavior-Critical-22]queue ef bandwidth pct 10

[Quidway-behavior-Critical-22]wred dscp

[Quidway-behavior-Critical-22]wred dscp 26 low-limit 24 high-limit 40 discard-probability 10

//信息网站

[Quidway]traffic behavior Information2

[Quidway-behavior-Information2]queue ef bandwidth pct 10

[Quidway-behavior-Information2]wred dscp

[Quidway-behavior-Information2]wred dscp 18 low-limit 24 high-limit 40 discard-probability 10

//批量业务

[Quidway]traffic behavior Quantity2

[Quidway-behavior-Quantity2]queue ef bandwidth pct 5

[Quidway-behavior-Quantity2]wred dscp

[Quidway-behavior-Quantity2]wred dscp 10 low-limit 24 high-limit 40 discard-probability 10

//其它业务

[Quidway]traffic behavior default2

[Quidway-behavior-default2]queue ef bandwidth pct 5

[Quidway-behavior-default2]wred dscp

[Quidway-behavior-default2]wred dscp 0 low-limit 24 high-limit 40 discard-probability 10

 

[Quidway]#qos policy QoS_up_Y1 //至省会X的主线路接口

[Quidway-qospolicy-QoS_up_Y1]class VideoAudio2 behavior VideoAudio2

[Quidway-qospolicy-QoS_up_Y1]class Critical-12 behavior Critical-12

[Quidway-qospolicy-QoS_up_Y1]class Critical-22 behavior Critical-22

[Quidway-qospolicy-QoS_up_Y1]class Information2 behavior Information2

[Quidway-qospolicy-QoS_up_Y1]class Quantity behavior2 Quantity2

[Quidway-qospolicy-QoS_up_Y1]class default2 behavior default2

 

至本地交换机快速以太网接口:

[Quidway]traffic behavior VideoAudio3

[Quidway-behavior-VideoAudio3]queue af bandwidth 20000

[Quidway]#qos policy QoS_down_local //至本地交换机快速以太网接口

[Quidway-qospolicy-QoS_down_local]class VideoAudio2 behavior VideoAudio3

[Quidway-qospolicy- QoS_down_local]class Critical-12 behavior Critical-12

[Quidway-qospolicy- QoS_down_local]class Critical-22 behavior Critical-22

[Quidway-qospolicy-QoS_down_local]class Information2 behavior Information2

[Quidway-qospolicy-QoS_down_local]class Quantity2 behavior Quantity2

[Quidway-qospolicy-QoS_down_local]class default2 behavior default2

策略应用:

在相应的端口应用相应的QOS保障策略

[Quidway]int 端口(Y地市中支主线路)

[Quidway-端口]qos apply policy QoS_up_Y1 out

[Quidway]int 端口(至本地交换机)

[Quidway-端口]qos apply policy QoS_down_local out

 

X Close
X Close