Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
DQOS Exam Certification Guide - Cisco press.pdf
Скачиваний:
69
Добавлен:
24.05.2014
Размер:
12.7 Mб
Скачать

466 Chapter 6: Congestion Avoidance Through Drop Policies

Foundation Summary

The “Foundation Summary” is a collection of tables and figures that provide a convenient review of many key concepts in this chapter. For those of you already comfortable with the topics in this chapter, this summary could help you recall a few details. For those of you who just read this chapter, this review should help solidify some key facts. For any of you doing your final prep before the exam, these tables and figures are a convenient way to review the day before the exam.

Figure 6-13 outlines the process of packet loss, halving CWND, and slow start.

Figure 6-13 Slamming the CWND Shut and the Slow Start Process After No Acknowledgment Received

Sender

Receiver

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Timeout!

Note: CWND units Are Segment Size in This Example

CWND = 1

CWND = 2

CWND = 3 CWND = 4

SN = 1

ACK

=

2

 

 

 

 

SN = 2

SN = 3

ACK

 

= 3

 

= 4

ACK

 

 

Figure 6-14 shows a graph of CWND after packet loss just using slow start, and another with slow start plus congestion avoidance.

Foundation Summary 467

Figure 6-14 Graphs of CWND with Slow Start and Congestion Avoidance

CWND

 

CWND

Before

Lost ACK

 

 

Congestion

 

 

1 Segment

 

 

 

Size

Time

 

Time

 

 

Slow Start Only

CWND>SSthresh

 

 

Slow Start and

 

 

Congestion Avoidance

The key information about TCP and UDP operation when packets are dropped is summarized in the following list:

UDP senders do not reduce or increase sending rates as a result of lost packets.

TCP senders do reduce their sending rates as a result of lost packets.

TCP senders decide to use either the receiver window or the CWND, based on whichever is lower at the time.

TCP slow start and congestion avoidance dictate how fast the CWND rises after the window was lowered due to packet loss.

The graph in Figure 6-15 shows the proven behavior in the Internet with many TCP connections.

Figure 6-15 Graph of Global Synchronization

Line Rate

Actual Bit Rate

Average

Rate

Time

468 Chapter 6: Congestion Avoidance Through Drop Policies

Table 6-14 describes the overall logic of when RED discards packets, with the same ideas outlined in Figure 6-16.

Table 6-14 Three Categories of When RED Will Discard Packets, and How Many

Average Queue Depth Versus

 

Thresholds

Action

 

 

Average < minimum threshold

No packets dropped.

 

 

Minimum threshold < average depth <

A percentage of packets dropped. Drop percentage increases

maximum threshold

from 0 to a maximum percent as the average depth moves

 

from the minimum threshold to the maximum.

 

 

Average depth > maximum threshold

All new packets discarded similar to tail dropping.

 

 

Figure 6-16 RED Discarding Logic Using Average Depth, Minimum Threshold, and Maximum Threshold

Discard

Percentage

100%

Maximum

Discard

Percentage

Average Queue Depth

Minimum Threshold Maximum Threshold

Table 6-15 summarizes some of the key terms related to RED.

Table 6-15 RED Terminology

Term

Meaning

 

 

Actual queue depth

The actual number of packets in a queue at a particular point in time.

 

 

Average queue depth

Calculated measurement based on the actual queue depth and the previous

 

average. Designed to adjust slowly to the rapid changes of the actual queue

 

depth.

 

 

 

 

Foundation Summary 469

 

 

 

Table 6-15 RED Terminology (Continued)

 

 

 

 

Term

Meaning

 

 

 

 

Minimum threshold

Compares this setting to the average queue depth to decide whether

 

 

packets should be discarded. No packets are discarded if the average queue

 

 

depth falls below this minimum threshold.

 

 

 

 

Maximum threshold

Compares this setting to the average queue depth to decide whether

 

 

packets should be discarded. All packets are discarded if the average queue

 

 

depth falls above this maximum threshold.

 

 

 

 

Mark probability

Used to calculate the maximum percentage of packets discarded when the

 

denominator

average queue depth falls between the minimum and maximum thresholds.

 

 

 

 

Exponential weighting

Used to calculate the rate at which the average queue depth changes as

 

constant

compared with the current queue depth. The larger the number, the slower

 

 

the change in the average queue depth.

 

 

 

Figure 6-17 shows the default WRED settings for precedence 0, with some nondefault settings for precedence 5 traffic.

Figure 6-17 Example WRED Settings for Precedences 0 and 5 for Thresholds and Discard Percent

Discard

