簡介
本檔案介紹Cisco Catalyst SD-WAN Manager GUI上的服務品質(QoS)類別預設行為。
必要條件
思科建議您瞭解以下主題:
- Cisco Catalyst軟體定義廣域網路(SD-WAN)
- 服務品質(QoS)
採用元件
本檔案中的資訊是根據:
- Cisco IOS® XE Catalyst SD-WAN邊緣版本17.9.5a。
- Cisco Catalyst SD-WAN管理器版本20.12.4。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
QoS基礎知識
QoS是一種機制,當由於擁塞而必須捨棄封包時,該機制會提供優先於特定流量流的功能,而不是其他流量。對於業務來說,並非所有流量都相等。
由於並非所有流量對業務同等重要,因此必須使用QoS來排定流量的優先順序。
QoS是一種實現服務品質目標的功能,它基於:
- 分類和標籤 — 匹配並標籤感興趣的流量。當路由器根據資料包報頭對資料包進行分類或者通過NBAR根據策略序列匹配中設定的條件對資料包進行深度資料包檢測時,就會發生QoS中的匹配過程。然後,基於策略順序操作進行標籤。如果資料包已使用DSCP值進行標籤,則可以重新標籤。
附註:SD-WAN路由器具有不同的服務和傳輸VRF,分類過程發生在服務端,目的地是傳輸端。
- 轉送類(FC)-在一對一關係中匹配出口介面隊列。FC是路由器用於對映出口隊列的邏輯。
舉例來說:轉發類:CS6對映到隊列1,轉發類:AF4X對映到隊列3,依此類推。
policy
access-list QoS-Classification
sequence 11
match
dscp 48 <--- Match the traffic with dscp 48 to CS6
action accept
class CS6 <--- Classify this traffic to CS6
sequence 21
match
dscp 26 <--- Match the traffic with dscp 26
action accept
class AF31 <--- Classify this traffic to AF31
!---Output is supressed
class-map
class AF21 queue 5<--- Assign the Forwarding Class to Queue 5
class AF31 queue 4 <--- Assign the Forwarding Class to Queue 4
class AF41 queue 3 <--- Assign the Forwarding Class to Queue 3
class CS6 queue 1 <--- Assign the Forwarding Class to Queue 1
class AF43 queue 2 <--- Assign the Forwarding Class to Queue 2
class Queue0 queue 0
- 速率限制:是指在網路介面上配置的最大允許頻寬,它通過丟棄超過指定限制的資料包、防止擁塞並根據某些型別的流量允許速率優先處理這些流量,從而從根本上控制流量可以傳輸的速率。
- 整形和管制:是指控制進出網路的流量。整形會延遲過多的流量,同時策略丟棄或重新標籤。
- Drops:是指故意丟棄資料包作為一種管理擁塞並確保網路效能的方法。
- 擁塞管理 — 隊列和排程技術。路由器將資料包放入不同的出口隊列,然後由排程程式決定資料包的順序。這允許排程程式以不同方式處理隊列內的每個流量。
附註:如果沒有QoS啟用,Cisco IOS® XE路由器會將Queue2用作預設隊列,並平等對待所有流量。在SD-WAN環境中,Queue0用於控制流量。
- 擁塞規避:是指管理網路流量以防止擁塞,確保高效的資料傳輸並保持最佳效能。
- 尾部丟棄:是一種方法,當網路裝置(如路由器或交換機)中的隊列達到最大容量時,傳入資料包將自動被丟棄。當隊列已滿時,從隊列的「尾」端開始丟棄到達的任何其他資料包。這表示最新的封包被捨棄。
- 隨機早期丟棄(RED):在隊列變滿之前主動丟棄資料包,向傳送方傳送訊號以降低傳輸速率,從而防止擁塞。
附註:RED(隨機早期檢測)通過在隊列完全滿之前丟棄資料包來管理TCP吞吐量。這種早期的資料包丟棄向TCP傳送方發出訊號,以主動減小其擁塞視窗大小,從而有效地限制流量,以更好地匹配可用頻寬。
QoS class-default
class class-default將自動建立,任何與任何類別對映不匹配的流量將自動分配給class-default,以便盡力傳輸。但是,可以為其分配不同的操作。
Cisco Catalyst SD-WAN Manager上的QoS類別 — 預設(未定義)行為
由於配置QoS時會自動建立class-default,並且沒有在QoS本地化策略上顯式定義該類,因此會自動分配隊列2。因此,有關未定義的轉發類class-default的統計資訊不會顯示在Manager GUI上。
由於Cisco Catalyst SD-WAN Manager不收集有關預設類類的統計資訊,因此需要建立單獨的類來標籤和分類先前定義的任何類對映中不匹配的流量。
QoS本地化策略示例:
policy
access-list QoS-Classification
sequence 1
action accept
class Default <--- Classify the traffic to Forwarding Class Default (match any dscp that is not assigned to other class)
sequence 11
match
dscp 48
action accept
class CS6
sequence 21
match
dscp 26
action accept
class AF31
default-action accept
qos-scheduler QOS-MAP-V01_0
class Queue0
bandwidth-percent 42
buffer-percent 42
scheduling llq
drops tail-drop
burst 15000
qos-scheduler QOS-MAP-V01_1
class Queue1
bandwidth-percent 16
buffer-percent 16
scheduling wrr
drops tail-drop
qos-scheduler QOS-MAP-V01_3
class Queue3
bandwidth-percent 11
buffer-percent 11
scheduling wrr
drops red-drop
qos-scheduler QOS-MAP-V01_4
class Queue4
bandwidth-percent 9
buffer-percent 9
scheduling wrr
drops red-drop
qos-scheduler QOS-MAP-V01_5
class Queue5
bandwidth-percent 6
buffer-percent 6
scheduling wrr
drops red-drop
qos-scheduler QOS-MAP-V01_2
class Queue2
bandwidth-percent 16
buffer-percent 16
scheduling wrr
drops tail-drop
qos-map QOS-MAP-V01
qos-scheduler QOS-MAP-V01_0
qos-scheduler QOS-MAP-V01_1
qos-scheduler QOS-MAP-V01_3
qos-scheduler QOS-MAP-V01_4
qos-scheduler QOS-MAP-V01_5
qos-scheduler QOS-MAP-V01_2
class-map
class AF2x queue 5
class AF3x queue 4
class AF4x queue 3
class DEFAULT queue 2 <--- Assign the Forwarding Class Default to Queue 2
class CS6 queue 1
class Queue0 queue 0
class Queue1 queue 1
class Queue2 queue 2
class Queue3 queue 3
class Queue4 queue 4
class Queue5 queue 5
在Cisco Edge路由器CLI上:
在本例中,使用DSCP 8,且未在任何轉發類中進行分類:
Router#ping vrf 4001 10.19.253.1 dscp 8 repeat 4000
Type escape sequence to abort.
Sending 4000, 100-byte ICMP Echos to 172.19.253.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!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!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!
Success rate is 100 percent (4000/4000), round-trip min/avg/max = 1/1/2 ms
使用命令show policy-map interface
驗證類對映配置是否正確。
Router#show policy-map interface GigabitEthernet0/0/0
Service-policy output: QOS-MAP-V01
queue stats for all priority classes:
Queueing
priority level 1
queue limit 512 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 2355461/1168305717
Class-map: Queue0 (match-any)
2355461 packets, 1168305717 bytes
30 second offered rate 8000 bps, drop rate 0000 bps
Match: qos-group 0
police:
rate 42 %
rate 420000000 bps, burst 13125000 bytes
conformed 2355461 packets, 1168305717 bytes; actions:
transmit
exceeded 0 packets, 0 bytes; actions:
drop
conformed 8000 bps, exceeded 0000 bps
Priority: Strict, b/w exceed drops: 0
Priority Level: 1
Class-map: Queue1 (match-any)
0 packets, 0 bytes
30 second offered rate 0000 bps, drop rate 0000 bps
Match: qos-group 1
Queueing
queue limit 1250 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
bandwidth remaining ratio 16
Class-map: Queue3 (match-any)
0 packets, 0 bytes
30 second offered rate 0000 bps, drop rate 0000 bps
Match: qos-group 3
Queueing
queue limit 1250 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
bandwidth remaining ratio 11
Exp-weight-constant: 9 (1/512)
Mean queue depth: 0 packets
class Transmitted Random drop Tail drop Minimum Maximum Mark
pkts/bytes pkts/bytes pkts/bytes thresh thresh prob
0 0/0 0/0 0/0 312 625 1/10
1 0/0 0/0 0/0 351 625 1/10
2 0/0 0/0 0/0 390 625 1/10
3 0/0 0/0 0/0 429 625 1/10
4 0/0 0/0 0/0 468 625 1/10
5 0/0 0/0 0/0 507 625 1/10
6 0/0 0/0 0/0 546 625 1/10
7 0/0 0/0 0/0 585 625 1/10
Class-map: Queue4 (match-any)
0 packets, 0 bytes
30 second offered rate 0000 bps, drop rate 0000 bps
Match: qos-group 4
Queueing
queue limit 1250 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
bandwidth remaining ratio 9
Exp-weight-constant: 9 (1/512)
Mean queue depth: 0 packets
class Transmitted Random drop Tail drop Minimum Maximum Mark
pkts/bytes pkts/bytes pkts/bytes thresh thresh prob
0 0/0 0/0 0/0 312 625 1/10
1 0/0 0/0 0/0 351 625 1/10
2 0/0 0/0 0/0 390 625 1/10
3 0/0 0/0 0/0 429 625 1/10
4 0/0 0/0 0/0 468 625 1/10
5 0/0 0/0 0/0 507 625 1/10
6 0/0 0/0 0/0 546 625 1/10
7 0/0 0/0 0/0 585 625 1/10
Class-map: Queue5 (match-any)
0 packets, 0 bytes
30 second offered rate 0000 bps, drop rate 0000 bps
Match: qos-group 5
Queueing
queue limit 1250 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
bandwidth remaining ratio 6
Exp-weight-constant: 9 (1/512)
Mean queue depth: 0 packets
class Transmitted Random drop Tail drop Minimum Maximum Mark
pkts/bytes pkts/bytes pkts/bytes thresh thresh prob
0 0/0 0/0 0/0 312 625 1/10
1 0/0 0/0 0/0 351 625 1/10
2 0/0 0/0 0/0 390 625 1/10
3 0/0 0/0 0/0 429 625 1/10
4 0/0 0/0 0/0 468 625 1/10
5 0/0 0/0 0/0 507 625 1/10
6 0/0 0/0 0/0 546 625 1/10
7 0/0 0/0 0/0 585 625 1/10
Class-map: class-default (match-any) <<<< Created by default, not defined in the policy
131264 packets, 15640913 bytes
30 second offered rate 0000 bps, drop rate 0000 bps
Match: any
Queueing
queue limit 1250 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 120019/11394812
bandwidth remaining ratio 16
在Cisco Catalyst SD-WAN Manager GUI中,Queue2中匹配的流量顯示在圖中,但不顯示為class-default類:
來自Cisco Catalyst SD-WAN Manager的QoS監控圖形
驗證
要標識資料包的QoS隊列,可以通過FIA跟蹤進行驗證。
在啟用QoS分類的LAN介面(GigabitEthernet0/0/0)上配置FIA跟蹤條件。
clear platform condition all
debug platform packet-trace packet 2048 fia-trace data-size 2048
debug platform condition interface GigabitEthernet0/0/0 both
運行命令debug platform condition start
以啟動FIA跟蹤。
運行命令debug platform condition stop
以停止FIA跟蹤。
運行命令show platform packet-trace summary
以顯示FIA跟蹤資料包。
Router2#show platform packet-trace packet 0 decode
Packet: 0 CBUG ID: 5952
Summary
Input : INJ.2
Output : GigabitEthernet0/0/0
State : FWD
Timestamp
Start : 1032236067625063 ns (09/14/2024 21:33:39.652978 UTC)
Stop : 1032236067714747 ns (09/14/2024 21:33:39.653068 UTC)
Path Trace
Feature: IPV4(Input)
Input : internal0/0/rp:0
Output : <unknown>
Source : 192.168.1.2
Destination : 172.19.253.2
Protocol : 1 (ICMP)
Feature: SDWAN Internal Intf
VRF ID : 9
Encap Type : unknown
IP DSCP : 8
IP Version : 4
IP Protocol : 1
Dst Port : 0
Is Marked High Priority : NO
Is SDWAN Control Tunnel Traffic : NO
Set HIGH_QUEUE : NO (NOT marked high priority, NOT SD-WAN control tunnel traffic)
Skip SDWAN Policy : FALSE
Feature: SDWAN QoS Output
Fwd Class ID : 0
QoS Queue : 2 <<<<<<< Packet assigned to Queue2 (Output in Egress Transport interface)
DSCP Rewrite : No
CoS Rewrite : No
EXP Rewrite : No
Rewrite Rule : n/a
Feature: QOS
Direction : Egress
Action : FWD
Pak Priority : FALSE
Priority : FALSE
Queue ID : 127 (0x7f)
PAL Queue ID : 1073741826 (0x40000002)
Queue Limit : 1250
WRED enabled : FALSE
Inst Queue len : 0
Avg Queue len : n/a
Policy name : QOS-MAP-V01
Class name : class-default <<<< Created by default (not defined in the policy)
相關資訊
Cisco Catalyst SD-WAN轉發和QoS配置指南
Cisco Catalyst SD-WAN轉發和QoS概述