简介
本文档介绍Cisco Catalyst SD-WAN Manager GUI上的服务质量(QoS)类默认行为。
先决条件
Cisco 建议您了解以下主题:
- Cisco Catalyst软件定义的广域网(SD-WAN)
- 服务质量 (QoS)
使用的组件
本文档中的信息基于:
- Cisco IOS® XE Catalyst SD-WAN Edge版本17.9.5a。
- Cisco Catalyst SD-WAN Manager版本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
- 速度限制:是指网络接口上配置的最大允许带宽,通过丢弃超过指定限制的数据包、防止拥塞并根据某些类型的流量允许速率优先处理这些流量,从而从根本上控制流量可以传输的速率。
- 整形和管制:是指控制进出网络的流量速率。整形会延迟超额流量,而管制会丢弃或重新标记。
- 丢弃:是指故意丢弃数据包作为管理拥塞和确保网络性能的方法。
- 拥塞管理 — 队列和调度技术。路由器将数据包放入不同的出口队列,由调度程序决定数据包的顺序。这允许调度程序以不同方式处理队列内的每个流量。
注意:如果不启用QoS,Cisco IOS® XE路由器会将Queue2用作默认队列并平等处理所有流量。在SD-WAN环境中,Queue0用于控制流量。
- 拥塞避免:是指管理网络流量以防止拥塞,确保高效的数据传输并保持最佳性能。
- 尾部丢弃:是一种在网络设备(如路由器或交换机)中的队列达到最大容量时自动丢弃传入数据包的方法。当队列已满时,从队列的“尾部”端开始丢弃到达的任何其他数据包。这意味着最新的数据包将被丢弃。
- 随机早期丢弃(红色):在队列变满之前主动丢弃数据包,向发送方发送信令以降低传输速率,从而防止拥塞。
注意:RED(随机早期检测)通过在队列完全满之前丢弃数据包来帮助管理TCP吞吐量。这种早期的数据包丢弃会向TCP发送方发出信号,以主动减小其拥塞窗口大小,从而有效地减少流量以更好地匹配可用带宽。
QoS class-default
系统将自动创建class class-default,并且所有与任何类映射不匹配的流量都会自动分配给class-default以实现尽力传输。但是,可以为其分配不同的操作。
Cisco Catalyst SD-WAN Manager上的QoS Class-Default(未定义)行为
由于配置QoS时会自动创建class-default,并且未在QoS本地化策略上明确定义类别,因此会自动分配队列2。因此,Manager GUI上不会显示有关未定义的转发类class-default的统计信息。
由于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概述