Percentage 100%

Precedence 0 Drop

 

 

 

 

 

 

 

 

 

 

Percentage (MPD = 10)

10%

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Precedence 3 Drop

5%

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Percentage (MPD = 20)

 

 

 

 

 

 

 

 

 

Average

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Queue Depth

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

20

30

40

 

 

 

 

 

 

 

Pecedence

Pecedence

Maximum

 

 

Precedence 3

 

 

 

0 Minimum

3 Minimum Threshold

 

 

Precedence 0

 

 

 

Threshold

Threshold

 

 

 

 

 

 

 

 

 

 

 

WRED measures the average queue depth of the FIFO queue on an interface, as shown in Figure 6-18.

470 Chapter 6: Congestion Avoidance Through Drop Policies

Figure 6-18 FIFO Output Queue and WRED Interaction

Output Interface on a Router

Average Queue Depth Based on

Class Queue Actual Depth

 

 

 

WRED

 

 

FIFO Interface

 

 

 

 

New Packet

 

 

 

 

 

TX Ring

 

Decision

 

 

Output Queue

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Packet

Discarded

WRED can be applied to each class queue with CBWFQ, as shown in Figure 6-19.

Figure 6-19 WRED with CBWFQ

Average Queue Depth Based on

Class Queue Actual Depth

 

 

 

 

 

WRED

 

 

 

Class 1 Output

 

 

 

 

 

 

 

 

 

 

Decision

 

 

 

Queue

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Average Queue Depth Based on

 

 

 

 

 

 

 

 

Class Queue Actual Depth

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Classification

 

 

 

WRED

Class 2 Output

 

 

TX Ring

 

 

 

 

 

 

 

 

 

 

 

 

Decision

 

 

Queue

 

 

 

 

 

 

 

 

.

.

Average Queue Depth Based on

Class Queue Actual Depth

WRED

 

 

Class N Output

 

Decision

 

 

Queue

 

 

 

 

 

 

 

 

 

Tables 6-16 and 6-17 list the WRED configuration and show commands, respectively.

 

 

Foundation Summary 471

 

 

 

Table 6-16 Command Reference for WRED

 

 

 

 

 

Command

Mode and Function

 

 

 

 

random-detect [dscp-based | prec-based]

Interface or class configuration mode; enables WRED,

 

 

specifying whether to react to precedence or DSCP.

 

 

 

 

random-detect [attach group-name]

Interface configuration mode; enables per-VC WRED

 

 

on ATM interfaces by referring to a random-detect-

 

 

group.

 

 

 

 

random-detect-group group-name [dscp-

Global configuration mode; creates a grouping of

 

based | prec-based]

WRED parameters, which can be enabled on

 

 

individual ATM VCs using the random-detect attach

 

 

command.

 

 

 

 

random-detect precedence precedence min-

Interface, class, or random-detect-group configuration

 

threshold max-threshold mark-prob-

modes; overrides default settings for the specified

 

denominator

precedence, for minimum and maximum WRED

 

 

thresholds, and for percentage of packets discarded.

 

 

 

 

random-detect dscp dscpvalue min-

Interface, class, or random-detect-group configuration

 

threshold max-threshold [mark-probability-

modes; overrides default settings for the specified

 

denominator]

DSCP, for minimum and maximum WRED

 

 

thresholds, and for the percentage of packets

 

 

discarded.

 

 

 

 

random-detect exponential-weighting-

Interface, class, or random-detect-group configuration

 

constant exponent

modes; overrides default settings for exponential

 

 

weighting constant. Lower numbers make WRED

 

 

react quickly to changes in queue depth; higher

 

 

numbers make WRED react less quickly.

 

 

 

Table 6-17 Exec Command Reference for WRED

 

 

 

 

 

Command

Function

 

 

 

 

show queue interface-name interface-

Lists information about the packets that are waiting in

 

number [vc [vpi/] vci]]

a queue on the interface

 

 

 

 

show queueing random-detect [interface

Lists configuration and statistical information about

 

atm-subinterface [vc [[vpi/] vci]]]

the queuing tool on an interface.

 

 

 

 

show interfaces

Mentions whether WRED has been enabled on the

 

 

interface

 

 

 

 

show interface random-detect

Lists information about WRED when distributed

 

 

WRED is running on a VIP interface

 

 

 

 

show policy-map [interface interface-name

Lists WRED information when it is enabled inside an

 

interface-number]

MQC policy map

 

 

 

472 Chapter 6: Congestion Avoidance Through Drop Policies

Fred classifies each flow into one of three FRED flow types, as listed in Table 6-18.

