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

 

 

Weighted RED (WRED) 437

 

 

 

Table 6-3

RED Terminology (Continued)

 

 

 

 

Term

Meaning

 

 

 

 

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

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

 

weighting constant

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

 

 

change in the average queue depth.

 

 

 

The next two sections in this chapter cover WRED and FRED, including their respective configurations, as well as comparing RED, WRED, and FRED.

Weighted RED (WRED)

WRED behaves almost identically to RED, as described in the preceding section of this chapter. It calculates the average queue depth, and decides whether to discard packets, and what percentage of packets to discard, based on all the same variables as RED. The only real difference between the two is that WRED weights its behavior based on the IP precedence or IP differentiated services code point (DSCP) values of packets.

The other major concept that needs to be covered, before diving into WRED configuration, relates to where WRED can be enabled, and how it interoperates with queuing tools. Interestingly, although WRED can be enabled on an interface, it cannot be concurrently enabled along with any other queuing tool! When using Modular QoS command-line interface (MQC) to configure queuing, however, WRED can be used for individual class queues.

The following sections cover the following:

How WRED weights packets

When WRED can be enabled

When WRED can be enabled to work with other queuing tools

WRED configuration

How WRED Weights Packets

WRED bases its decisions about when to discard packets, and what percentage to discard, on the following four factors:

The average queue depth

The minimum threshold

The maximum threshold

The MPD

438 Chapter 6: Congestion Avoidance Through Drop Policies

First, just like RED, WRED calculates the average queue depth. WRED then compares the average queue depth to the minimum and maximum thresholds to decide whether it should discard packets. If the average queue depth is between the two thresholds, WRED discards a percentage of the packets, with the percentage based on the MPD; if the average queue depth exceeds the maximum threshold, WRED discards all new packets.

To weight based on precedence or DSCP markings, WRED sets the minimum threshold, maximum threshold, and the MPD to different values per precedence or DSCP value. The average queue depth calculation, however, is not based on the precedence or DSCP value, but is instead calculated for all packets in the queue, regardless of the precedence or DSCP value.

An example of how WRED weights packets can help you make more sense out of how WRED behaves differently than RED. First, consider Figure 6-7, which happens to show the default settings for precedence 0.

Figure 6-7 Default WRED Settings for Precedence 0 for Thresholds and Percent to Discard

Discard

Percentage

100%

10%

 

Maximum

 

Discard

 

Percentage

Average Queue Depth

(1/MPD)

 

20

40

Minimum

Maximum

Threshold

Threshold

WRED calculates the average queue depth just like RED, ignoring precedence, but it decides when to discard packets based on the precedence or DSCP value. Suppose, for instance, that the average queue depth just passed 20. For new precedence 0 packets that need to be placed into the queue, WRED begins discarding some packets. If the average queue depth continues to increase toward 40, WRED continues to discard precedence 0 packets, but more aggressively, up to a rate of 10 percent, when the average queue depth reaches 40. After the average queue depth passes 40, WRED discards all new precedence 0 packets. In fact, if all packets were precedence 0, RED and WRED would behave identically.

Weighted RED (WRED) 439

The real differences between RED and WRED can be seen with more than one IP precedence value. Figure 6-8 shows the default WRED settings for precedence 0, with some different settings for precedence 3 traffic. (The settings in the figure do not match WRED’s precedence 3 defaults, which are listed later in this section.)

Figure 6-8 Example WRED Settings for Precedences 0 and 3 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

 

 

 

 

 

 

 

 

 

 

 

Suppose that the queue associated with the interface has a bunch of packets in it, marked with different precedence values, and the average queue depth just passed 20. For new precedence 0 packets that need to be placed into the queue, WRED begins discarding some precedence 0 packets, because the minimum threshold for precedence 0 is 20. WRED does not discard any precedence 3 packets, however, because the precedence 3 minimum threshold is 30. After the average queue depth reaches 30, WRED starts discarding precedence 3 packets as well. As the average queue depth reaches 40, precedence 0 packets are discarded at a rate approaching 10 percent, but precedence 3 packets are only discarded 5 percent of the time, because the MPD is set to 20, and 1/20 is 5 percent.

With the settings in this example, WRED discards precedence 0 packets earlier, and at a higher rate, as compared to precedence 3 packets. In short, the weighting feature of WRED just determines when WRED begins discarding a percentage of the packets (per-precedence minimum threshold), the maximum percentage discarded (based on per-precedence MPD), and the point at which WRED discards all packets of that precedence (based on the per-precedence maximum threshold).

440 Chapter 6: Congestion Avoidance Through Drop Policies

IOS uses logical choices for the default settings for all WRED parameters. However, you can choose to override the parameters with configuration commands. Tables 6-4 and 6-5 list the IOS default values for minimum threshold, maximum threshold, and MPD with precedence-based WRED (Table 6-4) and DSCP-based WRED (Table 6-5).

Table 6-4 Cisco IOS Software-Default Values for Precedence-Based WRED

 

 

 

Mark

 

 

Minimum

Maximum

Probability

Calculated Maximum

Precedence

Threshold

Threshold

Denominator

Percent Discarded

 

 

 

 

 

0

20

40

10

10%

 

 

 

 

 

1

22

40

10

10%

 

 

 

 

 

2

24

40

10

10%

 

 

 

 

 

3

26

40

10

10%

 

 

 

 

 

4

28

40

10

10%

 

 

 

 

 

5

31

40

10

10%

 

 

 

 

 

6

33

40

10

10%

 

 

 

 

 

7

35

40

10

10%

 

 

 

 

 

RSVP*

37

40

10

10%

 

 

 

 

 

*RSVP = Resource Reservation Protocol

Table 6-5 Cisco IOS Software Default Values for DSCP-Based WRED*

 

 

 

Mark

 

 

Minimum

Maximum

Probability

Calculated Maximum

DSCP**

Threshold

Threshold

Denominator

Percent Discarded

 

 

 

 

 

AF11, AF21,

33

40

10

10%

AF31, AF41

 

 

 

 

 

 

 

 

 

AF12, AF22,

28

40

10

10%

AF32, AF42

 

 

 

 

 

 

 

 

 

AF13, AF23,

24

40

10

10%

AF33, AF43

 

 

 

 

 

 

 

 

 

EF

37

40

10

10%

 

 

 

 

 

*Stated values for IOS 12.2 Mainline software.

**Class selector DSCP values use the same values as their corresponding IP precedence values’ settings.

Cisco IOS Software follows the suggested meaning of all DSCP values, including the fact that these four AF DSCP values should be given equal treatment. The last digit of the name of the AF DSCP value identifies the drop preference, with 3 being most likely to be dropped, and 1