交换机 : Cisco Catalyst 3850 系列交换机

对3850 QoS配置MQC转换的3750个MLS

2016 年 10 月 24 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 8 月 22 日) | 反馈

简介

本文描述3750多层交换服务质量(QoS)和思科Catalyst 3850交换机模块化QoS CLI (MQC) QoS之间的基本区别。它通过配置示例也提供关于转换的详细信息。本文只适用于有线的QoS。本文是为负责网络设计、implemention或者administation包括一独立思科Catalyst 3850交换机或思科Catalyst 3850交换机堆叠,指交换机的网络专业人员。

贡献用Jaroslaw Gawron和Vivek夏尔马, Cisco TAC工程师。

先决条件

要求

Cisco 建议您了解以下主题:

  • Cisco IOS®软件
  • MLS和MQC QoS概念与术语

使用的组件

本文档不限于特定的软件和硬件版本。

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

区别的概述在3750 Mls qos和3850 MQC QoS之间

QoS的配置在3850线路的改善的归结于其MQC (通用QoS配置型号)配置的实施而不是从交换机3750条和3560条线路的旧有Mls qos (根据平台的QoS配置)命令。

主要区别在此表里突出显示:

交换机类型

3750

3850

基本结构

MLS

MQC

QoS默认

已禁用

已启用

全局配置

支持Mls qos

支持一些MQC在入口

不支持Mls qos

支持MQC [class-map, policy-map]

接口设置

支持Mls qos设置和一些在入口的MQC CLI

附加策略对接口

端口信任默认

已禁用

已启用

波尔特入口

分类/管制/标记

排队

分类/管制/标记

[NO Iingress Queuing!]

波尔特出口

排队

分类/管制/标记/排队

Switch Virtual Interface (SVI)入口

分类/管制/标记

分类/标记

SVI出口

分类/标记

认可在QoS方法的主要基本更改是重要的。

默认情况下在3750, QoS禁用,而在3850,启用。并且为了保留Layer2 (在3750平台的L2)/Layer必须应用3 (L3) QoS标记,信任配置。

一旦3850,除非随一个特定策略映射的应用程序在入口或出口接口的改变它所有信息包默认情况下是委托(L2/L3 QoS标记保留)。

3750 QoS型号

3850 QoS型号

功能详细信息对照表

入口

功能

3750

3850

分类

类映射匹配差分服务代码点,优先(Prec),访问控制表(ACL)

支持全部匹配和match-any

类映射业务类别(CoS), Prec, DSCP, ACL

并且VLAN

支持仅match-any

标记

[unconditional set]

Set dscp和Prec

设置Cos、Prec、DSCP和Qos类别

标记

[conditional marking]

DSCP变化

类别默认值表映射

修正

1r2c

1r2c和2r3c

修正减价

管制超出减价

[Only supports DSCP]

管制超出并且违犯减价

[Supports CoS, DSCP, Prec]

聚集管制

支持

Agg管制[one type of  HQoS]

入口队列

在3750在3750x仅支持,但是不支持

不支持

分层的QoS (HQoS)

VLAN根据仅HQoS

基于端口的Agg管制和每VLAN (PV)

出口

功能

3750

3850

无的分类支持排队的操作

不支持

Cos, Prec, DSCP, Qos类别, ACL

并且VLAN

排队操作的分类支持

Cos和DSCP

Cos、Prec、DSCP和Qos类别

标记

不支持

设置Cos、Prec和DSCP

修正

不支持

1r2c, 2r3c与超出/下来违反标通过表映射

队列和队列类型最大数

1P3Q3T [4 queues]

加快queue->优先级队列

2P6Q3T [up to 8 queues]

出口队列

共享模式、形状模式、队列极限、优先级和队列缓冲区

带宽、bandwidth remaining、shaping、队列极限、优先级和队列缓冲区

HQoS

不支持

HQoS :Agg管制、PV、有儿童非队列操作的波尔特成型机和帕伦特用户成型机

普通的QoS显示命令

3750

输入显示命令

show run class-map  [name_of_class-map]
show run policy-map [name of policy-map]
show policy-map int [interface_name]

常规显示命令

show mls qos maps
show mls qos maps <options>
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

3850

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 int [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]

3750到3850 QoS转换示例

QoS设置

3750

[Global]

          3750

       [Interface]

    3850 *

 

示例林克

QoS禁用

没有Mls qos

两个队列

Control->队列(2)

数据- >队列(4)

没有策略的出口

控制- > queue(1)

数据- > queue(2)

