电脑技术学习

在带PFC的Catalyst 6000h上进行输出调度

dn001

  介绍

输出调度用于确保重要业务在严重超量预订的情况下不会被丢弃。本文将说明所有涉及Catalyst 6000交换机输出调度的技术和算法。本文还将重点说明如何在运行集成Cisco IOS®(本机模式)的Catalyst 6000上对输出调度进行配置,如何检验操作。

假如您想知道有关加权早期随机检测(WRED)、加权循环(WRR)以及尾端丢弃的具体信息,或者您的Catalyst 6 000上使用混合模式软件,请参考“Catalyst 6000系列交换机上的QoS:采用混合模式在带PFC的Catalyst 6000上进行输出调度”。


Catalyst 6000上不同线路卡的输出队列能力

假如您并不确定某个端口的队列能力,那么首先要做的就是发出 show queueing interface <gig fast et> <mod/port> 命令。以下是SUP1A线路卡上一个端口的 show queueing interface 命令输出的前几行:

cosmos#show queueing interface gig 1/1
Interface GigabitEthernet1/1 queueing strategy:; Weighted Round-Robin

QoS is disabled globally
Trust state: trust DSCP
Default COS is 0
Transmit group-buffers feature is enabled
Transmit queues [type = 1p2q2t]:
Queue Id;Scheduling; Num of thresholds
-----------------------------------------
1 WRR low;;2
2 WRR high;2
3 Priority;1
.....(output truncated)

正如您所看到的,该端口的输出队列类型称为1p2q2。

了解端口的队列能力

Catalyst 6000以及6500交换机上有好几种队列类型。下表说明了端口QoS体系结构的表示方法。

发送/接收端 队列表示法 队列数量 优先级队列 WRR队列数量 WRR队列数量及类型阈值 Tx 2q2t 2 - 2 2 configurable Tail-Drop Tx 1p2q2t 3 1 2 2 configurable WRED Tx 1p3q1t 4 1 3 1 configurable WRED Tx 1p2q1t 3 1 2 1 configurable WRED Rx 1q4t 1 - 1 4 configurable Tail-Drop Rx 1p1q4t 2 1 1 4 configurable Tail-Drop Rx 1p1q0t 2 1 1 Not configurable Rx 1p1q8t 2 1 1 8 configurable WRED

下表列出接口/端口接收与发送侧的所有模块以及队列类型。

模块 接收队列 发送队列 WS-X6K-S2-PFC2 1p1q4t 1p2q2t WS-X6K-SUP1A-2GE 1p1q4t 1p2q2t WS-X6K-SUP1-2GE 1q4t 2q2t WS-X6501-10GEX4 1p1q8t 1p2q1t WS-X6502-10GE 1p1q8t 1p2q1t WS-X6516-GBIC 1p1q4t 1p2q2t WS-X6516-GE-TX 1p1q4t 1p2q2t WS-X6416-GBIC 1p1q4t 1p2q2t WS-X6416-GE-MT 1p1q4t 1p2q2t WS-X6316-GE-TX 1p1q4t 1p2q2t WS-X6408A-GBIC 1p1q4t 1p2q2t WS-X6408-GBIC 1q4t 2q2t WS-X6524-100FX-MM 1p1q0t 1p3q1t WS-X6324-100FX-SM 1q4t 2q2t WS-X6324-100FX-MM 1q4t 2q2t WS-X6224-100FX-MT 1q4t 2q2t WS-X6548-RJ-21 1p1q0t 1p3q1t WS-X6548-RJ-45 1p1q0t 1p3q1t WS-X6348-RJ-21 1q4t 2q2t WS-X6348-RJ21V 1q4t 2q2t WS-X6348-RJ-45 1q4t 2q2t WS-X6348-RJ-45V 1q4t 2q2t WS-X6148-RJ-45V 1q4t 2q2t WS-X6148-RJ21V 1q4t 2q2t WS-X6248-RJ-45 1q4t 2q2t WS-X6248A-TEL 1q4t 2q2t WS-X6248-TEL 1q4t 2q2t WS-X6024-10FL-MT 1q4t 2q2t

Catalyst 6000上输出调度的配置、监控以及实例


配置

