6.5.2 配置Auto-QoS
使用Auto-QoS可以简化QoS配置,并大大加快了QoS部署的进程。当启用Auto-QoS时,自动地将基于通信类型和进入数据包标签的信息分类,交换机使用分类结果选择适当的出口队列。
1.Auto-QoS配置简介
可以使用Auto-QoS命令,指定在连接Cisco IP电话的端口,或者运行软件电话的端口上启用自动QoS。Auto-QoS主要提供以下功能:
检测Cisco IP电话是否存在
配置QoS类别
配置出口队列
Auto-QoS主要被用于:
迅速部署QoS
自动化普通QoS应用环境
标识应用程序并将其分类
定义警报条件
默认情况下,所有端口上的Auto-QoS处于禁用状态。
当启用Auto-QoS时,使用入口数据标签来分类通信,分配数据包标签,并且配置出口和入口队列,见表6-6。
表6-6 Auto-QoS分类通信
|
|
VoIP数据通信 |
VoIP控制通信 |
路由器协议通信 |
STP BPDU通信 |
Real-Time Video Traffic |
所有其他通信 | ||
|
DSCP |
46 |
24,24 |
48 |
56 |
34 |
- | ||
|
|
5 |
3 |
6 |
7 |
4 |
- | ||
|
CoS-to-Ingress队列映射 |
2,3,4,5,6,7 (队列2) |
0,1(队列1) | ||||||
|
CoS-to-Egress队列映射 |
5(队列1) |
3,6,7(队列2) |
4(队列3) |
2(队列3) |
0,1(队列4) | |||
表6-7所示为入口队列生成Auto-QoS配置.
表6-7 入口队列生成Auto-QoS的配置
|
入 口 队 列 |
队 列 号 |
CoS-to-队列映射 |
队 列 比 例 |
队 列 大 小 |
|
共享SRR |
1 |
1,1 |
81% |
67% |
|
优先权 |
2 |
2,3,4,5,6,7 |
19% |
33% |
为出口队列生成Auto-QoS配置见表6-8
表6-8 出口队列生成Auto-QoS配置
|
出口队列 |
队列号 |
CoS-to-队列映射 |
队列weights |
吉能力队列大小 |
10/100以太网端口的队列大小 |
|
优先权 |
1 |
5 |
10% |
16% |
10% |
|
共享SRR |
2 |
3,6,7 |
10% |
6% |
10% |
|
共享SRR |
3 |
2,4 |
60% |
17% |
26% |
|
共享SRR |
4 |
0,1 |
20% |
61% |
54% |
当在某个端口启用Auto-QoS时,就会自动出现以下行为:
QoS被全部启用(mls qos全局配置命令),并且其他全局配置命令也被加入。
当在端口上输入auto qos voip cisco-phone接口配置命令时,交换机启用可信任的边界特性。交换机使用Cisco发现协议(CDP)来发现一个Cisco IP电话的存在与否。当检测到一个Cisco IP电话时,端口上的入口分类被设置成信赖接收数据包的QoS标签。当没有检测到一个Cisco IP电话时,入口分类不被设置成依赖接收数据包的QoS标签。
当在端口上输入auto qos voip cisco-softphone接口配置命令时(此端口在连接到运行Cisco软件电话设备的网络边界上),交换机策略数据包,并且指定数据包的行为。
当在端口上输入auto qos voip trust接口配置命令时(此端口连接到网络的内部),交换机信任CoS无路由端口或路由端口的DSCP的值。
2.Auto-QoS注意事项
在配置Auto-QoS时,应当注意以下几个方面的问题:
在CiscoIOS Release 12.2(20)SE及以前版本,Auto-QoS只在Cisco IP电话的交换机端口上配置VoIP。
在CiscoIOS Release 12.2(20)SE及以后版本,Auto-QoS为在非信任和路由接口上的Cisco IP电话VoIP配置交换机。
10 Gbps接口不支持Auto-QoS,只支持连接Cisco IP电话的端口,或者运行Cisco软件电话特性的端口。
采用Auto-QoS默认值时,在配置其他QoS命令之前应该启用Auto-QoS。如果有必要,可以调节QoS配置,但是,建议只在Auto-QoS配置完成之后再做。
可以在静态、动态访问、语音VLAN访问和中继端口上启用Auto-QoS。
默认情况下,CDP在所有端口上被启用。因为Auto-QoS功能正确,所以不禁用CDP。
当在路由端口的Cisco IP电话上启用Auto-QoS,必须为IP电话指定一个静态IP地址。
只支持Cisco IP Soft Phone Version 1.3(3)或以后的版本。
连接的设备必须使用Cisco Call Manager Version 4或以后的版本。
3.启用Auto-QoS
借助以下操作,可以启用Auto-QoS。
第一步:交换机自动启用QoS,并且配置CoS-to-DSCP映射。
Switch (config) # mls qos
Switch (config) # mls qos map cos-dscp 0 8 16 26 32 46 48 56
第二步:交换机自动映射CoS值至进入口列,并拥有一个极限值ID号。
Switch (config) # no mls qos srr-queue input cos-map
Switch (config) # mls qos srr-queue input cos-map queue 1 threshold 3 0
Switch (config) # mls qos srr-queue input cos-map queue 1 threshold 2 1
Switch (config) # mls qos srr-queue input cos-map queue 2 threshold 1 2
Switch (config) # mls qos srr-queue input cos-map queue 2 threshold 2 4 6 7
Switch (config) # mls qos srr-queue input cos-map queue 2 3 3 5
第三步:交换机自动映射CoS值至出口列,并获得一个极限值ID号。
Switch (config) # no mls qos srr-queue output cos-map
Switch (config) # mls qos srr-queue output cos-map queue 1 threshold 3 5
Switch (config) # mls qos srr-queue output cos-map queue 2 threshold 3 3 6 7
Switch (config) # mls qos srr-queue output cos-map queue 3 threshold 3 2 4
Switch (config) # mls qos srr-queue output cos-map queue 4 threshold 2 1
Switch (config) # mls qos srr-queue output cos-map queue 4 threshold 3 0
第四步:交换机自动映射DSCP值进入口列,并获得一个极限值ID号。
Switch (config) # no mls qos srr-queue input dscp-map
Switch (config) # mls qos srr-queue input dscp-map queue 1 threshold 2 9 10 11 12 13 14 15
Switch (config) # mls qos srr-queue input dscp-map queue 1 threshold 3 0 1 2 3 4 5 6 7
Switch (config) # mls qos srr-queue input dscp-map queue 1 threshold 3 32
Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 1 16 17 18 19 20 21 22 23
Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 2 33 34 35 36 37 38 39 48
Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 2 49 50 50 52 53 54 55 56
Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 2 57 58 59 60 67 62 63
Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31
Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 3 40 41 42 43 44 45 46 47
第五步:交换机自动映射DSCP值至出口列,并获得一个极限值ID号。
Switch (config) # no mls qos srr-queue output dscp-map
Switch (config) # mls qos srr-queue output dscp-map queue 1 threshold 3 40 41 42 43 44 45 46 47
Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31
Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 3 48 49 50 51 52 53 54 55
Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 3 56 57 58 59 60 61 62 63
Switch (config) # mls qos srr-queue input dscp-map queue 3 threshold 3 16 17 18 19 20 21 22 23
Switch (config) # mls qos srr-queue input dscp-map queue 3 threshold 3 32 33 34 35 36 37 38 39
Switch (config) # mls qos srr-queue input dscp-map queue 4 threshold 1 8
Switch (config) # mls qos srr-queue input dscp-map queue 4 threshold 2 9 10 11 12 13 14 15
Switch (config) # mls qos srr-queue input dscp-map queue 4 threshold 3 0 1 2 3 4 5 6 7
第六步:交换机自动设置入口队列,利用队列2作为优先队列,队列1处于共享模式。交换机为入口队列配置带宽和缓冲大小。
Switch (config) # no mls qos srr-queue input priority-queue 1
Switch (config) # no mls qos srr-queue input priority-queue 2
Switch (config) # mls qos srr-queue input bandwidth 90 10
Switch (config) # mls qos srr-queue input bandwidth 1 8 16
Switch (config) # mls qos srr-queue input bandwidth 2 34 66
Switch (config) # mls qos srr-queue input bandwidth 67 33
第七步:交换机自动配置出口队列缓冲大小。在映射到端口的出口队列上配置带宽和SRR模式。
Swtich (config) # mls qos queue-set output 1 threshold 1 138 138 92 138
Swtich (config) # mls qos queue-set output 1 threshold 2 138 138 92 400
Swtich (config) # mls qos queue-set output 1 threshold 3 36 77 100 318
Swtich (config) # mls qos queue-set output 1 threshold 4 20 50 67 400
Swtich (config) # mls qos queue-set output 2 threshold 1 149 149 100 149
Swtich (config) # mls qos queue-set output 2 threshold 2 118 118 100 125
Swtich (config) # mls qos queue-set output 2 threshold 3 41 68 100 272
Swtich (config) # mls qos queue-set output 2 threshold 4 42 72 100 242
Swtich (config) # mls qos queue-set output 1 buffers 10 10 26 54
Swtich (config) # mls qos queue-set output 2 buffers 16 6 17 61
Swtich (config) # srr-queue bandwidth shape 10 0 0 0
Switch (config) # srr-queue bandwidth share 10 10 60 20
第八步:如果要输入auto qos voip trust命令,交换机自动设置入口类别来信任接收
Switch (config-if) # mls qos trust cos
Switch (config-if) # mls qos trust dscp
第九步:如果输入auto qos voip cisco-phone命令,交换机自动启用可信任边界特性,此特性使用CDP来检测一个Cisco IP电话是否存在。
Switch (config-if) # mls qos trust device cisco-phone
第十步:如果输入quto qos voip cisco-softphoone命令,交换机自动创建类别映射和规则映射。
Switch (config) # mls qos map policed-dscp 24 26 46 to 0
Switch (config) # class-map match-all AutoQoS-VoIP-RTP-Trust
Switch (config-cmap) # match ip dscp ef
Switch (config) # class-map match-all AutoQoS-VoIP-Control-Trust
Switch (config-cmap) # match ip dscp cs3 af31
Switch (config) # poicy-map AutoQoS-Police-softPhone
Switch (config-pmap) # class AutoQoS-VoIP-RTP-Trust
Switch (config-pmap-c) # set dscp ef
Switch (config-pmap-c) # police 32000 8000 exceed-action policed-dscp-transmit
Switch (config-pmap) # class AutoQoS-VoIP-Control-Trust
Switch (config-pmap-c) # set dscp cs3
Switch (config-pmap-c) # police 32000 8000 exceed-action policed-dscp-transmit
第十一步:创建完类别映射和规则映射,交换机自动应用被称作AutoQoS-Police-SoftPhone的规则映射到一个入口接口,在接口上带有Cisco软件电话特性的Auto-QoS被启用。
Switch (config-if) # service-policy input AutoQoS-Police-SoftPhone
4.为VoIP启用Auto-QoS
在特权EXEC模式下开始,为VoIP启用Auto-QoS。
第一步:进入全局配置命令。
Switch # configure terminal
第二步:指定连接Cisco IP电话的端口。端口是连接运行Cisco软件电话特性的设备,或连接到网络中其他可信任交换机或路由器的端口,并进入接口配置模式。
Switch (config) # interface interface-id
第三步:启用Auto-QoS。
Switch (config) # auto qos voip {cisco-phone| cisco-softphone| trust}
第四步:返回特权EXEC模式。
Switch (config-if) # end
第五步:校验配置。
Switch # show auto qos interface interface-id
显示当Auto-QoS被启用或禁用的自动生成的QoS命令时,在启用Auto-QoS之前输入debug auto qos特权EXEC命令。
若欲在端口上禁用Auto-QoS,可使用no auto qos voip接口配置命令。如果是Auto-QoS启用的最后一个端口,则输入no auto qos voip命令。
可以使用no mls qos全局配置命令禁用自动-QoS-生成全局配置命令。QoS禁用时,没有信任或非信任端口的概念,因为数据包没有被指定。通信在pass-through模式下被交换。
5.Auto-QoS配置效果
当Auto-QoS被启用时,auto qos voip接口配置命令和生成的配置都被添加到运行配置中。
交换机应用自动-QoS-生成命令就像是在CLI中输入的命令。如果所有的生成命令都成功地应用了,任何的用户配置仍然处在运行配置状态中。如果生成命令应用失败,先前的运行配置就要重新恢复。
若欲显示最初的Auto-QoS配置,可使用show auto qos [interface [interface-id]]特权EXEC命令。若欲显示任何用户的改变配置,可使用show running-config特权EXEC命令。
显示关于QoS配置的信息,使用下面命令中的其中之一:
show mls qos
show mls maps cos-dscp
show mls qos interface [interface-id] [buffers|queueing]
show mls qos maps [cos-dscp |cos-input-q |cos-output-q | dscp-cos | dscp-input-q | dscp-output-q]
show mls qos input-queue
show running-config
6.QoS配置实例
在特权EXEC模式下开始,配置在QoS域边界的交换机,以此确定在其他所有流量之上的VoIP流量的优先权。
第一步:启用Auto-QoS调试。当启用调试时,交换机显示当Auto-QoS启用时的自动生成配置。
Switch (config) # debug auto qos
第二步:进入全局配置模式。
Switch # configure terminal
第三步:启用全局CDP。默认情况下是启用的。
Switch (config) # cdp enable
第四步:指定连接到Cisco IP电话上的交换机端口,并进入接口配置模式。
Switch (config) # interface interface-id
第五步:在端口上调用Auto-QoS,并指定连接到Cisco IP电话上的端口。
Switch (config) # auto qos voip cisoc-phone
第六步:返回全局配置模式。
Switch (config-if) # end
第七步:在尽可能多个连接到Cisco IP电话的端口上重复第4到6步。
第八步:指定作为连接到信任交换机或路由器的交换机端口,并进入接口配置模式。
Switch (config) # interface interface-id
第九步:在端口上启用Auto-QoS,并且指定连接到一个可信任路由器或交换机的端口。
Switch (config) # auto qos voip trust
第十步:返回特权EXEC模式。
Switch (config-if) # end
第十一步:校验配置。
Switch # show auto qos
第十二步:保存auto qos voip接口配置命令并且在配置文件中生成Auto-QoS配置。
Switch # copy running-config startup-config
| 回书目 上一节 下一节 |
|
· 第六章 你能帮我吗?.. · Linux笔试面试题选摘测.. · 08年5月软考网管上午真.. · 性能测试从零开始 目录 · 08年5月软考网工上午真.. · 上周拒绝服务攻击(DDo.. |
· 08年5月各大网上书店及.. · 2008年5月24日软考试题.. · 软件设计师专家临考模.. · 上周网络管理员专家自.. · 网络工程师自测获奖名.. · 08年4月各大网上书店及.. |
|
||||
| · NAC安全访问控制 · 网络布线测试仪器 · Windows Server 2008专.. · Windows远程桌面应用 · 网络故障排除宝典 · 运营商封堵ADSL共享 中.. · 解析35岁技术人的价值.. · 世纪枭雄比尔盖茨的王.. |
· 主流品牌防火墙配置 · ASP.NET开发教程 · 超级计算机TOP500专题 · Vista SP1对决XP SP3 · SQL Server 2008/2005.. · 程序员如何成长? · C#技术开发指南 · 虚拟化技术还有点“虚” |
|||
|
||||
| · SOA 面向服务架构 · SQL Server 2008/2005.. · Apache技术专题 · 三层交换技术专题 · SQL Server入门到精通 · Windows远程桌面应用 · C#技术开发指南 · Apache技术专题 |
· Windows集群服务应用 · C#技术开发指南 · 国际文档格式标准开战 · 路由器设置与口令恢复 · Linux 集群技术专题 · PHP开发应用手册 · SOA 面向服务架构 · 企业数据恢复指南 |
|||
|
||||
| · SQL Server入门到精通 · SQL Server 2008/2005.. · SOA 面向服务架构 · Apache技术专题 · C#技术开发指南 · 三层交换技术专题 · Apache技术专题 · C#技术开发指南 |
· Windows远程桌面应用 · 企业数据恢复指南 · Windows集群服务应用 · 路由器设置与口令恢复 · Linux 集群技术专题 · SOA 面向服务架构 · 了解统一威胁管理(UTM).. · 反垃圾邮件技术应用 |
|||