示例 1

托拉斯或集在入口和出口

根据入口的排队操作

托拉斯或集

MLS QOS

a)

Mls qos trust cos可

出口排队策略在Cos [ingress need config trust CoS]分类

示例 2

b)

Mls qos trust DSCP

出口排队策略在DSCP分类

示例 3

c)

输入策略以集合操作标记DSCP值

出口排队策略在DSCP分类

示例 4

d)

没有Mls qos trust设置[both CoS/DSCP will be set zero]

与类别默认值的输入策略

设置CoS/DSCP 0

示例5

CoS/DSCP队列映射

Mls qos共享循环法(SRR) -队列输出[CoS-map/DSCP-map]

A、b、c和d将使用对应的新建的映射

与排队操作的输出明确分类[CoS/DSCP]

示例6

DSCP变化

Mls qos DSCP变化

接口需要配置

Mls qos trust DSCP

Mls qos dscp-mutation [name]

与表映射的接口输入策略

示例7

Agg管制

aggregatepolicing的Mls qos

需要interface-level配置

Agg管制[one type of HQoS]

示例8

Police减价

Mls qos map管辖DSCP对[63]的[10] [11]

附加的策略策略建立接口,超出不是丢弃,全局管辖DSCP将生效

[Input]

一表映射为超出和管制的一表映射forviolate操作

[Input and output]

示例9

队列极限

Mls qos队列集输出了[1]阈值[1] [100] [100] [50] [200]

1->队列集1

<1-> queue1

阈值1

阈值2

保留缓冲区

最大门限

设置队列集[2]

[默认队列集1]

与排队操作和队列极限配置的出口排队策略

示例10

队列缓冲区

Mls qos队列集输出[1]缓冲区

[15] [25] [40] [20]

接口设置队列集

策略映射以排队操作和队列缓冲区比率[0-100]

示例11

共享/带宽

MLS QOS

接口级设置

“Srr队列带宽共享1 30 35 5" [Share mode]

在策略映射的带宽

示例12

优先队列

[Expedite queue]

MLS QOS

接口级设置“priority-queue”,这将做对应的队列集的第1个队列作为优先级队列

在策略映射的优先级1

示例13

成型机

MLS QOS

Srr队列带宽形状[shape mode]

在策略映射的形状平均值

示例14

波尔特成型机

MLS QOS

Srr队列带宽限制

波尔特成型机

示例15

HQoS

MLS QOS

SVI [attach policy to SVI]和接口需要配置“Mls qos VLAN_based”

PV策略

并且对端口的附上策略输入方向的

示例16

示例 1:QoS禁用

3750 (全局配置)

3750 (接口)

3850

没有Mls qos

两队列[控制一队列2,数据一个队列4]

 

没有策略的出口

[在queue1的控制在队列2]的pkts和数据包

3750

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

3850#show ru int 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

示例 2:QoS Enable (event)托拉斯COS

3750 (全局)

3750 (接口)

3850

MLS QOS

接口“Mls qos trust cos可” (根据默认Cos映射对队列集1)

根据Cos的出口排队策略(入口需要设置信任Cos)

 

3750

Global config:
3750(config)#mls qos

Interface config:

interface GigabitEthernet1/0/1
mls qos trust cos

Related show cli:

3750#sh mls qos
QoS is enabled
QoS ip packet dscp rewrite is enabled

3750#sh mls qos int 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]

3850

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

示例 3:QoS Enable (event)托拉斯DSCP

3750 (全局)

3750 (接口)

3850

MLS QOS

接口“Mls qos trust DSCP” [根据默认DSCP映射对队列集1]

输入默认信任DSCP

根据DSCP的出口排队策略

3750

config
3750(config)#mls qos <- Global
interface GigabitEthernet1/0/1 <- Interface
mls qos trust dscp


3750#sh mls qos int 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

3850

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

示例 4:与有集合策略的接口的QoS Enable (event)

3750 (全局)

3750 (接口)

3850

MLS QOS

接口输入策略以集合操作标记CoS/DSCP值

[Marked value will be used for egress mapping]

要进行排队映射的需要明确出口策略

3750

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 int f7/0/2
interface FastEthernet7/0/2
mls qos trust dscp
service-policy input set-dscp-63

3750#show policy-map int 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 will be marked to dscp63 which mapping
based on the existing mapping table, other pkts will retain original dscp value
mapping accordingly

3850

Input will be same as 3750 config 

Egress: will 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

示例 5:没有Mls qos trust的QoS Enable (event)在接口