本节说明在支持本机IOS的Catalyst 6000上配置输出调度时应遵循的所有步骤。有关Catalyst 6000的默认配置,请参阅本文的 默认配置一节。

Catalyst 6000的配置包含以下任务:

1.启用服务质量(服务质量)

2.将每个可能的服务级别(CoS)值映射到队列和阈值

3.配置WRR加权

4.配置分配给每个队列的缓冲区

5.配置每个队列的阈值级别

注重: 所有这些任务(除第一项外)均为可选任务。您可以决定一个或多个参数保持默认值。

下文将对这五个步骤作具体的解释。

1.首先启用QoS。请记住,QoS默认值禁用。当QOS禁用时,无论您对CoS映射作何种配置,都不会影响结果。系统只会以先进先出(FIFO)的方式处理一条队列,所有数据包将被丢弃。; cosmos#conf t
Enter configuration commands, one per line.; End with CNTL/Z.
cosmos(config)#mls qos

QoS is enabled globally
Microflow policing is enabled globally

QoS global counters:
Total packets: 552638
IP shortcut packets: 0
Packets dropped by policing: 0
IP packets with TOS changed by policing: 0
IP packets with COS changed by policing: 0
Non-IP packets with CoS changed by policing: 0

2.CoS到队列/阈值的映射必须分配给所有队列类型。定义给2q2t型端口的映射将不能应用于任何1p2q2t端口。同样,您定义给2q2t的映射将被应用于所有具2q2t队列机制的端口。实现该操作的命令是如下在接口方式下的cos-map命令:

 wrr-queue  cos-map<Q number (1-2)> <threshold_number (1-2)> <cos value 1> <cos value 2> 
 priority-queue cos-map<Q number (always 1)> <cos value 1> <cos value 2>
 

从这里可以看出,您可以对WRR队列分别进行配置。假如存在优先级队列,您可以使用priority-queue命令对其进行配置。

注重: 队列总是从优先级最低的队列开始编号,并以绝对优先的队列结束。例如:

  • 队列1将是低优先级WRR队列

  • 队列2将是高优先级WRR队列

  • 队列3将是绝对优先队列

所有类型的队列均可重复此操作或者保持默认的CoS分配值。例如,对于1p2q2t队列:

 cosmos#conf t 
 cosmos(config)#int gig 1/1 
 cosmos(config-if)#priority-queue cos-map 1 5    
 !-- CoS 5 分配给优先级队列 
   cos-map configured on:  Gi1/1 Gi1/2 
 cosmos(config-if)#wrr-queue cos-map 1 1 0 1
 !-- CoS 0 和1 分配给低WRR队列的第一个阀值 
   cos-map configured on:  Gi1/1 Gi1/2 
 cosmos(config-if)#wrr-queue cos-map 1 2 2 3
 !-- CoS 2 和3 分配给低WRR队列的第二个阀值       
   cos-map configured on:  Gi1/1 Gi1/2 
 cosmos(config-if)#wrr-queue cos-map 2 1 4 6
 !-- CoS 4 和6分配给高WRR队列的第一个阀值 
   cos-map configured on:  Gi1/1 Gi1/2 
 cosmos(config-if)#wrr-queue cos-map 2 2 7 
 !-- CoS 7分配给高WRR队列的第一个阀值   
   cos-map configured on:  Gi1/1 Gi1/2 
   

检查配置:

 cosmos#show queueing int gig 1/1 
 ...output truncated 
  
 queue thresh cos-map 
     --------------------------------------- 
     1     1      0 1 
     1     2      2 3 
     2     1      4 6 
     2     2      7 
     3     1      5 
 .... output truncated
 

1.WRR加权需要配置给两个WRR队列。可以通过发出以下接口命令来实现:

wrr-queue bandwith <weight for Q1> <weight for Q2>

加权1与队列1关联,该队列应为低优先级WRR队列。该加权应总是保持比加权2低一个级别。该加权可以在1和255之间任意取值,并可使用以下公式分配百分比:

对于队列1:[加权1/(加权1+加权2)]

对于队列2:[加权2/(加权1+加权2)]

