# WRED (Weighted Random Early Detection)

**URL:** https://forum.networklessons.com/t/wred-weighted-random-early-detection/5130
**Category:** Lessons Discussion
**Created:** [October 9, 2018, 1:13pm UTC](https://forum.networklessons.com/t/wred-weighted-random-early-detection/5130 "2018-10-09T13:13:04Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [January 28, 2019, 12:20pm UTC](https://forum.networklessons.com/t/wred-weighted-random-early-detection/5130/4 "2019-01-28T12:20:21Z")

</div>

Hello Samer

> [@sammiria801](#):
>
> now if we have AF21 and AF33 the class different but the probability of dropping packet from AF33 more than AF21, correct?

Class 4 has the highest priority, so if you have AF33, it will have a lower drop probability than AF21 for example. But within the same class, the higher the number the higher the drop probability, so AF13 will more likely be dropped compared to AF11. So yes, you are correct.

> [@sammiria801](#):
>
> what about if the packets AF21 and AF31?

AF31 is in a higher priority class than AF21, so AF 21 has the higher drop probability.

> [@sammiria801](#):
>
> what about if we have AF21 and EF and CS3 and CS4?

EF are also considered part of the DSCP based WREN procedure and are given an even higher priority than the AF markings. As for CS3 and CS4, they have a higher drop probability than the AF series of values.

Ultimately, when using the `random-detect dscp-based` command, you are telling the device to use the six bit DSCP value as the criteria for random drops. As Cisco documentation states, the “dscp-based argument enables WRED to use the DSCP value of a packet when calculating drop probability.” This means that the whole value (6 bits) is used, which means that CS, AF and EF values are considered in this calculation.

You are also able to optionally specify the minimum and maximum packet thresholds for the DSCP value using the `random-detect dscp` command.

More info can be found here:

> **[QoS: Congestion Avoidance Configuration Guide, Cisco IOS Release 12.4T -...](https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_conavd/configuration/12-4t/qos-conavd-12-4t-book/qos-conavd-oview.html#GUID-654C88AF-0E34-4864-8526-93C6C3615F51)**
>
> Congestion Avoidance Overview

> [@sammiria801](#):
>
> also what is the meaning for fair-queue command?

The `fair-queue` command is used to implement Distributed WRED (DWRED). It’s a feature only available in the 7000 series routers. This specific command specifies the number of queues to be reserved for the specific traffic class. You can find out more about DWRED here:

> **[QoS: Congestion Avoidance Configuration Guide, Cisco IOS Release 15M&T -...](https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/qos_conavd/configuration/15-mt/qos-conavd-15-mt-book/qos-conavd-oview.html#GUID-E89670B1-9EFA-4DDD-8862-58818247DD94)**
>
> QoS: Congestion Avoidance Configuration Guide, Cisco IOS Release 15M&T-Congestion Avoidance Overview

I hope this has been helpful!

Laz

---

_[View the full topic](https://forum.networklessons.com/t/wred-weighted-random-early-detection/5130)._
