本產品的文件集力求使用無偏見用語。針對本文件集的目的,無偏見係定義為未根據年齡、身心障礙、性別、種族身分、民族身分、性別傾向、社會經濟地位及交織性表示歧視的用語。由於本產品軟體使用者介面中硬式編碼的語言、根據 RFP 文件使用的語言,或引用第三方產品的語言,因此本文件中可能會出現例外狀況。深入瞭解思科如何使用包容性用語。
思科已使用電腦和人工技術翻譯本文件,讓全世界的使用者能夠以自己的語言理解支援內容。請注意,即使是最佳機器翻譯,也不如專業譯者翻譯的內容準確。Cisco Systems, Inc. 對這些翻譯的準確度概不負責,並建議一律查看原始英文文件(提供連結)。
本檔案將說明3750多層次交換(MLS)服務品質(QoS)和3850交換器使用模組化QoS CLI(MQC)之間的差異。
思科建議您瞭解以下主題:
本文件所述內容不限於特定軟體和硬體版本。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
本文檔還介紹了有關通過示例配置進行轉換的詳細資訊。本檔案僅適用於有線QoS。本檔案適用於負責設計、實作或管理包含獨立Cisco Catalyst 3850交換器或Cisco Catalyst 3850交換器堆疊(稱為交換器)的網路的網路專業人員。
3850線路中的QoS配置已改進,因為它實施了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 |
將策略附加到介面 |
埠信任預設值 |
已禁用 |
已啟用 |
連線埠輸入 |
分類/管制/標籤/ 佇列 |
分類/管制/標籤 [無入口隊列!] |
連線埠輸出 |
佇列 |
分類/管制/標籤/佇列 |
交換器虛擬介面(SVI)輸入 |
分類/管制/標籤 |
分類/標籤 |
SVI輸出 |
無 |
分類/標籤 |
必須認識到QoS方法的主要基本變化。
在3750上,預設會停用QoS,在3850上會啟用。此外,為了在3750平台上保留第2層(L2)/第3層(L3)QoS標籤,必須應用信任配置。
對於3850,所有資料包在預設情況下都是受信任的(保留L2/L3 QoS標籤),除非您使用入口或出口介面上的特定策略對映應用對其進行更改。
功能 |
3750 |
3850 |
分類 |
類別對映匹配區別服務代碼點(DSCP)、優先順序(Prec)、訪問控制清單(ACL) 同時支援match-all和match-any |
Class-map服務類別(CoS)、Prec、DSCP、ACL 和VLAN 僅支援match-any |
標籤 [無條件設定] |
設定DSCP和Prec |
設定CoS、Prec、DSCP和QoS組 |
標籤 [條件標籤] |
DSCP突變 |
Class-default表對映 |
管制 |
1r2c |
1r2c和2r3c |
管制降級 |
管制超出標籤限制 [僅支援DSCP] |
管制超出和違反降級 [支援CoS、DSCP、Prec ] |
彙總管制 |
支援 |
Agg-policing [一種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:agg-policing、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停用 |
無MLS QoS |
兩個隊列 Control->隊列(2) 資料 — >隊列(4) |
無策略的輸出 控制 — >隊列(1) 資料 — >隊列(2) |
|
信任或在入口和出口設定 基於入口的排隊操作 信任或設定 |
MLS QoS |
答 ) MLS QoS信任CoS |
CoS上的出口隊列策略分類[入口需要配置信任CoS] |
|
b) MLS QoS信任DSCP |
dscp上的出口隊列策略分類 |
|||
思) 輸入帶有用於標籤DSCP值的設定操作的策略 |
DSCP上的出口隊列策略分類 |
|||
d) 無MLS QoS信任配置[兩個CoS/DSCP都可以設定為零] |
使用class-default輸入策略 設定CoS/DSCP 0 |
|||
CoS/DSCP隊列對映 |
MLS QoS共用循環配置資源(SRR) — 隊列輸出[CoS-map/ DSCP-map] |
A、b、c和d可以使用相應的新對映 |
輸出具有排隊操作的顯式分類[CoS/DSCP] |
|
DSCP突變 |
MLS QoS DSCP突變 |
介面需要配置 MLS QoS信任DSCP MLS QoS DSCP-mutation [name] |
具有表對映的介面輸入策略 |
|
Agg管制 |
MLS QoS彙總管制 |
需要介面級配置 |
Agg-policing [一種HQoS] |
|
警方的降級 |
MLS QoS map policed-DSCP [10] [11]到[63] |
管制策略附加到介面,超出not drop,全域性管制的DSCP可以生效 [輸入] |
一個用於超出的表對映和一個用於違反策略操作的表對映 [輸入和輸出] |
|
Queue-limit |
MLS QoS queue-set output [1] threshold [1] [100] [100] [50] [200] 1-> queue-set 1 <1->佇列1 閾值1 閾值2 保留的緩衝區 最大閾值 |
Config queue-set [2] [預設隊列集1] |
具有隊列操作和隊列限制配置的出口隊列策略 |
|
Queue-buffers |
MLS QoS queue-set output [1]緩衝區 [15] [25] [40] [20] |
Interface config queue-set |
具有隊列操作和隊列緩衝區比率的策略對映[0-100] |
|
共用/頻寬 |
MLS QoS |
介面層級設定 「SRR-queue bandwidth share 1 30 35 5」[共用模式] |
策略對映中的頻寬 |
|
優先順序隊列 [加速隊列] |
MLS QoS |
介面級配置「priority-queue out」,這樣可以將相應隊列集的第1個隊列作為優先順序隊列 |
策略對映中的優先順序級別1 |
|
整形器 |
MLS QoS |
SRR-queue bandwidth shape [shape mode] |
策略對映中的形狀平均值 |
|
埠整形器 |
MLS QoS |
SRR隊列頻寬限制 |
埠整形器 |
|
總部 |
MLS QoS |
SVI [attach policy to SVI]和介面需要配置「MLS QoS VLAN_based」 |
PV策略 並將策略附加到輸入方向的埠 |
3750(全域組態) |
3750(介面) |
3850 |
無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信任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信任DSCP MLS QoS DSCP-mutation name [name is defined in global] |
表對映對映不同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彙總管制 [所有類都使用agg-policing可以共用策略速率。] |
需要介面級別配置 |
Agg-policing(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 |
只要介面具有策略策略,即exceed is transmit,全域性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 ->queue-set 1, 1->第一個隊列, 100 ->threshold 1, 100 ->閾值2, 50 ->保留緩衝區, 200 ->最大閾值] |
Interface config queue-set [預設值為queue-set 1] |
具有隊列操作和q-limit配置的出口隊列策略。 |
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]緩衝區[15 25 40 20] |
Interface config queue-set [default queue-set 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 [加速隊列] 注意:加速隊列與優先順序隊列相同 |
Interface level config 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 |
類對映, 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 |
初始版本 |