必须定义所有队列类型的加权。这些加权类型不必相同。例如,对于2q2t,队列1得到20%的处理而队列2得到80%的处理:

 cosmos#conf t 
 Enter configuration commands, one per line.  End with CNTL/Z. 
 cosmos(config)#int gig 1/1 
 cosmos(config-if)#wrr-queue bandwidth ? 
   <1-255>  enter bandwidth weight between 1 and 255 
 cosmos(config-if)#wrr-queue bandwidth 20 80
 !-- 队列 1消耗20%的时间, 队列 2将消耗80%的时间。 
 cosmos(config-if)# 
 


检查配置:

 
 cosmos#show queueing interface gig 1/1 
 Interface GigabitEthernet1/1 queueing strategy:  Weighted Round-Robin 
   Port QoS is enabled 
   Port is untrusted 
   Default cos is 0 
   Transmit queues [type = 1p2q2t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         WRR low             2 
        2         WRR high            2 
        3         Priority            1 
 
     WRR bandwidth ratios:   20[queue 1]  80[queue 2] 
     queue-limit ratios:     90[queue 1]   5[queue 2] 
 .... output truncated.... 
 

注重: 当无法使用混合模式时,您可以对各接口配置不同的WRR加权。

1.必须定义发送队列比率。这可决定为不同队列之间分缓冲的方式。假如您有三个队列(1p2q2t),您需要对高优先级WRR队列以及绝对优先队列设定相同的级别。这些级别不能因硬件原因而不同。仅为这两个WRR队列配置带宽,假如有绝对优先队列,我们将自动地将与高优先级的WRR队列相同的值配置给该队列。

 wrr-queue queue-limit <percentage WRR q1> <percentage WRR Q2>
 cosmos(config)#int gig 1/2 
 cosmos(config-if)#wrr-queue queue-limit 70 15     
 !--队列 1将占用70% 缓冲器,队列 2 和3各占15%。 
   queue-limit configured on:  Gi1/1 Gi1/2 
 

检查配置:

 cosmos#show queueing interface gig 1/2
 Interface GigabitEthernet1/2 queueing strategy:  Weighted Round-Robin 
   Port QoS is enabled 
   Port is untrusted 
   Default cos is 0 
   Transmit queues [type = 1p2q2t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         WRR low             2 
        2         WRR high            2 
        3         Priority            1 
 
     WRR bandwidth ratios:    5[queue 1] 255[queue 2] 
     queue-limit ratios:     70[queue 1]  15[queue 2] 
 

注重: 最好为低优先级WRR队列留最大缓冲区,因为对于这个队列,我们需要启用更多缓冲器。其它队列将享受较高优先级的服务。

1.最后一步是对WRED队列或者尾端丢弃队列配置阈值级别。命令如下:

使用WRED作为丢弃机制的队列,配置阈值采用以下命令:

wrr-queue random-dtect max-threshold <Q number> <threshold 1 value> <threshold 2 value>

对于使用尾端丢弃作为丢弃机制的队列,采用以下命令:

wrr-queue threshold <Q number> <threshold 1 value> <threshold 2 value>

配置WRED队列:

 cosmos(config)# int gig 1/1
 cosmos(config-if)#wrr-queue random-detect max-threshold  1 50 80 
 !-- 将队列1的阀值设置为50,最大阀值的80%配置于:Gi1/1 Gi1/2.  
 cosmos(config-if)#wrr-queue random-detect max-threshold  2 40 60 
 !-- 将队列2的阀值设置为49,最大阀值的60%配置于:Gi1/1 Gi1/2.  
 

配置尾端丢弃队列:

 
 cosmos(config)#int fast e 3/1 
 cosmos(config-if)#wrr-queue threshold ? 
   <1-2> enter threshold queue id (1-2) 
 cosmos(config-if)#wrr-queue threshold 1 ? 
   <1-100>  enter percent of queue size between 1 and 100 
 cosmos(config-if)#wrr-queue threshold 1 50 100      
 !-- 我们将队列1(低优先级)2q2t接口没有尾数的阀值设置为50,  
 !-- 并填满整个缓冲器: 
 threshold configured on: Fa3/1 Fa3/2 Fa3/3 Fa3/4 Fa3/5 Fa3/6 Fa3/7 Fa3/8 Fa3/9 Fa3/10 Fa3/11 Fa3/12 
 cosmos(config-if)# 
 cosmos(config-if)# 
 cosmos(config-if)#wrr-queue threshold 2 40 100      
 !-- 我们将队列2(高优先级)2q2t接口没有尾数的阀值设置为40,  
 !-- 并填满整个缓冲器:   
 threshold configured on: Fa3/1 Fa3/2 Fa3/3 Fa3/4 Fa3/5 Fa3/6 Fa3/7 Fa3/8 Fa3/9 Fa3/10 Fa3/11 Fa3/12 
 cosmos(config-if)# 
 


检查配置:

 cosmos#show queueing int gig 1/1
 Interface GigabitEthernet1/1 queueing strategy:  Weighted Round-Robin 
   Port QoS is enabled 
   Port is untrusted 
   Default cos is 0 
   Transmit queues [type = 1p2q2t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         WRR low             2 
        2         WRR high            2 
        3         Priority            1 
 
     WRR bandwidth ratios:   20[queue 1]  80[queue 2] 
     queue-limit ratios:     70[queue 1]  15[queue 2] 
 
     queue random-detect-max-thresholds 
     ---------------------------------- 
       1    50[1] 80[2] 
       2    40[1] 60[2] 
 
 cosmos#show queueing int fa 3/1 
 Interface FastEthernet3/1 queueing strategy:  Weighted Round-Robin 
   Port QoS is enabled 
   Port is untrusted 
   Default cos is 0 
   Transmit queues [type = 2q2t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         WRR low             2 
        2         WRR high            2 
 
     WRR bandwidth ratios:  100[queue 1] 255[queue 2] 
     queue-limit ratios:     90[queue 1]  10[queue 2] 
 
     queue tail-drop-thresholds 
     -------------------------- 
     1     50[1] 100[2] 
     2     40[1] 100[2] 
 

对于该队列,阈值的配置以及CoS的分配无法在逐个端口进行。所有变化都应用于一组相邻的端口:

千兆线路卡的四个端口:端口1至端口4是一组,端口5至端口8是另一组

10/100端口或者100光纤端口的12个端口:1到12、13到24、25到36、36到48

监控输出调度以及配置检验

对于某个和输出调度相关的端口,检验当前运行时间配置的最简单的命令是show queueing interface [ gig fast eth] [ slot/port]命令。该命令显示端口上的队列类型、CoS到不同队列和阈值的映射、缓冲共享以及WRR加权(在这里,队列1为20% WRR,队列2为80% WRR)。该命令显示输出调度的所有配置信息,以及每个队列的每个阈值所丢充的数据包数量:

 cosmos#show queueing int gig 1/1 
 Interface GigabitEthernet1/1 queueing strategy:  Weighted Round-Robin 
   Port QoS is enabled 
   Port is untrusted 
   Default COS is 0 
   Transmit queues [type = 1p2q2t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         WRR low             2 
        2         WRR high            2 
        3         Priority            1 
     WRR bandwidth ratios:   20[queue 1]  80[queue 2] 
     queue-limit ratios:     70[queue 1]  15[queue 2] 
 
     queue random-detect-max-thresholds 
     ---------------------------------- 
       1    50[1] 80[2] 
       2    40[1] 60[2] 
 
     queue thresh cos-map 
     --------------------------------------- 
     1     1      0 1 
     1     2      2 3 
     2     1      4 6 
     2     2      7 
     3     1      5 
 
   Receive queues [type = 1p1q4t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         Standard            4 
        2         Priority            1 
   
 
     queue tail-drop-thresholds 
     -------------------------- 
     1     100[1] 100[2] 100[3] 100[4] 
 
     queue thresh cos-map 
     --------------------------------------- 
     1     1      0 1 
     1     2      2 3 
     1     3      4 
     1     4      6 7 
     2     1      5 
   
 
   Packets dropped on Transmit: 
     BPDU packets:  0 
 
     queue thresh    dropped  [cos-map] 
     --------------------------------------------------- 
     1     1               0  [0 1 ] 
     1     2               0  [2 3 ] 
     2     1               0  [4 6 ] 
     2     2               0  [7 ] 
     3     1               0  [5 ] 
 
   Packets dropped on Receive: 
     BPDU packets:  0 
 
     queue thresh    dropped  [cos-map] 
     --------------------------------------------------- 
     1     1               0  [0 1 ] 
     1     2               0  [2 3 ] 
     1     3               0  [4 ] 
     1     4               0  [6 7 ] 
     2     1               0  [5 ]
 


输出调度实例

Catalyst 6000中产生以下流量:

  • 在千兆端口1/2:一千兆流量,优先值为零

  • 在千兆端口5/2:

    • 133 M流量 优先值为七

    • 133 M流量 优先值为六

    • 133 M流量 优先值为五

    • 133 M流量 优先值为四

    • 133 M流量 优先值为三

    • 133 M流量 优先值为二

    • 133 M流量 优先值为一

所有单点发送业务从交换机每个千兆端口1/1中出口,且出现超量预订。 QQread.com 推出各大专业服务器评测 Linux服务器的安全性能 SUN服务器 HP服务器 DELL服务器 IBM服务器 联想服务器 浪潮服务器 曙光服务器 同方服务器 华硕服务器 宝德服务器

实例1:启用了QoS并使用了缺省参数

本例中的所有输出通过show int queueing int gig 1/1命令进行配置。该命令提供了输入调度的其它信息。但是本文仅说明输出调度,该输出被删节。

想一想假如QoS全面启用且几分钟后使用所有默认参数,会发生什么:

 nelix#show queueing int gig 1/1 
 Interface GigabitEthernet1/1 queueing strategy:  Weighted Round-Robin 
   Port QoS is enabled 
   Trust state: trust DSCP 
   Default cos is 0 
   Transmit queues [type = 1p2q2t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         WRR low             2 
        2         WRR high            2 
        3         Priority            1 
 
     WRR bandwidth ratios:  100[queue 1] 255[queue 2] 
     queue-limit ratios:     90[queue 1]   5[queue 2] 
 
     queue random-detect-max-thresholds 
     ---------------------------------- 
       1    40[1] 100[2] 
       2    40[1] 100[2] 
 
     queue thresh cos-map 
     --------------------------------------- 
     1     1      0 1 
     1     2      2 3 
     2     1      4 
     2     2      6 7 
     3     1      5 
 
   Packets dropped on Transmit: 
     BPDU packets:  0 
 
     queue thresh    dropped  [cos-map] 
     --------------------------------------------------- 
     1     1       149606424  [0 1 ] 
     1     2               0  [2 3 ] 
     2     1        16551394  [4 ] 
     2     2         4254446  [6 7 ] 
     3     1               0  [5 ]
 

从上面的输出可看出默认值包括:

  • 队列1的WRR加权:100/(100+255)= 28%

  • 队列2的WRR加权:255/(255+100)= 72%

  • 缓冲共享:队列1得到90%,队列2得到5%,绝对优先队列得到5%

低优先级WRR队列中的大部分数据包被丢弃,但仍有一些因为双重阈值插入在高优先级WRR队列中。总共有(149606424 + 16551394 + 4254446)= 170412264个数据包被丢弃。这些丢弃的数据包按以下方式分布:

  • 149606424/170412264 = 88%丢弃在队列1(CoS 0 和1的第一阈值数据包)

  • 16551394/170412264 = 10%丢弃在队列1(CoS 4的第一阈值数据包)


  • 4254446/170412264 = 2%丢弃在队列2(CoS 6或7的第二阈值数据包)

注重: 绝对优先队列中没有看到丢弃。

实例2:修改WRR加权

如前面的例子所示,队列2中的数据包仍然被丢弃。修改WRR加权向队列2提供更多带宽。现在队列1将清出4%的时间,队列2将清出96%的时间:

 show run int gig 1/1 
 interface GigabitEthernet1/1 
  no ip address 
  wrr-queue bandwidth 10 255 
  mls qos trust dscp 
  switchport 
  switchport mode Access 
 end 
   
 nelix#show queueing int gig 1/1 
 Interface GigabitEthernet1/1 queueing strategy:  Weighted Round-Robin 
   Port QoS is enabled 
   Trust state: trust DSCP 
   Default cos is 0 
   Transmit queues [type = 1p2q2t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         WRR low             2 
        2         WRR high            2 
        3         Priority            1 
 
     WRR bandwidth ratios:   10[queue 1] 255[queue 2] 
     queue-limit ratios:     90[queue 1]   5[queue 2] 
 
     queue random-detect-max-thresholds 
     ---------------------------------- 
       1    40[1] 100[2] 
       2    40[1] 100[2] 
 
     queue thresh cos-map 
     --------------------------------------- 
     1     1      0 1 
     1     2      2 3 
     2     1      4 
     2     2      6 7 
     3     1      5 
 
   Packets dropped on Transmit: 
     BPDU packets:  0 
 
     queue thresh    dropped  [cos-map] 
     --------------------------------------------------- 
     1     1         2786205  [0 1 ] 
     1     2               0  [2 3 ] 
     2     1           11363  [4 ] 
     2     2              69  [6 7 ] 
     3     1               0  [5 ] 
 

从以上输出可见,队列2丢弃的百分比现在大大减少。总共2797637的丢弃分布如下:

  • 2786205/2797637 = 99.591%丢弃在队列1(CoS 0和1的数据包)

  • 11363/2797637 = 0.408%丢弃在队列1(CoS 4的第一阈值数据包)

  • 69/2797637 = 0.001%丢弃在队列2(CoS 6和7的第二阈值数据包)

使用各种WRR加权可以确保队列2得到更多QoS。

实例3:其它WRR加权修改

我们可对WRR加权作出更大的修改。在以下范例输出中,仅向队列1提供了0.39%的加权:

 show run int gig 1/1 
 interface GigabitEthernet1/1 
  no ip address 
  wrr-queue bandwidth 1 255 
  mls qos trust dscp 
  switchport 
  switchport mode access 
 end 
 
 nelix#show queueing int gig 1/1 
 Interface GigabitEthernet1/1 queueing strategy:  Weighted Round-Robin 
   Port QoS is enabled 
   Trust state: trust DSCP 
   Default cos is 0 
   Transmit queues [type = 1p2q2t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         WRR low             2 
        2         WRR high            2 
        3         Priority            1 
 
     WRR bandwidth ratios:    1[queue 1] 255[queue 2] 
     queue-limit ratios:     90[queue 1]   5[queue 2] 
 
     queue random-detect-max-thresholds 
     ---------------------------------- 
       1    40[1] 100[2] 
       2    40[1] 100[2] 
 
     queue thresh cos-map 
     --------------------------------------- 
     1     1      0 1 
     1     2      2 3 
     2     1      4 
     2     2      6 7 
     3     1      5 
   
   Packets dropped on Transmit: 
     BPDU packets:  0 
 
     queue thresh    dropped  [cos-map] 
     --------------------------------------------------- 
     1     1         2535315  [0 1 ] 
     1     2               0  [2 3 ] 
     2     1             705  [4 ] 
     2     2              73  [6 7 ] 
     3     1               0  [5 ] 
 


即使增加了WRR加权,队列2中的数据包仍被丢弃。但是,并非很多数据包被丢弃。队列2中只有0.03%的丢包。

实例4:修改队列极限缓冲区分配

如实例2和3所示,尽管WRR百分比能确保不会出现如此多的丢弃,但在队列2中仍然有丢弃的数据包。在队列2中仍有第二阈值的数据包被丢弃。这说明,当我们到达设定为100%的第二阈值且发现队列饱和时,数据包仍被丢弃。

为了改善这个情况,对队列极限作出更改(分配给各队列的缓冲区大小)。在以下实例中,队列1的队列极限设定为70%,队列2为15%,绝对优先队列为15%:

 show run gig 1/1 
 interface GigabitEthernet1/1 
  no ip address 
  wrr-queue bandwidth 1 255 
  wrr-queue queue-limit 70 15 
  mls qos trust dscp 
  switchport 
  switchport mode access 
 end 
 
 nelix#show queueing int gig 1/1 
 Interface GigabitEthernet1/1 queueing strategy:  Weighted Round-Robin 
   Port QoS is enabled 
   Trust state: trust DSCP 
   Default cos is 0 
   Transmit queues [type = 1p2q2t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         WRR low             2 
        2         WRR high            2 
        3         Priority            1 
 
     WRR bandwidth ratios:    1[queue 1] 255[queue 2] 
     queue-limit ratios:     70[queue 1]  15[queue 2] 
 
     queue random-detect-max-thresholds 
     ---------------------------------- 
       1    40[1] 100[2] 
       2    40[1] 100[2] 
 
     queue thresh cos-map 
     --------------------------------------- 
     1     1      0 1 
     1     2      2 3 
     2     1      4 
     2     2      6 7 
     3     1      5 
 
   Receive queues [type = 1p1q4t]: 
     Queue Id    Scheduling  Num of thresholds 
     ----------------------------------------- 
        1         Standard            4 
        2         Priority            1 
   
     queue tail-drop-thresholds 
     -------------------------- 
     1     100[1] 100[2] 100[3] 100[4] 
 
     queue thresh cos-map 
     --------------------------------------- 
     1     1      0 1 
     1     2      2 3 
     1     3      4 
     1     4      6 7 
     2     1      5 
  
   Packets dropped on Transmit: 
     BPDU packets:  0 
 
     queue thresh    dropped  [cos-map] 
     --------------------------------------------------- 
     1     1       154253046  [0 1 ] 
     1     2               0  [2 3 ] 
     2     1               0  [4 ] 
     2     2               0  [6 7 ] 
     3     1               0  [5 ] 
 

现在,仅在队列1中存在丢弃情况。

采用输出调度减少延迟以及抖动

上述实例表明,实施输出调度的益处在于:万一输出端口出现超量预订,可以避免IP话音(VoIP)或者要害任务的话音丢弃。超量预订在正常网络中并不经常出现(非凡是千兆链路上)。超量预订一般只在流量高峰期间发生或在特定短时期内流量突发的情况下发生。

即使没有任何超量预订,输出调度也能在端到端实施QoS的网络中提供极大的帮助。使用输出调度将有助于减少延迟及抖动。以下是输出调度如何帮助减少延迟和抖动的实例。

减少延迟

当数据包在等待传输时假如被“丢失”在各个交换机的缓冲区中,数据包的延迟会增加。例如,一个CoS为5的小型话音数据包在出现大量拥堵或者正在进行巨量文件传输时从端口发出。假如该输出端口不具有任何QoS,且假定该小型话音数据包的队列位于10个大型的1500字节数据包之后,您可以很轻易地计算出发送10个大型数据包的千兆速度时间:

120微秒内发送(10 x 1500 x 8)= 120000位

假如该数据包在网络中穿行时需要通过八或九个交换机,则可能产生1毫秒的延迟时间。这只是对网络中通过交换机的输出队列延迟所进行的计算。

注重: 假如您需要让同样的10个大型数据包在10M接口上排队(例如有一个连接IP电话和一台PC机),所产生的延迟将为:

120毫秒内发送(10 x 1500 x 8)= 120000比特

实施输出调度将确保CoS为5的话音数据包被放入绝对优先队列,这样就能在CoS小于5的数据包之前得到发送。由此可减少延迟。

减少抖动


使用输出调度的另一个重要好处就是减少抖动。抖动是可以在同一信息流内的数据包中观察到的延迟变化。以下是输出调度如何来减少抖动的实例情况。

在带PFC的Catalyst;6000h上进行输出调度

在上述情况中,有两个业务流需要在同一个端口发送:

  • 一条话音流从10M以太网端口进入。

  • 一条FTP流从1千兆以太网的上行链路进入。

两个业务流通过同一个输出端口离开交换机。本例说明当没有使用输出调度时可能发生的情况。所有大型数据包可能在两个话音数据包之间交织,在从同一业务流中接收话音数据包时产生抖动。当交换机传送大型数据包时,接收数据包1以及数据包N+1之间,存在一个更大的延迟。但是,N+1和N+2之间的延迟可以忽略不计。这导致了话音业务流中的抖动。可以通过使用绝对优先队列轻而易举地避免该问题的发生。请确保话音数据包的CoS值映射至绝对优先队列。

结论

在本文中,通过对几个实例的研究,您已经了解到在运行混合模式的Catalyst 6000上如何对输出队列调度进行配置以及如何进行故障排除。您还看到在支持话音业务的大部分网络中,使用输出调度有以下好处:

  • 在输出端口产生超量预订的情况下,可以避免重要业务被丢弃。

  • 减少延迟。

  • 减少抖动。


标签: