简介
本文档介绍如何在Catalyst 9000交换机上配置AutoQoS。
先决条件
使用的组件
本文档中的信息基于以下软件和硬件版本:
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
背景信息
AutoQoS是一种功能,通过使用符合RFC 4594建议的模板来标记和调配Medianet应用类,从而简化网络上的QoS部署。
1应用表
配置
这些选项可用于在Catalyst 9000交换机上配置AutoQoS。
auto qos trust:此选项将端口配置为静态信任CoS或DSCP。
- auto qos trust {cos | dscp} 请注意,如果未明确指定CoS或DSCP,auto qos trust命令将在第2层交换机端口上配置CoS-trust,在第3层路由接口上配置DSCP-trust。
自动qos视频:此选项可用于思科网真系统(带cts关键字)以及思科IP视频监控摄像头(带ip-camera关键字)。
auto qos classify {police}:此命令为不可信接口生成QoS配置。该配置在接口上放置服务策略,对来自不受信任的桌面/设备的流量进行分类,并相应地对其进行标记。
auto qos voip:此选项为AutoQoS VoIP电话部署提供传统支持。
- auto qos voip [cisco-phone | Cisco-Softphone | 信任]
如果端口连接到Cisco IP电话,则在检测到电话时,传入数据包的QoS标签仅可信(通过CDP的有条件信任)。
一些配置示例:
auto qos voip cisco-phone
自动qos视频cts
自动qos视频ip摄像头
自动qos视频媒体播放器
本示例的特色是catalyst 9300交换机,该交换机的Cisco IP电话通过端口GigabitEthernet1/0/1连接。
C9300#show platform
Switch Ports Model Serial No. MAC address Hw Ver. Sw Ver.
------ ----- --------- ----------- -------------- ------- --------
1 65 C9300-48U FCW2152G03C 501c.b06e.d300 V01 17.09.05
Switch/Stack Mac Address : 501c.b06e.d300 - Local Mac Address
Mac persistency wait time: Indefinite
Current
Switch# Role Priority State
-------------------------------------------
*1 Active 1 Ready
C9300#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
D - Remote, C - CVTA, M - Two-port Mac Relay
Device ID Local Intrfce Holdtme Capability Platform Port ID
SEPD4ADBDCE1516 Gig 1/0/1 176 H P M IP Phone Port 1
Total cdp entries displayed : 1
要启用AutoQoS,请进入接口配置模式,然后添加命令auto qos voip cisco-phone。
C9300(config)#interface gigabitEthernet 1/0/1
C9300(config-if)#auto qos voip cisco-phone
C9300(config-if)#end
应用配置后,以下命令会自动添加到端口配置中。
C9300#show running-config interface gi1/0/1
Building configuration...
Current configuration : 199 bytes
!
interface GigabitEthernet1/0/1
trust device cisco-phone
auto qos voip cisco-phone
service-policy input AutoQos-4.0-CiscoPhone-Input-Policy
service-policy output AutoQos-4.0-Output-Policy
end
请注意,已配置输入和输出AutoQoS策略。
要验证并更详细地查看模板策略,请使用show policy-map命令。
C9300#show policy-map interface gi1/0/1
GigabitEthernet1/0/1
Service-policy input: AutoQos-4.0-CiscoPhone-Input-Policy
Class-map: AutoQos-4.0-Voip-Data-CiscoPhone-Class (match-any)
0 packets
Match: cos 5
QoS Set
dscp ef
police:
cir 128000 bps, bc 8000 bytes
conformed 0 bytes; actions:
transmit
exceeded 0 bytes; actions:
set-dscp-transmit dscp table policed-dscp
conformed 0000 bps, exceeded 0000 bps
Class-map: AutoQos-4.0-Voip-Signal-CiscoPhone-Class (match-any)
0 packets
Match: cos 3
QoS Set
dscp cs3
police:
cir 32000 bps, bc 8000 bytes
conformed 0 bytes; actions:
transmit
exceeded 0 bytes; actions:
set-dscp-transmit dscp table policed-dscp
conformed 0000 bps, exceeded 0000 bps
Class-map: AutoQos-4.0-Default-Class (match-any)
0 packets
Match: access-group name AutoQos-4.0-Acl-Default
QoS Set
dscp default
Class-map: class-default (match-any)
4 packets
Match: any
Service-policy output: AutoQos-4.0-Output-Policy
queue stats for all priority classes:
Queueing
priority level 1
(total drops) 0
(bytes output) 3913
Class-map: AutoQos-4.0-Output-Priority-Queue (match-any)
0 packets
Match: dscp cs4 (32) cs5 (40) ef (46)
Match: cos 5
Priority: 30% (300000 kbps), burst bytes 7500000,
Priority Level: 1
Class-map: AutoQos-4.0-Output-Control-Mgmt-Queue (match-any)
0 packets
Match: dscp cs2 (16) cs3 (24) cs6 (48) cs7 (56)
Match: cos 3
Queueing
queue-limit dscp 16 percent 80
queue-limit dscp 24 percent 90
queue-limit dscp 48 percent 100
queue-limit dscp 56 percent 100
(total drops) 0
(bytes output) 0
bandwidth remaining 10%
queue-buffers ratio 10
Class-map: AutoQos-4.0-Output-Multimedia-Conf-Queue (match-any)
0 packets
Match: dscp af41 (34) af42 (36) af43 (38)
Match: cos 4
Queueing
(total drops) 0
(bytes output) 0
bandwidth remaining 10%
queue-buffers ratio 10
Class-map: AutoQos-4.0-Output-Trans-Data-Queue (match-any)
0 packets
Match: dscp af21 (18) af22 (20) af23 (22)
Match: cos 2
Queueing
(total drops) 0
(bytes output) 0
bandwidth remaining 10%
queue-buffers ratio 10
Class-map: AutoQos-4.0-Output-Bulk-Data-Queue (match-any)
0 packets
Match: dscp af11 (10) af12 (12) af13 (14)
Match: cos 1
Queueing
(total drops) 0
(bytes output) 0
bandwidth remaining 4%
queue-buffers ratio 10
Class-map: AutoQos-4.0-Output-Scavenger-Queue (match-any)
0 packets
Match: dscp cs1 (8)
Queueing
(total drops) 0
(bytes output) 0
bandwidth remaining 1%
queue-buffers ratio 10
Class-map: AutoQos-4.0-Output-Multimedia-Strm-Queue (match-any)
0 packets
Match: dscp af31 (26) af32 (28) af33 (30)
Queueing
(total drops) 0
(bytes output) 0
bandwidth remaining 10%
queue-buffers ratio 10
Class-map: class-default (match-any)
0 packets
Match: any
Queueing
(total drops) 0
(bytes output) 1434
bandwidth remaining 25%
queue-buffers ratio 25
当Cisco IP电话在配置了AutoQoS的端口中连接或断开时,看到这些日志是完全正常的。
%SWITCH_QOS_TB-5-TRUST_DEVICE_LOST: cisco-phone no longer detected on port Gi1/0/1, operational port trust state is now untrusted.
%SWITCH_QOS_TB-5-TRUST_DEVICE_DETECTED: cisco-phone detected on port Gi1/0/1, port configured trust state is now operational.
注意:
1. AutoQoS使用条件信任模型,该模型将接口配置为动态接受来自满足特定条件(例如成功的思科发现协议协商)的终端的标记。
2. 无法为支持视频的IP电话配置auto qos voip cisco-phone命令,因为此选项覆盖视频数据包的DSCP标记。