Search This Blog

Showing posts with label MANET. Show all posts
Showing posts with label MANET. 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