簡介
本文檔介紹如何在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視訊:此選項可用於Cisco TelePresence Systems (使用cts關鍵字)以及Cisco 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標籤。