Chinaunix首页 | 论坛 | 博客
  • 博客访问: 557937
  • 博文数量: 772
  • 博客积分: 4000
  • 博客等级: 上校
  • 技术积分: 4940
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-16 19:52
文章分类

全部博文(772)

文章存档

2011年(1)

2008年(771)

我的朋友

分类:

2008-10-16 19:59:31

介绍

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

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


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

如果您并不确定某个端口的队列能力,那么首先要做的就是发出 show queueing interface 命令。以下是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

[page]

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    
 priority-queue cos-map  
 

从这里可以看出,您可以对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

加权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  
 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

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

wrr-queue threshold

配置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

[1]  

【责编:wayen】

--------------------next---------------------

阅读(272) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~