Random Early Detection (RED) proposed by S. Floyd and V.
Jacobson in 1993 is one of the widely deployed Active Queue Management (AQM)
mechanisms. The performance of RED highly depends on the appropriate setting of
atleast four parameters namely:
1. Minimum threshold
2. Maximum threshold
3. Exponential weighted moving average constant
4. Maximum drop probability
Setting appropriate values for these parameters is
considered as a challenging issue and hence in 1999 S. Floyd proposed Gentle variant of RED. Later in 2001, S. Floyd proposed Adaptive RED which automatically sets all these
parameters based on the network conditions.
In NS-2, the
default RED which is active is Gentle RED + Adaptive RED. To simulate the Original RED proposed in 1993 by S. Floyd (because
still there are several researchers who aim to address the parameter
sensitivity of Original RED), following commands must be used in the TCL
Script before configuring a router with RED queue:
Queue/RED set thresh_ 5
Queue/RED set maxthresh_ 15
Queue/RED set q_weight_ 0.001
Queue/RED set cur_max_p_ 0.5
Queue/RED set bytes_ false
Queue/RED set queue_in_bytes_ false
Queue/RED set gentle_ false
Queue/RED set mean_pktsize_ 1000
Note that the values used in the above commands are taken from the Original paper of RED (See References). You need to change them as per your requirements!
thresh_ = minimum threshold
maxthresh_ = maximum threshold
q_weight_ = exponential weighted moving average constant
cur_max_p_ = maximum drop probability
bytes_ and queue_in_bytes_ = indicate calculations of average queue size in bytes. Setting them to false indicates average queue size will be calculated in packets (not in bytes).
gentle_ = Gentle RED mode. Setting it false indicates Gentle mode is OFF
mean_pktsize_ = average size of a packet arriving at the router
Setting RED in Wired Networks:
Sample command is:
$ns duplex-link $n0 $n2 10Mb 10ms RED
Setting RED in Wireless Networks:
Sample command is:
set val(ifq) Queue/RED
Gentle RED Settings in NS-2:
To enable Gentle RED option, the only change required is:
Queue/RED set gentle_ true
Rest all commands and syntax for Gentle RED are exactly same as mentioned above for Original RED.
Hope it helps.
Regards,
Mohit P. Tahiliani
References: S. Floyd and V. Jacobson, "Random Early Detection Gateways for Congestion Avoidance", IEEE/ACM Transactions on Networking, 1, 397-413.