3550交换机QoS时序及队列讨论(二)_思科认证指导/认证

队列的权值可以通过ios show 命令进行验证:

nifnif#sh mls qos interface gig 0/1 queueing

gigabitethernet0/1

qos is disabled. only one queue is used

when qos is enabled, following settings will be applied

egress expedite queue: dis

wrr bandwidth weights:

qid-weights

1 - 25

2 - 25

3 - 25

4 - 25

如果启用了快速优先级队列,q4的权值仅在快速队列失效时使用。

看下面的示例:

nifnif#sh mls qos interface gig 0/1 queueing

gigabitethernet0/1

egress expedite queue: ena

wrr bandwidth weights:

qid-weights

1 - 25

2 - 25

3 - 25

4 - 25

!--- the expedite 队列 is disabled.

catalyst 3550 交换机的wred

3550 家族交换机中,只有千兆端口支持wred。 wred是red的修正版本,用来避免拥塞的发生。red定义了如下的参数:

min-threshold(最小限度): 描述了一个队列内的限制, 无包被归于低于该限度

max-threshold(最大限度): 描述了队列的另一个限制。所有包被归于高于最大限度。

slope(斜率): 介于最大和最小值之间的丢包概率。随队列大小的变化,丢包率将按照一定的斜率增加。

下图表示了在red队列中的丢包率。注意,所有的catalyst 交换机都允许采用可调的斜率来执行red。

在wred中,不同的服务是通过加权方式工作的。你可以定义一个标准的服务和一个高级的服务。每个服务被分配不同的极限。当达到最小极限1时,只有被标示为标准服务的包会被丢弃。当达到最小极限2时,仅高级服务的数据包将会被丢弃。如果最小极限值2高于1,被丢弃的包中,普通服务的数量高于高级服务。下图显示了wred 中每个应用服务的可能的丢包率。

3550交换机不允许调节最小限度,仅允许调节最大限度。最小限度被固定为0。下图给出了一个3550交换机上普遍实现的丢包率。

3550交换机上的任何激活的队列通常有一个非零的丢包率,而总是有部分数据包被丢弃。 这是因为最小极限值总是为0。若要避免丢包率达到最大值,最好采用加权尾部数据丢弃的方式,下一节将进行描述。

注意: 关于配置最小极限值的一些增强性需求,参考下面文档:bug id cscdz73556.

要了解关于该bug的更多信息,需要使用到bug toolkit。

3550交换机上,wred可以被配置成两种不同的最大极限值,以提供两种不同的服务。

不同类型的数据流根据各自的内部服务代码要点区分(differentiated services code points dscps)被标识为各自的极限值。这有别于根据数据包的服务类别(cos)来划分的队列标识。dscp与极限列表的映射关系决定64个dscps 中各自对应的极限值。

使用下面的命令,可以显示及更改该列表:

(config-if)# wrr-queue dscp-map threshold_number dscp_1 dscp_2 dscp_8

例如,下面的命令表示了dscp 23 对应于极限值 2:

nifnif(config-if)#wrr-queue dscp-map 2 26

nifnif#sh mls qos int gig 0/1 queue

gigabitethernet0/1

dscp-threshold map:

d1 : d2 0 1 2 3 4 5 6 7 8 9

---------------------------------------

0 : 01 01 01 01 01 01 01 01 01 01

1 : 01 01 01 01 01 01 02 01 01 01

2 : 01 01 01 01 02 01 02 01 01 01

3 : 01 01 01 01 01 01 01 01 01 01

4 : 02 01 01 01 01 01 02 01 01 01

5 : 01 01 01 01 01 01 01 01 01 01

6 : 01 01 01 01

一旦定义了dscp与极限值的映射关系, 你所选择的队列的wred 将会被激活。

使用下面的命令:

(config-if)# wrr-队列 random-detect max-thresold 队列_id threshold_1 threshold_

下例显示了q1队列分别被配置为极限值1 = 50% 及极限值 2 = 100%, 以及极限值 1 = 70% 和极限值 2 = 100%的情况。

3550(config)# interface gigabitethernet0/1

3550(config-if)# wrr-queue random-detect max-threshold 1 50 100

3550(config-if)# wrr-queue random-detect max-threshold 2 70 100

3550(config-if)# wrr-queue random-detect max-threshold 3 50 100

3550(config-if)# wrr-queue random-detect max-threshold 4 70 100

可以通过下面的命令来验证每个队列的类型(wred或其他):

nifnif#sh mls qos int gi 0/1 buffers

gigabitethernet0/1

..

qid wred thresh1 thresh2

1 dis 10 100

2 dis 10 100

3 ena 10 100

4 dis 100 100

ena 表示enable,队列使用wred方式。 dis 表示 disable, 队列使用tail drop(tail drop)方式 。

使用下面命令可以监视在每个极限值下丢弃的包的数量。

sh mls qos int gig x/x stat

wred drop counts:

qid thresh1 thresh2 freeq

1 : 327186552 8 1024

2 : 0 0 1024

3 : 37896030 0 1024

4 : 0 0 1024

catalyst 3550 交换机的tail drop

tail drop是3550交换机的千兆端口上的缺省的管理机制。每个千兆端口可以有两个尾部极限值。每个tail drop极限值所标识的整套的dscp 使用同样的dscp极限值映射表,本文档的wred章节已经定义。当达到极限值,所有的数据包都将被丢弃的极限值。使用下面命令配置尾部丢弃极限值:

(config-if)# wrr-queue threshold queue-id threshold-percentage1 threshold-percentage2

下面的配置示例定义了q1的尾部丢弃极限值1 = 50%,极限值2 = 100%,以及极限值1 = 70% 和极限值2 = 100%

switch(config-if)# wrr-queue threshold 1 50 100

switch(config-if)# wrr-queue threshold 2 70 100

switch(config-if)# wrr-queue threshold 3 60 100

switch(config-if)# wrr-queue threshold 4 80 100

配置千兆端口上的队列大小

3550 交换机使用中央缓存。这意味着每个端口上没有固定的缓存大小。

但是,千兆端口上的固定数量的数据包可以被排列。这些数量固定为4096。缺省的,千兆端口上的每个队列可以达到1024个数据包,而不管包的大小。可以使用下面的命令更改这4096个数据包在四个队列中的分配:

wrr-queue queue-limit q_size1 q_size2 q_size3 q_size4

如下例所示:

3550(config)# interface gigabitethernet0/1

3550(config-if)# wrr-queue queue-limit 4 3 2 1

这些队列的大小参数是相关的,上例表示队列q1的数据包大小是q4的4倍,q2是q4的3倍,q3是q4的2倍。4096个数据包被重新分配如下:

· q1 = [4 /(1+2+3+4) ] * 4096 = 1639 packets

· q2 = 0.3 * 4096 = 1229 packets

· q3 = 0.2 * 4096 = 819 packets

· q1 = 0.1 * 4096 = 409 packets

下面的命令可以显示四个队列中分割的缓冲区之间相关的权值:

cat3550# sh mls qos int buffers

gigabitethernet0/1

notify q depth:

qid-size

1 - 4

2 - 3

3 - 2

4 - 1

...

你也可以使用下面的命令来察看每个队列中还保持了多少空闲的数据包:

(config-if)# sh mls qos int gig x/x stat

wred drop counts:

qid thresh1 thresh2 freeq

1 : 0 0 1639

2 : 0 0 1229

3 : 0 0 819

4 : 0 0 409

Published At
Categories with 认证考试
Tagged with
comments powered by Disqus