3750 (全局)

3750 (接口)

3850

MLS QOS

接口设置不是Mls qos trust CoS/DSCP

[CoS/DSCP将设置为0]

与类别默认值的接口输入策略

Set dscp 0,与类DSCP0的输出策略与排队操作

3750

Global:
c3750(config)#mls qos

Interface:
interface GigabitEthernet2/0/45
!

3850

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 int gig1/0/1
interface GigabitEthernet1/0/1
service-policy input example5-input

Attach to the egress port:
c3850#show ru int gig1/0/2
interface GigabitEthernet1/0/2
service-policy output example5-output

示例 6:QoS启用与崔凡吉莱CoS/DSCP队列映射

3750 (全局)

3750 (接口)

3850

Mls qos Srr队列映射设置

(Mls qos队列输出[Cos映射队列[1]阈值[3] [4 5])

A、b、c和d将使用新的映射表

[Cos 4和5将是地图对queue1阈值3]

与排队操作的出口明确分类

3750

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

3850

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

示例7 :MLS启用与DSCP变化

3750 (全局)

3750 (接口)

3850

Mls qos DSCP变化

接口需要设置Mls qos trust DSCP

Mls qos dscp-mutation命名[name is defined in global]

与映射不同的DSCP的表映射的接口输入策略

3750

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 int 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 int 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

3850

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]

示例8 :与聚集管制的Mls qos Enable (event)

3750 (全局)

3750 (接口)

3850

Mls qos聚集管制

[All classes using the agg-policing will share the policing rate]

需要接口级设置

Agg管制(HQoS)

Mls qos aggregate-policer agg_traffic 8000 8000超额动作丢弃

建立接口有有agg_traffic作为agg策略器名称的策略

3750

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 will share the same policing rate

3850

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

示例9 :与下来管制马克的MLS Enable (event)

3750 (全局配置)

3750 (接口)

3850

对y的Mls qos map管辖DSCP x

只要接口有策略策略,请超出是传输,全局CLI将起作用[input only]

一表映射为超出和一个管制、输入和输出的违反操作的

3750

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

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

示例10 :与队列极限配置的Mls qos Enable (event)

3750 (全局)

3750 (接口)

3850

Mls qos队列集输出了1阈值1100 100 50 200 (队列极限)

[1 - >queue-set 1,

1->first队列

100 - >threshold 1

100 - >threshold 2

50 - >保留缓冲区

200 - >最大门限]

接口设置队列集

[默认是队列集1]

与排队操作的出口排队策略和问限制配置

3750

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 will 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

3850

(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 will be dropped earlier then cos 6 and 7

示例11 :与队列缓冲区配置的Mls qos Enable (event)

3750 (全局)

3750 (接口)

3850

Mls qos队列集输出[1]缓冲[15 25 40 20]

接口设置队列集[默认队列集1]

策略映射以排队操作和队列缓冲区比率[0-100]

3750

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

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:

示例12 :与带宽配置的Mls qos Enable (event)

3750 (全局)

3750 (接口)

3850

Mls qos (共享模式)

接口级设置

“Srr队列带宽共享1 30 35 5"

在策略映射的带宽

3750

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

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

示例13 :Mls qos Enable (event)以优先级

3750 (全局)

3750 (接口)

3850

Mls qos [expedite queue]

注意:加速队列同优先级队列一样

接口级设置“priority-queue” [make corresponding queue-set's 1st queue as strict priority queue]

在策略映射的Prioriy 1级

3750

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

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:

示例14 :与成型机配置的Mls qos Enable (event)

3750

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

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%

示例15 :与带宽的Mls qos Enable (event)

3750 (全局)

3750 (接口)

3850

MLS QOS

Srr队列带宽限制

速度,带宽

3750

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

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]

示例16 :HQoS

3750 (全局配置)

3750 (接口)

3850

类映射,

策略映射

对SVI的附上策略

接口需要配置“vlan_based的Mls qos”

PV入口策略

3750

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

3850

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#sh 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#sh 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#sh run class-map vlan10
class-map match-any vlan10
match vlan 10

3850#sh run class-map vlan11
class-map match-any vlan11
match vlan 11

3850#sh run class-map vlan12
class-map match-any vlan12
match vlan 12

3850#sh run class-map dscp1
class-map match-any dscp1
match dscp 1

3850#sh run class-map dscp2
class-map match-any dscp2
match dscp 2

3850#sh run class-map dscp3
class-map match-any dscp3
match dscp 3


Document ID: 118629