Search This Blog

Showing posts with label DSDV. Show all posts
Showing posts with label DSDV. Show all posts

[ns-3] Cloning MANET Routing Protocols in ns-3

8

Labels: , , , , , , ,

This post provides a "python script" to clone AODV, DSDV, OLSR or DSR in ns-3. By cloning, we mean that an identical copy of an existing protocol is created in ns-3, but with a different name. 

Once the clone is created, you can modify it for your research work without affecting the original code of existing protocols in ns-3.

Warning: DSR cloning will work only for ns-3.25 and higher versions of ns-3!

Contributed by: Kriti Nagori and Meenakshy Balachandran, Wireless Information Networking Group (WiNG), NITK Surathkal.

Steps to create a clone:

1. Download the python script: clone-manet-routing.py

2. Place it in ns-allinone-3.xx/ns-3.xx/src directory

3. Go to ns-allinone-3.xx/ns-3.xx/src via terminal and give the following command:

chmod 777 clone-manet-routing.py

4. Give the following command to create a clone of AODV:

./clone-manet-routing.py aodv myaodv

5. Go to ns-allinone-3.xx/ns-3.xx/ via terminal and give the following commands:

./waf configure --enable-examples

./waf

You are done with it!

Note: Replace aodv by dsdv, olsr or dsr in Step 4 to clone DSDV, OLSR or DSR respectively.

Verifying the working of a clone:

1. Copy myaodv.cc from ns-allinone-3.xx/ns-3.xx/src/myaodv/examples

2. Paste it in ns-allinone-3.xx/ns-3.xx/scratch

3. Give the following command from ns-3.xx directory to run it:

./waf --run scratch/myaodv

If the command succeeds, you have successfully cloned AODV to MYAODV.

Hope it helps.

Regards,
Mohit P. Tahiliani

AWK Scripts for Normalized Routing Load/ Normalized Routing Overhead

49

Labels: , , , , ,

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 DSDV for Multiple Interface Support in NS-2

19

Labels: , , ,

The document named "Adding multiple interface support in NS-2" prepared by Ramon Aguero Calvo and Jesus Perez Campo, University of Cantabria helps to incorporate multiple channel support to the core of the ns-2 simulator.


There are few modifications required in the routing protocols such as DSDV, AODV and DSR to use multiple interface support in ns-2. Ramon Aguero Calvo and Jesus Perez Campo have modified the AODV protocol for which code is available in the document they have provided. A patch (that contains modifications in ns-2 to support multiple interfaces and modifications in AODV code) based on that document is available on this link "Revised: Adding Multiple Interface Support in NS-2" .

Based on the guidelines provided in Chapter 5 of the document we have successfully made modifications in DSDV routing protocol. The patch for the same is available on the link given below:

Download NS-2.33-DSDV-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-DSDV-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-DSDV-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 the patch can be found on the link given below:



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 in 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

Acknowledgements: I would like to Thank Chirag J. Raval and Vaidehi S. Panwala for extending their support in modifying the code of DSDV. They went in complete details of DSDV source code in NS-2 and have a major role in the implementation of this patch.

Very Important!!! Please Note: 
(1) The DSDV modifications are still under review and the patch has been verified with only few TCL scripts. Please report any bugs if encountered.
(2) This patch does not contain modifications to AODV routing protocol. However it includes Multiple Interface Support in NS-2 (i.e we have excluded the AODV Modifications from the code of Ramon Sir's document and included DSDV Modifications).
(3) A combined patch that includes Multiple Interface Support + AODV Modifications + DSDV Modifications will be uploaded soon with sample TCL Scripts. Thank you for co-operation. 

Adding Multiple Interface Support in NS-2

10

Labels: , , , ,

The document named "Adding multiple interface support in NS-2" prepared by Ramon Aguero Calvo and Jesus Perez Campo, University of Cantabria helps to incorporate multiple channel support to the core of the ns-2 simulator.

After following the instructions provided in the document I was able to implement multi-channel multi-interface support in ns-2.33.

Hence I have designed a patch depending on the above mentioned document that incorporates multi-channel multi-interface support in ns-2.33.

multichannel.patch

If you encounter any problem with above link please follow the link given below:

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

Sample tcl scripts for the same will be uploaded soon.

Hope it helps.

Regards,
Mohit P. Tahiliani

Related Blogs:

Revised: Adding Multiple Interface Support in NS-2

Modified DSDV for Multiple Interface Support in NS-2