Search This Blog

Loading...

CoDel's patch for ns-2.31 (to support TCP Evaluation Suite)

9

Reactions: 

Controlled Delay (CoDel) is a newly proposed AQM mechanism developed by Kathleen Nichols and Van Jacobson. CoDel is parameterless and controls the delay, while insensitive to round-trip delays, link rates, and traffic loads. CoDel's patch is originally designed for ns-2.35. The patch for ns-2.35, instructions for download and trying the sample TCL codes are available at the following link: http://www.pollere.net/CoDel.html

This patch is a slight modification of the original patch and is designed for ns-2.31, mainly to be used along with TCP Evaluation Suite, which is available for ns-2.31 only. However, you can also use it without the TCP Evaluation Suite. 

TCP Evaluation Suite is a standard tool used for the analysis of newly proposed TCP Variants, especially High-Speed TCP Variants. The simulation code of TCP Evaluation Suite is based on original Linux TCP Code. 

CoDel's ns-2.31 patch is designed mainly to assist the community to analyze the interaction of CoDel with existing TCP Variants while using TCP Evaluation Suite.

Contributed by: Dipesh Raghuvanshi

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

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

2. Download CoDel-ns-2.31.patch

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

4. Paste the downloaded patch in this folder.

5. Give the following command:

    patch -p1 > CoDel-ns-2.31.patch

6. Then give ./install

If you already have an installed copy of ns-allinone-2.31, then follow the steps given below to apply the CoDel patch:

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

2. Give the following command:

    patch -p1 > CoDel-ns-2.31.patch

3. Go in ns-allinone-2.31/ns-2.31 directory.

4. Give the following commands:

    ./configure

    make clean

    make

    make install

You are done with it!

To verify the working of this patch, an example TCL Script named "codel.tcl" will now be available in ns-allione-2.31/ns-2.31 directory.

Go in ns-allinone-2.31/ns-2.31 directory and run the file by giving: ns codel.tcl

If you encounter any problem in downloading the patch from the link given above, please follow this link:


Hope it helps.

Regards,
Mohit P. Tahiliani

Rate Control Protocol (RCP) Patch for ns-2.35

30

Labels: , ,

Reactions: 

Rate Control Protocol (RCP) is a congestion control mechanism which focuses on minimizing the flow-completion time. It is designed and developed by Nandita Dukkipati, a Ph.D Student then, at Stanford University. Following is a link to the official page of RCP:

http://yuba.stanford.edu/rcp/

RCP's patch for ns-2 is available on the above link for ns-2.28 and ns-2.30 versions. Since installation procedure of these ns-2 versions on present Linux flavors hinders several researchers, I developed a RCP patch for ns-2.35 which is the latest version.

Follow the steps given below to apply RCP's patch to ns-2.35:

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

2. Download rcp-ns2-35.patch

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

4. Paste the downloaded RCP patch in the above mentioned folder.

5. Give the following command:

patch -p1 < rcp-ns2-35.patch

6. Go in ns-allinone-2.35 via terminal and give the following command (It is always recommended to be in root mode while giving the below command):

./install

If you already have an installed copy of ns-allinone-2.35, then follow the steps given below to apply the RCP patch:

1. Paste the downloaded RCP patch in ns-allinone-2.35 directory.

2. Give the following command:

patch -p1 < rcp-ns2-35.patch

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

./configure
make clean
make
make install

You are done with it!

Sample TCL Scripts:
Use the sample TCL Scripts provided on the official website of RCP. Following is the link:

http://yuba.stanford.edu/rcp/#implementation

rcp-ns-2.30.tar.gz must be downloaded from the above link. It contains a folder named "example-tcl-files" which contains the sample TCL Scripts.

A Note on the installation of ns-allinone-2.35:
You may or may not get installation errors depending on which version of gcc is used in your OS. With Ubuntu 10.04 (gcc 4.4.3), the installation procedure did not give any error. However, with later versions of Ubuntu there are chances that you may get a few errors. If you do not find a solution for those errors, report it in the Comments section.

Hope it helps.

Regards,
Mohit P. Tahiliani

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

7

Labels: , ,

Reactions: 

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:

Nonlinear RED (NLRED) patch for NS-2

2

Labels: , ,

Reactions: 

Random Early Detection (RED) proposed by S. Floyd and V. Jacobson in 1993 is one of the widely deployed Active Queue Management (AQM) mechanisms. However, due to its parameter sensitivity, lot of variants of RED have been proposed. Nonlinear RED (NLRED) is one such variant of RED. 

