Sunday, November 6, 2011

notes: Congestion Avoidance: WRED

Attempt to avoids congestion before it occurs by selectively dropping traffic, ie random-detect.
- Weights are based on IP precedence/DSCP.
- WRED is typically used to avoid TCP global synchronization and generally not to successful when majority of flows are UDP.
- Minimum threshold is when WRED becomes active and starts randomly dropping packets.
- The rate of packet drop increases linearly as the average queue size increases until it reaches the maximum threshold.
- When the average queue size reaches the maximum threshold, the fraction of packets dropped is that of the MPD.
- When the average queue size is above the maximum threshold, all packets are dropped.
- MPD (Mark Probability Denominator).
> Is used to determine how aggressively packets will be dropped.
> The lower the number the more aggressively dropped.
> When max-threshold reached, 1/MPD will be dropped!!!!

WRED
The purpose of Weighted Random Early Detection (WRED) is to prevent an interface’s output queue from filling to capacity, because if a queue is completely full, all newly arriving packets are discarded. Some of those packets might be high priority, and some might be low priority. However, if the queue is full, no room exists for any packet. WRED is referred to as a congestion-avoidance QoS tool. It can also prevent a global synchronization problem, in which all TCP senders back off as packets at a full queue are dropped, and then all senders begin to increase the amount of traffic sent, until another synchronized back-off is triggered. Global synchronization results in poor utilization of interface bandwidth.
-it can be either applied on interface or in MQC format.
commands:
- Shows the input and output queue size, and default values
sh queueing int {int}
- Enabled RED on an interface, by default will be classified by IP precedence
- Changes the default values of WRED, (min=10, max=40, mpd=10)
interface s0/0
random-detect [dscp-based | prec-based] #random-detect prec {value} {min-t} {max-t} {mpd}
random-detect dscp {value} {min-t} {max-t} {mpd}
using MQC:
- Shows the policy map configured with all the counters
sh policy-map interface {int} #
- Enables DSCP-based WRED as drop policy
policy-map WRED
class TELNET
bandwidth {kbps}
random-detect dscp-based
random-detect dscp [rsvp] {value}
class HTTP
bandwidth {kbps}
random-detect prec-based
random-detect precedence [rsvp] {value}
class SMTP
bandwidth {kbps}
random-detect ecn


example:
Router(config)# interface ethernet 0/0
Router(config-if)# random-detect dscp-based
Router(config-if)# random-detect dscp af13 25 100 4
Router(config-if)# random-detect dscp af12 30 100 4
Router(config-if)# random-detect dscp af11 35 100 4

explanation:
To reinforce this syntax, consider the following example, where the goal is to configure WRED on interface Ethernet 0/0. After the output queue depth reaches 25 packets, the possibility is introduced that a DSCP value of AF13 be discarded. Packets marked with a DSCP value of AF12 should not be discarded until the queue depth reaches 30 packets. Finally, packets marked with a DSCP value of AF11 should not have any chance of discard until the queue depth reaches 35 packets. If the queue depth exceeds 100 packets, there should be a 100 percent chance of discard for these three DSCP values. However, when the queue depth is exactly 100 packets, the percent chance of discard for these various packet types should be 25 percent:
Examine the solution; the mark probability denominator is 4. This value was chosen to meet the requirement that there be a 25 percent chance of discard when the queue depth equals the maximum threshold (that is, 1 / 4 = .25). Also, a DSCP value of\ AF13 is dropped before a DSCP value of AF12, which is dropped before a DSCP value of AF11. This approach is consistent with the definition of these PHBs, because the last digit in the AF DSCP name indicates its drop preference. For example, a value of AF13 would drop before a value of AF12.
image
The last of the WRED numeric settings that affect its logic is the mark probability \ denominator (MPD), from which the maximum percentage of 10 percent is derived in Figure 13-5. IOS calculates the discard percentage used at the maximum threshold based on the simple formula 1/MPD. In the figure, an MPD of 10 yields a calculated value of 1/10, meaning the discard rate grows from 0 percent to 10 percent as the average queue depth grows from the minimum threshold to the maximum. Also, when WRED discards packets, it randomly chooses the packets to discard.
image
image

No comments:

Post a Comment