此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档介绍3750多层交换(MLS)服务质量(QoS)与具有模块化QoS CLI(MQC)的3850交换机之间的区别。
Cisco 建议您了解以下主题:
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
本文档还介绍了有关通过示例配置进行转换的详细信息。本文档仅适用于有线 QoS。本文档面向负责设计、实施或管理包括独立Cisco Catalyst 3850交换机或Cisco Catalyst 3850交换机堆叠(称为交换机)的网络网络专业人士。
由于实施 MQC(通用 QoS 配置模型)配置而非 3750 和 3560 系列交换机中旧的 MLS QoS(取决于平台的 QoS 配置)命令,3850 系列中的 QoS 配置已经获得改进。
下表重点列出了主要差异:
交换机类型 |
3750 |
3850 |
基本架构 |
MLS |
MQC |
QoS 默认设置 |
禁用 |
启用 |
全局配置 |
支持 MLS QoS 在入口支持部分 MQC |
不支持 MLS QoS 支持 MQC [class-map、policy-map] |
接口配置 |
支持 MLS QoS 配置并在入口支持部分 MQC CLI |
将策略附加到接口 |
端口信任默认设置 |
禁用 |
启用 |
入口端口 |
分类/管制/标记/ 队列 |
分类/管制/标记 [无入口队列!] |
出口端口 |
队列 |
分类/管制/标记/队列 |
入口交换机虚拟接口 (SVI) |
分类/管制/标记 |
分类/标记 |
出口 SVI |
无 |
分类/标记 |
认识到 QoS 方法的主要根本性改变很重要。
QoS 在 3750 上默认禁用,而在 3850 上则默认启用。而且,要保留 3750 平台上的第 2 层 (L2)/第 3 层 (L3) QoS 标记,还必须应用信任配置。
在 3850 上,默认信任所有数据包(保留 L2/L3 QoS 标记),除非您在入口或出口接口上应用特定的策略映射来更改此设置。
功能 |
3750 |
3850 |
分类 |
Class-map 匹配差分服务代码点 (DSCP)、优先级 (Prec)、访问控制列表 (ACL) 既支持 match-all 也支持 match-any |
Class-map 匹配服务类别 (CoS)、Prec、DSCP、ACL 和 VLAN 仅支持 match-any |
标记 [无条件设置] |
设置 DSCP 和 Prec |
设置 CoS、Prec、DSCP 和 QoS 组 |
标记 [有条件标记] |
DSCP 突变 |
类默认设置为表映射 |
管制 |
1r2c |
1r2c 和 2r3c |
管制标记降级 |
管制超限将降级标记 [仅支持 DSCP] |
管制超限和违反将降级标记 [支持 CoS、DSCP、Prec] |
汇聚管制 |
支持 |
汇聚管制 [HQoS 的一种类型] |
入口队列 |
仅在 3750 上支持,但在 3750x 上不支持 |
不支持 |
分级 QoS (HQoS) |
仅基于 VLAN 的 HQoS |
基于端口的汇聚管制和每 VLAN (PV) |
功能 |
3750 |
3850 |
对非排队操作的分类支持 |
不支持 |
CoS、Prec、DSCP、QoS 组、ACL 和 VLAN |
对排队操作的分类支持 |
CoS 和 DSCP |
CoS、Prec、DSCP 和 QoS 组 |
标记 |
不支持 |
设置 CoS、Prec 和 DSCP |
管制 |
不支持 |
1r2c、2r3c,通过表映射对超限/违反降级标记 |
最大队列数和队列类型 |
1P3Q3T [4 个队列] 加速队列 -> 优先级队列 |
2P6Q3T [最多 8 个队列] |
出口队列 |
共享模式,整形模式、队列限制、优先级和队列缓冲区 |
带宽、剩余带宽、整形、队列限制、优先级和队列缓冲区 |
HQoS |
不支持 |
HQoS:汇聚策略、PV、端口整形器和父用户整形器,具有子级非队列操作 |
输入 show 命令:
show run class-map [name_of_class-map]
show run policy-map [name of policy-map]
show policy-map interface [interface_name]
常规 show 命令:
show mls qos maps
show mls qos maps
show mls qos queue-set
show mls qos interface [interface_name] queuing
show platform port-asic stats drop [interface_name] statistics
show mls qos aggregate-policer
show run class-map [name_of_class-map]
show run policy-map [name of policy-map]
show table-map [name_of_table-map]
show run policy-map [name_of_policy-map]
show policy-map interface [interface_name]
show platform qos policies port sw [sw#]
show platform qos queue config interface_type [interface_name]
show platform qos queue stats interface_type [interface_name]
QoS 配置 |
3750 [全局] |
3750 [接口] |
3850 * |
示例链接 |
QoS 禁用 |
No MLS QoS |
两个队列 控制 -> 队列 (2) 数据 -> 队列 (4) |
出口无策略 控制 -> 队列 (1) 数据 -> 队列 (2) |
|
在入口和出口信任或设置 基于入口的排队操作 信任或设置 |
MLS QoS |
a) MLS QoS trust CoS |
对 CoS 进行出口队列策略分类 [入口需要配置信任 CoS] |
|
b) MLS QoS trust DSCP |
对 DSCP 进行出口队列策略分类 |
|||
c ) 输入策略,将操作设置为标记 DSCP 值 |
对 DSCP 进行出口队列策略分类 |
|||
d) 无MLS QoS信任配置[两个CoS/DSCP都可以设置为零] |
输入策略和类默认设置 CoS/DSCP 设置为 0 |
|||
CoS/DSCP 队列映射 |
MLS QoS Shaped Round Robin (SRR)-queue output [CoS-map/ DSCP-map] |
A、b、c和d可以使用相应的新映射 |
输出显式分类 [CoS/DSCP] 和排队操作 |
|
DSCP 突变 |
MLS QoS DSCP 突变 |
接口需要配置 MLS QoS trust DSCP MLS QoS DSCP-mutation [名称] |
接口输入策略和表映射 |
|
汇聚管制 |
MLS QoS 汇聚管制 |
需要接口级配置 |
汇聚管制 [HQoS 的一种类型] |
|
管制标记降级 |
MLS QoS map policed-DSCP [10] [11] to [63] |
附加到接口的管制策略,超过不丢弃,全局policed-DSCP可以生效 [输入] |
一个表映射用于管制超限,一个表映射用于违反管制的操作 [输入和输出] |
|
队列限制 |
MLS QoS queue-set output [1] threshold [1] [100] [100] [50] [200] 1 -> 队列设置 1 <1-> 队列 1 阈值 1 阈值 2 保留的缓冲区 最大阈值 |
配置队列设置 [2] [默认设置为队列设置 1] |
出口排队策略与排队操作和队列限制配置 |
|
队列缓冲区 |
MLS QoS queue-set output [1] buffers [15] [25] [40] [20] |
接口配置队列设置 |
策略映射与队列操作和队列缓冲区比率 [0-100] |
|
共享/带宽 |
MLS QoS |
接口级配置 “SRR-queue bandwidth share 1 30 35 5”[共享模式] |
策略映射中的带宽 |
|
优先队列 [加速队列] |
MLS QoS |
接口级配置“priority-queue out”,这样可以将对应队列集的第1个队列作为优先级队列 |
策略映射中的优先级 1 |
|
整形器 |
MLS QoS |
SRR 队列带宽整形 [整形模式] |
策略映射中的整形平均值 |
|
端口整形器 |
MLS QoS |
SRR 队列带宽限制 |
端口整形器 |
|
HQoS |
MLS QoS |
SVI [将策略附加到SVI]和接口需要配置“基于VLAN的MLS QoS” |
PV 策略 并将策略附加到输入方向的端口 |
3750(全局配置) |
3750(接口) |
3850 |
No MLS QoS |
两个队列 [控制为一个队列 2,数据为一个队列 4] |
出口无策略 [控制数据包进入队列 1,数据包进入队列 2] |
3750#show mls qos
QoS is disabled <- disable
QoS ip packet dscp rewrite is enabled
3750#show mls qos interface gig1/0/1 statistics | b output queues enqueued
output queues enqueued:
queue: threshold1 threshold2 threshold3
-----------------------------------------------
queue 0: 4 0 0
queue 1: 0 0 0 <- control
queue 2: 0 0 0
queue 3: 0 0 0 <- data
output queues dropped:
queue: threshold1 threshold2 threshold3
-----------------------------------------------
queue 0: 0 0 0
queue 1: 0 0 0 <- control
queue 2: 0 0 0
queue 3: 0 0 0 <- data
Policer: Inprofile: 0 OutofProfile: 0
3850#show run interface gig1/0/1
interface GigabitEthernet1/0/1
end
3850#show platform qos queue config gigabitEthernet 1/0/1 sw 1
DATA Port:21 GPN:1 AFD:Disabled QoSMap:0 HW Queues: 168 - 175
DrainFast:Disabled PortSoftStart:1 - 600
----------------------------------------------------------
DTS Hardmax Softmax PortSMin GlblSMin PortStEnd
--- -------- -------- -------- --------- ---------
0 1 5 120 6 480 0 0 0 0 0 800 <- control
1 1 4 0 7 720 2 480 2 180 2 800 <- data
2 1 4 0 5 0 0 0 0 0 0 800
3 1 4 0 5 0 0 0 0 0 0 800
4 1 4 0 5 0 0 0 0 0 0 800
5 1 4 0 5 0 0 0 0 0 0 800
6 1 4 0 5 0 0 0 0 0 0 800
7 1 4 0 5 0 0 0 0 0 0 800
Priority Shaped/shared weight shaping_step
-------- ------------ ------ ------------
0 0 Shared 50 0
1 0 Shared 75 0
2 0 Shared 10000 179
3 0 Shared 10000 0
4 0 Shared 10000 0
5 0 Shared 10000 0
6 0 Shared 10000 192
7 0 Shared 10000 0
Weight0 Max_Th0 Min_Th0 Weigth1 Max_Th1 Min_Th1 Weight2 Max_Th2 Min_Th2
------- ------- ------ ------ ------ ------ ------ ------ ------
0 0 478 0 0 534 0 0 600 0
1 0 573 0 0 641 0 0 720 0
2 0 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0
3750(全局) |
3750(接口) |
3850 |
MLS QoS |
接口“MLS QoS trust CoS”(基于到队列集1的默认CoS映射) |
基于 CoS 的出口队列策略(入口需要配置信任 CoS) |
Global config:
3750(config)#mls qos
Interface config:
interface GigabitEthernet1/0/1
mls qos trust cos
Related show cli:
3750#show mls qos
QoS is enabled
QoS ip packet dscp rewrite is enabled
3750#show mls qos interface gig1/0/1
GigabitEthernet1/0/1
trust state: trust cos
trust mode: trust cos
trust enabled flag: ena
COS override: dis
default COS: 0
DSCP Mutation Map: Default DSCP Mutation Map
Trust device: none
qos mode: port-based
3750 #show mls qos maps cos-output-q
Cos-outputq-threshold map:
cos: 0 1 2 3 4 6 7
------------------------------------------------------------
queue-threshold: 2-1 2-1 3-1 3-1 4-1 1-1 4-1 4-1
Note: cos value 0 maps to 2-1 [queue-set1 : queue2 threshold 1]
Ingress: apply policy-map trust-cos
Egress: create class based on cos and have queuing action for each class
Ingress policy:
3850#show run policy-map trust-cos
class class-default
set cos cos table default
3850#show table-map default
Table Map default
default copy
Egress policy:
3850#show run policy-map example2
class cos5
bandwidth percent 15
class cos0_1
bandwidth percent 25
class cos2_3
bandwidth percent 40
class cos4_6_7
bandwidth percent 20
3850#show run class-map cos5
class-map match-any cos5
match cos 5
3850#show run class-map cos0_1
class-map match-any cos0_1
match cos 0
match cos 1
3850#show run class-map cos2_3
class-map match-any cos2_3
match cos 2
match cos 3
3850#show run class-map cos4_6_7
class-map match-any cos4_6_7
match cos 4
match cos 6
match cos 7
3750(全局) |
3750(接口) |
3850 |
MLS QoS |
接口“MLS QoS trust DSCP”[基于到队列集1的默认DSCP映射] |
输入默认设置为信任 DSCP 基于 DSCP 的出口队列策略 |
config
3750(config)#mls qos <- Global
interface GigabitEthernet1/0/1 <- Interface
mls qos trust dscp
3750#sh mls qos interface gig1/0/1
GigabitEthernet1/0/1
trust state: trust dscp
trust mode: trust dscp
trust enabled flag: ena
COS override: dis
default COS: 0
DSCP Mutation Map: Default DSCP Mutation Map
Trust device: none
qos mode: port-based
3750#show mls qos maps dscp-output-q
Dscp-outputq-threshold map:
d1 :d2 0 1 2 3 4 5 6 7 8 9
---------------------------------------------------------------
0 : 02-01 02-01 02-01 02-01 02-01 02-01 02-01 02-01 02-01 02-01
1 : 02-01 02-01 02-01 02-01 02-01 02-01 03-01 03-01 03-01 03-01
2 : 03-01 03-01 03-01 03-01 03-01 03-01 03-01 03-01 03-01 03-01
3 : 03-01 03-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01
4 : 01-01 01-01 01-01 01-01 01-01 01-01 01-01 01-01 04-01 04-01
5 : 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01
6 : 04-01 04-01 04-01 04-01
Ingress: default trust dscp, no policy needed
Egress: use dscp as classification and add queuing action based on customer need
One Sample config:
Plolicy-map:
3850#show run policy-map dscp-shape
class dscp56
shape average percent 10
class dscp48
shape average percent 11
class dscp40
shape average percent 12
class dscp32
shape average percent 13
Class-map:
3850#show run class-map dscp56
class-map match-any dscp56
match dscp cs7
3850#show run class-map dscp48
class-map match-any dscp48
match dscp cs6
3850#show run class-map dscp40
class-map match-any dscp40
match dscp cs5
3850#show run class-map dscp32
class-map match-any dscp32
match dscp cs4
3750(全局) |
3750(接口) |
3850 |
MLS QoS |
接口输入策略,将操作设置为标记 CoS/DSCP 值 [标记值用于出口映射] |
需要显式出口策略以进行队列映射 |
3750#show run class-map dscp-1
class-map match-any dscp-1
match ip dscp 1
c3750#show run policy-map set-dscp-63
class dscp-1
set dscp 63
3750#show run interface f7/0/2
interface FastEthernet7/0/2
mls qos trust dscp
service-policy input set-dscp-63
3750#show policy-map interface f7/0/2
FastEthernet7/0/2
Service-policy input: set-dscp-63
Class-map: dscp-1 (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: ip dscp 1
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
0 packets, 0 bytes
5 minute rate 0 bps
Note: Pkts come in interface fa7/0/2, dscp1 can be marked to dscp63 which mapping
based on the existing mapping table, other pkts can retain original dscp value
mapping accordingly
Input can be same as 3750 config
Egress: can add queuing action under class dscp-63
One sample config:
3850#show run policy-map dscp63-queuing
class dscp63
bandwidth percent 50
3850#show class-map dscp63
Class Map match-any dscp63
Match dscp 63
3750(全局) |
3750(接口) |
3850 |
MLS QoS |
接口不配置 MLS QoS trust CoS/DSCP [CoS/DSCP可设置为0] |
接口输入策略和类默认设置 将 DSCP 设置为 0,使用类 DSCP0 和队列操作设置输出策略 |
Global:
c3750(config)#mls qos
Interface:
interface GigabitEthernet2/0/45
!
Input policy:
c3850#show run policy-map example5-input
class class-default
set dscp default
Output policy:
c3850#show run policy-map example5-output
class dscp0
shape average percent 10 <- queuing action based on customer need
Attach to the ingress port:
c3850#show run interface gig1/0/1
interface GigabitEthernet1/0/1
service-policy input example5-input
Attach to the egress port:
c3850#show run interface gig1/0/2
interface GigabitEthernet1/0/2
service-policy output example5-output
3750(全局) |
3750(接口) |
3850 |
MLS QoS SRR 队列映射配置 (MLS QoS SRR-queue output [CoS-map queue [1] threshold [3] [4 5]) |
A、b、c和d可以使用新的映射表 [CoS 4和5可以映射到队列1阈值3] |
出口显式分类和队列操作 |
Before config:
3750#show mls qos maps cos-output-q
Cos-outputq-threshold map:
cos: 0 1 2 3 4 5 6 7
------------------------------------------------
queue-threshold: 2-1 2-1 3-1 3-1 4-1 1-1 4-1 4-1
User config mapping:
3750(config)#mls qos srr-queue output cos-map queue 3 threshold 3 0
New mapping table after config
3750#show mls qos maps cos-output-q
Cos-outputq-threshold map:
cos: 0 1 2 3 4 5 6 7
------------------------------------------------
queue-threshold: 3-3 2-1 3-1 3-1 4-1 1-1 4-1 4-1
Input : need apply trust-cos policy:
3850#show run policy-map trust-cos
class class-default
set cos cos table default
3850#show table-map default
Table Map default
default copy
Egress policy:
Before changing mapping:
Sample config:
3850#show run policy-map example2
class cos5
bandwidth percent 15
class cos0_1
bandwidth percent 25
class cos2_3
bandwidth percent 40
class cos4_6_7
bandwidth percent 20
3850#show run class-map cos5
class-map match-any cos5
match cos 5
3850#show run class-map cos0_1
class-map match-any cos0_1
match cos 0
match cos 1
3850#show run class-map cos2_3
class-map match-any cos2_3
match cos 2
match cos 3
3850#show run class-map cos4_6_7
!
class-map match-any cos4_6_7
match cos 4
match cos 6
match cos 7
After mapping changing , corresponding sample config:
3850#show run policy-map example6
class cos5
bandwidth percent 15
class cos1
bandwidth percent 25
class cos0_2_3
bandwidth percent 40
class cos4_6_7
bandwidth percent 20
3850#show class-map cos5
Class Map match-any cos5 (id 25)
Match cos 5
3850#show run class-map cos1
class-map match-any cos1
match cos 1
3850#show run class-map cos0_2_3
class-map match-any cos0_2_3
match cos 0
match cos 2
match cos 3
3850#show run class-map cos4_6_7
class-map match-any cos4_6_7
match cos 4
match cos 6
match cos 7
3750(全局) |
3750(接口) |
3850 |
MLS QoS DSCP 突变 |
接口需要配置 MLS QoS trust DSCP MLS QoS DSCP-mutation 名称 [名称在全局定义] |
接口输入策略和不同 DSCP 的表映射. |
Global config :
3750(config)#mls qos map dscp-mutation dscp-mutation 0 1 to 63
3750(config)#mls qos map dscp-mutation dscp-mutation 2 3 to 62
Global show cli:
c3750#show mls qos maps dscp-mutation
Dscp-dscp mutation map:
dscp-mutation:
d1 : d2 0 1 2 3 4 5 6 7 8 9
---------------------------------------
0 : 63 63 62 62 04 05 06 07 08 09
1 : 10 11 12 13 14 15 16 17 18 19
2 : 20 21 22 23 24 25 26 27 28 29
3 : 30 31 32 33 34 35 36 37 38 39
4 : 40 41 42 43 44 45 46 47 48 49
5 : 50 51 52 53 54 55 56 57 58 59
6 : 60 61 62 63
Dscp-dscp mutation map:
Default DSCP Mutation Map:
d1 : d2 0 1 2 3 4 5 6 7 8 9
---------------------------------------
0 : 00 01 02 03 04 05 06 07 08 09
1 : 10 11 12 13 14 15 16 17 18 19
2 : 20 21 22 23 24 25 26 27 28 29
3 : 30 31 32 33 34 35 36 37 38 39
4 : 40 41 42 43 44 45 46 47 48 49
5 : 50 51 52 53 54 55 56 57 58 59
6 : 60 61 62 63
Interface config:
interface FastEthernet7/0/3
description trust dscp
mls qos trust dscp
mls qos dscp-mutation dscp-mutation
c3750#show mls qos interface f7/0/3
FastEthernet7/0/3
trust state: trust dscp
trust mode: trust dscp
trust enabled flag: ena
COS override: dis
default COS: 0
DSCP Mutation Map: dscp-mutation
Trust device: none
qos mode: port-based
Interface using default dscp-table:
c3750#show mls qos interface g3/0/1
GigabitEthernet3/0/1
trust state: not trusted
trust mode: not trusted
trust enabled flag: ena
COS override: dis
default COS: 0
DSCP Mutation Map: Default DSCP Mutation Map
Trust device: none
qos mode: port-based
Ingress : apply policy with dscp table-map
Egress: classify on new dscp value with queuing action
Ingress:
3850#show table-map dscp-2-dscp
Table Map dscp-2-dscp
from 0 to 63
from 1 to 63
from 2 to 62
from 3 to 62
default copy
3850#show run policy-map example7-input
class class-default
set dscp dscp table dscp-2-dscp
Egress:
3850#show run policy-map example7-output
class dscp63
shape average percent 20 [ queuing action based on the user need]
class dscp62
shape average percent 30 [queuing action based on user need]
3750(全局) |
3750(接口) |
3850 |
MLS QoS 汇聚管制 [所有使用汇聚策略控制的类都可以共享策略速率。] |
需要接口级配置 |
汇聚管制 (HQoS) |
MLS QoS aggregate-policer agg_traffic 8000 8000 exceed-action drop |
接口具有将agg_traffic作为agg监察器名称的策略。 |
Global:
mls qos aggregate-policer agg_traffic 8000 8000 exceed-action drop
Access-list:
access-list 1 permit 192.168.0.0 0.0.0.255
access-list 2 permit 10.0.0.0 0.0.0.255
Class-map:
class-map match-all agg1
match access-group 1
class-map match-all agg2
match access-group 2
Policy-map:
policy-map agg_policer
class agg1
set dscp 40
police aggregate agg_traffic
class agg2
set dscp 55
police aggregate agg_traffic
Note: class agg1 and agg2 can share the same policing rate
policy-map agg_police
class class-default
police cir 8000
service-policy child
policy-map child
class agg1
set dscp 40
class agg2
set dscp 55
3750(全局配置) |
3750(接口) |
3850 |
MLS QoS map policed-DSCP x to y |
只要接口具有管制策略,超过即传输,全局CLI就可以生效[仅输入]。 |
一个表映射用于超限,一个表映射用于违反策略、输入和输出的操作。 |
Default policed-dscp map:
3750#show mls qos map policed-dscp
Policed-dscp map:
d1 : d2 0 1 2 3 4 5 6 7 8 9
---------------------------------------
0 : 00 01 02 03 04 05 06 07 08 09
1 : 10 11 12 13 14 15 16 17 18 19
2 : 20 21 22 23 24 25 26 27 28 29
3 : 30 31 32 33 34 35 36 37 38 39
4 : 40 41 42 43 44 45 46 47 48 49
5 : 50 51 52 53 54 55 56 57 58 59
6 : 60 61 62 63
User define policed-dscp map:
3750(config)#mls qos map policed-dscp 0 10 18 24 46 to 8
3750#show mls qos map policed-dscp
Policed-dscp map:
d1 : d2 0 1 2 3 4 5 6 7 8 9
---------------------------------------
0 : 08 01 02 03 04 05 06 07 08 09
1 : 08 11 12 13 14 15 16 17 08 19
2 : 20 21 22 23 08 25 26 27 28 29
3 : 30 31 32 33 34 35 36 37 38 39
4 : 40 41 42 43 44 45 08 47 48 49
5 : 50 51 52 53 54 55 56 57 58 59
6 : 60 61 62 63
Policy config:
class-map match-all policed-dscp
match access-group 2
class policed-dscp
police 8000 8000 exceed-action policed-dscp-transmit
Attach the above policy at ingress:
Note : Mark down table can be used by policing and interface policing
as long as exceed action is transmit
3850(config)#table-map policed-dscp
3850(config-tablemap)#map from 0 to 8
3850(config-tablemap)#map from 10 to 8
3850(config-tablemap)#map from 18 to 8
3850(config-tablemap)#map from 24 to 8
3850(config-tablemap)#map from 46 to 8
3850#show table-map policed-dscp
Table Map policed-dscp
from 0 to 8
from 10 to 8
from 18 to 8
from 24 to 8
from 46 to 8
default copy
3850#show policy-map policed-dscp
Policy Map policed-dscp
Class class-default
police cir percent 10
conform-action transmit
exceed-action set-dscp-transmit dscp table policed-dscp
3750(全局) |
3750(接口) |
3850 |
MLS QoS queue-set输出 1 阈值 1100 100 50 200(队列限制) [1 -> 队列设置 1, 1 -> 第一个队列, 100 -> 阈值 1, 100 -> 阈值 2, 50 -> 保留的缓冲区, 200 -> 最大阈值] |
接口配置队列设置 [默认设置为队列设置 1] |
出口排队策略与排队操作和队列限制配置. |
Global config:
mls qos srr-queue output cos-map queue 2 threshold 1 2
mls qos srr-queue output cos-map queue 2 threshold 2 3
mls qos srr-queue output cos-map queue 2 threshold 3 6 7
If no interface config, the queue-set 1 can be used:
3750#show mls qos queue-set 1
Queueset: 1
Queue : 1 2 3 4
----------------------------------------------
buffers : 15 25 40 20
threshold1: 100 125 100 60
threshold2: 100 125 100 150
reserved : 50 100 100 50
maximum : 200 400 400 200
For interface config queue-set 2 explicitly:
3750#show mls qos queue-set 2
Queueset: 2
Queue : 1 2 3 4
----------------------------------------------
buffers : 25 25 25 25
threshold1: 100 200 100 100
threshold2: 100 200 100 100
reserved : 50 50 50 50
maximum : 400 400 400 400
(multiple class with queue-limit turn on)
3850#show policy-map q-limit
Policy Map q-limit
Class users-class
Queuing action ( shaper, bandwidth and bandwidth remaining)
queue-limit cos 2 percent 50
queue-limit cos 3 percent 50
queue-limit cos 6 percent 70
queue-limit cos 7 percent 70
Note: using the above config, cos 2 and cos 3 can be dropped earlier then cos 6 and 7
3750(全局) |
3750(接口) |
3850 |
MLS QoS queue-set output [1] buffers [15 25 40 20 ] |
接口配置队列设置 [默认设置为队列设置 1] |
具有排队操作和队列缓冲区比率[0-100]的策略映射。 |
Default queue-buffer :
3750#show mls qos queue-set 1
Queueset: 1
Queue : 1 2 3 4
----------------------------------------------
buffers : 25 25 25 25
threshold1: 100 200 100 100
threshold2: 100 200 100 100
reserved : 50 50 50 50
maximum : 400 400 400 400
User define queue-buffer:
mls qos queue-set output 1 buffers 15 25 40 20
3750#show mls qos queue-set 1
Queueset: 1
Queue : 1 2 3 4
----------------------------------------------
buffers : 15 25 40 20
threshold1: 100 125 100 60
threshold2: 100 125 100 150
reserved : 50 100 100 50
maximum : 200 400 400 200
3850#show policy-map queue-buffer
Policy Map queue-buffer
Class cos7
bandwidth percent 10
queue-buffers ratio 15
Class cos1
bandwidth percent 30
queue-buffers ratio 25
class-map:
========
3850#show class-map cos7
Class Map match-any cos7 (id 22)
Match cos 7
3850#show class-map cos1
Class Map match-any cos1 (id 28)
Match cos 1
Attach to the interface at egress direction:
3750(全局) |
3750(接口) |
3850 |
MLS QoS(共享模式) |
接口级配置 SRR队列带宽共享1 30 35 5 |
策略映射中的带宽 |
Default share and shape mode:
3750-3stack#show mls qos interface gig 1/0/1 queueing
GigabitEthernet1/0/1
Egress Priority Queue : disabled
Shaped queue weights (absolute) : 25 0 0 0
Shared queue weights : 25 25 25 25
The port bandwidth limit : 100 (Operational Bandwidth:100.0)
The port is mapped to qset : 1
User config share mode under interface:
interface GigabitEthernet1/0/1
srr-queue bandwidth share 40 30 20 10
srr-queue bandwidth shape 0 0 0 0
3750#show mls qos interface gig1/0/1 queueing
GigabitEthernet1/0/1
Egress Priority Queue : disabled
Shaped queue weights (absolute) : 0 0 0 0
Shared queue weights : 40 30 20 10
The port bandwidth limit : 100 (Operational Bandwidth:100.0)
The port is mapped to qset : 1
3850#show policy-map bandwidth
Policy Map bandwidth
Class cos1
bandwidth percent 40
Class cos2
bandwidth percent 30
Class cos3
bandwidth percent 20
Class class-default
bandwidth percent 10
3850#show class-map cos1
Class Map match-any cos1
Match cos 1
3850#show class-map cos2
Class Map match-any cos2
Match cos 2
3850#show class-map cos3
Class Map match-any cos3 (id 26)
Match cos 3
3850#show class-map cos4
Class Map match-any cos4 (id 25)
Match cos 4
3750(全局) |
3750(接口) |
3850 |
MLS QoS [加速队列] 注意:加速队列与优先级队列相同 |
接口级别配置priority-queue out [使相应的队列集的第1个队列成为严格优先级队列] |
策略映射中的优先级 1 |
interface GigabitEthernet1/0/2
priority-queue out
end
3750#show mls qos interface gig1/0/2 queueing
GigabitEthernet1/0/2
Egress Priority Queue : enabled
Shaped queue weights (absolute) : 25 0 0 0
Shared queue weights : 25 25 25 25
The port bandwidth limit : 100 (Operational Bandwidth:100.0)
The port is mapped to qset : 1
3850#show run policy-map priority-queue
class cos7
priority level 1 ? strict priority
class cos1
shape average percent 10
Attach the above policy to interface at egress side:
Default shape mode:
GigabitEthernet1/0/3
Egress Priority Queue : disabled
Shaped queue weights (absolute) : 25 0 0 0
Shared queue weights : 25 25 25 25
The port bandwidth limit : 100 (Operational Bandwidth:100.0)
The port is mapped to qset : 1
User define shape mode:
interface GigabitEthernet1/0/3
srr-queue bandwidth shape 4 4 4 4
3750-3stack#show mls qos interface gigabitEthernet 1/0/3 queueing
GigabitEthernet1/0/3
Egress Priority Queue : disabled
Shaped queue weights (absolute) : 4 4 4 4
Shared queue weights : 25 25 25 25
The port bandwidth limit : 100 (Operational Bandwidth:100.0)
The port is mapped to qset : 1
3850#show policy-map shape
Policy Map shape
Class cos1
Average Rate Traffic Shaping
cir 25%
Class cos2
Average Rate Traffic Shaping
cir 25%
Class cos3
Average Rate Traffic Shaping
cir 25%
Class cos4
Average Rate Traffic Shaping
cir 25%
3750(全局) |
3750(接口) |
3850 |
MLS QoS |
SRR 队列带宽限制 |
速度、带宽 |
interface GigabitEthernet1/0/4
srr-queue bandwidth limit 50
3750-3stack#show mls qos interface g1/0/4 queueing
GigabitEthernet1/0/4
Egress Priority Queue : disabled
Shaped queue weights (absolute) : 25 0 0 0
Shared queue weights : 25 25 25 25
The port bandwidth limit : 50 (Operational Bandwidth:50.0)
The port is mapped to qset : 1
3850#show policy-map default-shape
Policy Map default-shape
Class class-default
Average Rate Traffic Shaping
cir 50%
service-policy child [ queuing based on customer need]
3750(全局配置) |
3750(接口) |
3850 |
Class-map、 Policy-map |
将策略附加到 SVI 接口需要配置MLS QoS vlan_based |
PV 入口策略 |
Note:
SVI: Parent [class acl based class-map->policing]
Child [class interface range class-map->marking]
Child class-map:
3750(config)#class-map cm-interface-1
3750(config-cmap)#match input gigabitethernet3/0/1 - gigabitethernet3/0/2
Child policy-map:
3750(config)#policy-map port-plcmap-1
3750(config-pmap)#class cm-interface-1
3750(config-pmap-c)#police 900000 9000 drop
Parent class-map matching acl:
3750(config)#access-list 101 permit ip any any
Parent class-map:
3750(config)#class-map cm-1
3750(config-cmap)#match access 101
3750(config)#policy-map vlan-plcmap
3750(config-pmap)#class cm-1
3750(config-pmap-c)#set dscp 7
3750(config-pmap-c)#service-policy port-plcmap-1
3750(config-pmap-c)#exit
3750(config-pmap)#class cm-2
3750(config-pmap-c)#service-policy port-plcmap-1
3750(config-pmap-c)#set dscp 10
Attach the policy to the interface:
3750(config)#interface vlan 10
3750(config-if)#service-policy input vlan-plcmap
Note: Due to target change, this can’t be one to one mapping, need config based on
customer requirement.
Target is at port level
Parent classify on vlan
Child: none vlan classification [for example cos/dscp]
3850#show run policy-map PV_parent_marking_child_policing
class vlan10
set dscp 63
service-policy child_class_dscp_policing
class vlan11
set cos 5
service-policy child_class_dscp_policing
class vlan12
set precedence 6
service-policy child_class_dscp_policing
3850#show run policy-map child_class_dscp_policing
class dscp1
police cir percent 12
class dscp2
police cir percent 15
class dscp3
police cir percent 20
class class-default
police cir percent 22
3850#show run class-map vlan10
class-map match-any vlan10
match vlan 10
3850#show run class-map vlan11
class-map match-any vlan11
match vlan 11
3850#show run class-map vlan12
class-map match-any vlan12
match vlan 12
3850#show run class-map dscp1
class-map match-any dscp1
match dscp 1
3850#show run class-map dscp2
class-map match-any dscp2
match dscp 2
3850#show run class-map dscp3
class-map match-any dscp3
match dscp 3
版本 | 发布日期 | 备注 |
---|---|---|
2.0 |
20-Jun-2023 |
重新认证 |
1.0 |
02-Dec-2014 |
初始版本 |