Reference: "Nonlinear RED: A simple yet efficient active queue management scheme", Kaiyu Zhou, Kwan L. Yeung, Victor O. K. Li, Elsevier Journal of Computer Networks, 50, pp. 3784-3794 (2006). 

The packet drop probability in RED is a linear function of the "average queue size". NLRED modifies the packet drop probability to be a quadratic function (and hence nonlinear function) of the "average queue size" so as to minimize the overall packet drop rate in the network. NLRED is not implemented in the allinone package of NS-2. The following patch provides the implementation of NLRED in NS-2.

Download NLRED patch for 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 NLRED.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 < NLRED.patch

6. Then give ./install

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

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

2. Give the following command: 

    patch -p1 < NLRED.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 NLRED simulation in NS-2 "Random Early Detection (RED) in NS-2 - TCL - Part 1"

To simulate NLRED, you just need to include the following command in TCL Script:

Queue/RED set nonlinear_ 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:
1. Random Early Detection (RED) in NS-2 - TCL - Part 1
2. Refined Adaptive RED (Re-ARED or RARED) patch for NS-2

Random Early Detection (RED) in NS-2 - TCL - Part 1

21

Labels: ,

Reactions: 


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.

Related Blogs:
1. Nonlinear RED (NLRED) patch for NS-2
2. Refined Adaptive RED (Re-ARED or RARED) patch for NS-2
3. TCL Script Generator
4. TCL Script Generator centered on NSG

AWK Scripts for Normalized Routing Load/Overhead

35

Labels: , , , , ,

Reactions: 

Normalized Routing Load (or Normalized Routing Overhead) is defined as the total number of routing packet transmitted per data packet.

It is calculated by dividing the total number of routing packets sent (includes forwarded routing packets as well) by the total number of data packets received.

AWK Script to calculate Normalized Routing Load for Old trace format can be downloaded from the link given below:

AWK Script for Normalized Routing Load - Old Trace Format:

nrl_ot.awk

AWK Script to calculate Normalized Routing Load for New trace format can be downloaded from the link given below:

AWK Script for Normalized Routing Load - New Trace Format:

nrl_nt.awk

If there are any problems encountered in downloading above files, please visit the link given below:

http://www.mediafire.com/?z1c2cxdt1a31d

These scripts work for AODV, DSDV, DSR and OLSR. To use these scripts for other routing protocols, just add the name of that routing protocol in appropriate loop within this script.

Note: Please report any bugs if encountered.

Hope it helps.

Regards,
Mohit P. Tahiliani

Related Blogs: 
4. AWK Scripts for NS2 

Modified AOMDV with Multiple Interface Support in NS-2

68

Labels: , , ,

Reactions: 

This patch is designed for ns-allinone-2.33.

Contributed by: Chirag Raval

Download NS-2.33-AOMDV-Multiple-Interface.patch

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



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

4. Paste the downloaded patch in this folder.

5. Give the following command:

    patch -p1 < NS-2.33-AOMDV-Multiple-Interface.patch

6. Then give ./install

If you have already installed copy of ns-allinone-2.33 then follow the below given steps to apply multi-interface patch.

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

2. Give the following command:

    patch -p1 < NS-2.33-AOMDV-Multiple-Interface.patch

3. Go in ns-allinone-2.33/ns-2.33 directory.

4. Give the following commands:

    ./configure

    make clean

    make

    make install

You are done with it!

Example TCL scripts to verify the working of this patch are similar to that of TCL Scripts provided for Multi Interface DSDV patch. You need to replace DSDV by AOMDV in TCL Scripts. Scripts can be downloaded from the following link:


Kindly Note: The tcl scripts having "mesh" word in their name are the scripts designed with multiple interfaces. Others are designed with single interfaces. To verify the working of multiple interfaces, two awk scripts are also provided in the folder.

A tcl script named im3pmanual.tcl is a tcl script wherein nodes have different number of interfaces assigned to them whereas, other tcl scripts designed with multiple interface are designed such that all the nodes in the network have equal number of interfaces.

If you encounter any problem in downloading the patch from the link given above, please follow this link:


If you encounter any problem in downloading example tcl scripts, please follow this link:


Hope it helps.

Regards,
Mohit P. Tahiliani

Guest Book...!!!