Search This Blog

Refined Adaptive RED (Re-ARED or RARED) patch for NS-2

Labels: , ,

Adaptive Random Early Detection (ARED) proposed by S. Floyd in 2001 solves most of the issues related to the parameter sensitivity of RED. ARED adaptively varies "Maximum drop probability" and automatically sets other parameters of RED. 

Refined Adaptive RED (Re-ARED or RARED) proposed by T.-H. Kim and K.-H. Lee modifies the ARED's approach of varying "Maximum drop probability". Re-ARED attempts to bring the average queue size closer to the target range more quickly as compared to ARED. As a result, it minimizes packet drop rate and improves the overall performance of the network.

Reference: "Refined Adaptive RED in TCP/IP Networks", Tae-Hoon Kim and Kee-Hyun Lee, SICE-ICASE International Joint Conference, pp. 3722-3725 (2006).

The following patch provides implementation of Re-ARED (or RARED) in NS-2:



Following are the steps to be followed to apply above given patch to ns-2.34:

1. Download ns-allinone-2.34.tar.gz 

2. Download Re-ARED.patch

3. Unzip ns-allinone-2.34.tar.gz. You will get a folder named ns-allinone-2.34.

4. Paste the downloaded patch in this folder.

5. Give the following command: 

    patch -p1 < Re-ARED.patch

6. Then give ./install

If you have already installed copy of ns-allinone-2.34 then follow the below given steps to apply Re-ARED patch

1. Paste the downloaded patch in ns-allinone-2.34 folder.

2. Give the following command: 

    patch -p1 < Re-ARED.patch

3. Go in ns-allinone-2.34/ns-2.34 directory and give the following commands: 

    ./configure
    make clean
    make
    make install

You are done with it!

TCL Commands:

Please read this post before getting started with Re-ARED simulation in NS-2 "Random Early Detection (RED) in NS-2 - TCL - Part 1"

To simulate Re-ARED, you need to ensure that following two lines are added in the TCL Script:

Queue/RED set adaptive_ 1
Queue/RED set refined_adaptive_ 1 

Rest all commands remain same as explained in "Random Early Detection (RED) in NS-2 - TCL - Part 1".

Hope it helps.

Regards,
Mohit P. Tahiliani

Related Blogs:

Comments (15)

hello
how are you?
I want simulate partially overlapping channel in ns2
I can't
can you help to me
tanks alot of your website

@Hamid - The changes required in ns-2 for partially overlapping channels are contributed in "Miracle" framework. Following link may be useful:

http://www.hindawi.com/journals/wcn/2010/761792/

Hope it helps.

Regards,
Mohit P. Tahiliani

helo
pls how can i enable Adaptive REd in ns2?

@Osama - Use the following command in the TCL Script:

Queue/RED set adaptive_ 1

Hope it helps.

Regards,
Mohit P. Tahiliani

Helloo.
This is regarding the previous post on implementing RED in wireless scenarios. YOu have asked to put the set val(ifq) Queue/RED and insert these parameters in the TCL script.
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

But my question is where exactly should I insert these lines in the TCL script? I just inserted these lines as you asked and made that parameter to be true. But the problem is that, when i run the simulation i can see the nodes moving and all, but i dont see any traffic between the nodes. Why is this? Can you please help me on this.
Thanks

@Kasun - You need to analyze the trace file to calculate the amount of traffic on a particular node. It may not be visible in NAM.

Hope it helps.

Regards,
Mohit P. Tahiliani

I want to patch this Re-ARED patch in NS2.35
Can you please provide me patch for ns2.35 istalled on ubantu 11.04

@Shubh - You may try applying this patch manually by copying every line in appropriate places.

There are very lines in this patch.

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello sir i want to compare REd, RARED and codel with some n/w parameters like b/w, throughput, PDR in wireless n/w sir please guide me.

@Anita - I recommend you to use standard tools such as the latest version of TCP Evaluation Suite, which can be found here:

http://caia.swin.edu.au/ngen/tcptestsuite/

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello Sir, I have a query that single .awk file can be used for all three(RED, RAREd and CoDel)

hello sir, when i run codel.tcl it show following :

ftps 1 webrate 0 cbrs 0 bw 3000000.0 filesize 10000000 reverse 0
accessdly 20 bneckdly 10 realrtt 100 bneckbw 3000000.0
invalid command name "Queue/CoDel"
while executing
"Queue/CoDel set target_ $target"
(file "codel.tcl" line 148)
Tell me how i fix it

Sir, please suggest me about this problem:
when i run codel.tcl it show following :

ftps 1 webrate 0 cbrs 0 bw 3000000.0 filesize 10000000 reverse 0
accessdly 20 bneckdly 10 realrtt 100 bneckbw 3000000.0
invalid command name "Queue/CoDel"
while executing
"Queue/CoDel set target_ $target"
(file "codel.tcl" line 148)

@Anita - Regarding your first question - Yes, single awk file will work for all.

Regarding the error - Probably you did not give

make install

after applying the CoDel patch.

Hope it helps.

Regards,
Mohit P. Tahiliani

Lucky Club: Slots, Table Games, Live Casino, and more!
Lucky Club is the online gambling hub that provides a range of casino games to your home and away. Bet on the latest luckyclub.live and greatest online slots,