Table 6-18 FRED Flow Types

 

 

Transport

FRED

Flow Type

Description

Protocol

Discard Policy

 

 

 

 

Robust

Adapts to lost packets by slowing down

TCP

Moderate discard rates

 

the rate of sending packets

 

 

 

 

 

 

Fragile

Does not adapt to lost packets by

UDP

Low discard rates

 

slowing down, but the number of packets

 

 

 

sent is not excessive

 

 

 

 

 

 

Nonadaptive

Does not adapt to lost packets by

UDP

High discard rates

 

slowing down, and the number of

 

 

 

packets sent is excessive

 

 

 

 

 

 

The terms used by FRED to describe the processes covered so far are listed in Table 6-19.

Table 6-19 FRED Terminology

Term

Definition

 

 

Average per-flow queue size

A calculated value, based on the formula maximum queue size/

 

number of active flows.

 

 

Active flow

A flow that currently has packets in the queue.

 

 

Maximum per-flow queue size

A calculated value, based on the formula (average queue size *

 

scaling factor). (This same formula is used in the previous example

 

that results in an answer of 16.) This value is used to determine

 

which flows are fragile, and which are nonadaptive.

 

 

Scaling factor

Number used in the calculation of maximum per-flow queue size,

 

which may be changed using configuration.

 

 

Average depth factor

Another name for scaling factor.

 

 

FRED configuration and show commands are listed in Tables 6-20 and 6-21.

Table 6-20 Command Reference for FRED

Command

Mode and Function

 

 

random-detect flow

Interface configuration mode; enables FRED on the

 

interface.

 

 

random-detect flow average-depth-factor

Interface configuration mode; changes scaling factor.

scaling-factor

The lower the number, the more aggressively FRED

 

discards packets for flows using more than their fair

 

share of the available queue space.

 

 

 

 

 

Foundation Summary 473

 

 

 

 

Table 6-20 Command Reference for FRED (Continued)

 

 

 

 

 

 

 

Command

 

Mode and Function

 

 

 

 

 

random-detect flow count number

 

Interface configuration mode; overrides default

 

 

 

setting for the maximum number of concurrent flows

 

 

 

tracked by FRED. (The default is 256.)

 

 

 

 

 

random-detect precedence precedence

 

Interface, class, or random-detect-group configura-

 

min-threshold max-threshold mark-prob-

 

tion modes; overrides default settings for the speci-

 

denominator

 

fied precedence, for minimum and maximum WRED

 

 

 

thresholds, and for percentage of packets discarded.

 

 

 

 

 

random-detect dscp dscpvalue min-threshold

Interface, class, or random-detect-group configura-

 

max-threshold [mark-probability-

 

tion modes; overrides default settings for the speci-

 

denominator]

 

fied DSCP, for minimum and maximum WRED

 

 

 

thresholds, and for percentage of packets discarded.

 

 

 

 

 

random-detect exponential-weighting-

 

Interface, class, or random-detect-group configura-

 

constant exponent

 

tion modes; overrides default settings for exponential

 

 

 

weighting constant. Lower numbers make WRED

 

 

 

react quickly to changes in queue depth; higher num-

 

 

 

bers make WRED react less quickly.

 

 

 

 

Table 6-21 Exec Command Reference for FRED

 

 

 

 

 

 

Command

Function

 

 

 

 

show queue interface-name interface-

Lists information about the packets that are waiting in a

 

number [vc [vpi/] vci]]

queue on the interface

 

 

 

 

show queueing random-detect [interface

Lists configuration and statistical information about the

 

atm-subinterface [vc [[vpi/] vci]]]

queuing tool on an interface

 

 

 

 

show interfaces

Mentions whether WRED has been enabled on the

 

 

interface

 

 

 

 

show interface random-detect

Lists information about WRED when distributed WRED

 

 

is running on a VIP interface

 

 

 

 

Table 6-22 summarizes many of the key concepts when comparing WRED and FRED.

474 Chapter 6: Congestion Avoidance Through Drop Policies

Table 6-22 WRED Versus FRED

Feature

WRED

FRED

 

 

 

Discards packets to avoid congestion

Yes

Yes

 

 

 

Can be enabled on the physical interface concurrently with a

No

No

queuing tool

 

 

 

 

 

Can be combined with CBWFQ or LLQ policy map

Yes

No

 

 

 

Bases drop decision, at least in part, on different thresholds per

Yes

Yes

precedence or DSCP value

 

 

 

 

 

Bases drop decision, at least in part, on per-flow queue depth

No

Yes