tag:blogger.com,1999:blog-26768099529891083562024-03-19T09:47:44.828+05:30Mohit P. TahilianiMohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.comBlogger38125tag:blogger.com,1999:blog-2676809952989108356.post-4927715640972087472015-11-07T08:48:00.000+05:302016-07-22T09:56:10.710+05:30[ns-3] Cloning MANET Routing Protocols in ns-3<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
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. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Once the clone is created, you can modify it for your research work without affecting the original code of existing protocols in ns-3.</div>
<br />
<div style="text-align: justify;">
<b><span style="color: #990000;">Warning:</span></b> DSR cloning will work only for ns-3.25 and higher versions of ns-3!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="color: #990000;"><b>Contributed by:</b></span> Kriti Nagori and Meenakshy Balachandran, Wireless Information Networking Group (WiNG), NITK Surathkal.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Steps to create a clone:</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
1. Download the python script: <a href="http://www.mediafire.com/download/9igi0q1kw4ednkz/clone-manet-routing.py" target="_blank">clone-manet-routing.py</a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
2. Place it in ns-allinone-3.xx/ns-3.xx/src directory</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
3. Go to ns-allinone-3.xx/ns-3.xx/src via terminal and give the following command:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="color: #990000;">chmod 777 clone-manet-routing.py</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
4. Give the following command to create a clone of AODV:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="color: #990000;"><b>./clone-manet-routing.py aodv myaodv</b></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
5. Go to ns-allinone-3.xx/ns-3.xx/ via terminal and give the following commands:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="color: #990000;">./waf configure --enable-examples</span></b></div>
<div style="text-align: justify;">
<b><span style="color: #990000;"><br /></span></b></div>
<div style="text-align: justify;">
<b><span style="color: #990000;">./waf</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
You are done with it!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="color: #990000;">Note: </span></b>Replace aodv by dsdv, olsr or dsr in Step 4 to clone DSDV, OLSR or DSR respectively.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Verifying the working of a clone:</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
1. Copy myaodv.cc from ns-allinone-3.xx/ns-3.xx/src/myaodv/examples</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
2. Paste it in ns-allinone-3.xx/ns-3.xx/scratch</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
3. Give the following command from ns-3.xx directory to run it:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="color: #990000;"><b>./waf --run scratch/myaodv</b></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
If the command succeeds, you have successfully cloned AODV to MYAODV.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Hope it helps.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Regards,</div>
<div style="text-align: justify;">
Mohit P. Tahiliani</div>
</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com8tag:blogger.com,1999:blog-2676809952989108356.post-80561882941744350972015-10-21T09:31:00.001+05:302017-09-11T11:44:05.924+05:30[ns-3] Installing ndnSIM on Ubuntu: One Step Procedure<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
ndnSIM is "ns-3 based Named Data Networking Simulator" [1]. This post provides a "shell script" that automates the installation of ndnSIM on Ubuntu. It has been tested on Ubuntu 14.04, 15.04, 16.04 and 17.04.</div>
<br />
<div style="text-align: justify;">
<b><span style="color: #990000;">Note 1:</span></b> This post is updated when a new version of ndnSIM or a new version of Ubuntu is released.<br />
<b><span style="color: #990000;">Note 2:</span></b> You must be connected to Internet while executing the shell script.<br />
<br />
<b><span style="color: #990000;">Contributed by:</span></b> Kiran Ramesh, Karthik S and Ayush Agarwal, Wireless Information Networking Group (WiNG), NITK Surathkal.<br />
<br />
<b><span style="color: #990000;">Updated by:</span></b> Viyom Mittal and Vivek Jain, WiNG, NITK Surathkal. <br />
<br />
<b>Steps to install ndnSIM:</b><br />
<br />
1. Download the shell script: <a href="https://www.mediafire.com/file/iwawa6fo7u6e4lo/ndnSIM-install.sh" target="_blank">ndnSIM-install.sh</a> and place it on Desktop<br />
<br />
2. Go to Desktop via terminal and give the following command:<br />
<br />
<b><span style="color: #990000;">sh ndnSIM-install.sh</span></b><br />
<br />
3. Give your system password, when asked.<br />
<br />
You are done with it!<br />
<br />
<b>Verifying the installation of ndnSIM:</b><br />
<br />
1. Go ~/Desktop/ndnSIM/ns-3 and give the following command:<br />
<br />
./waf --run=ndn-simple<br />
<br />
If you see " 'build' finished successfully " message, ndnSIM is installed correctly.<br />
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. Tahiliani<br />
<br />
<b>References:</b><br />
<br />
[1] ndnSIM Documentation: http://ndnsim.net/2.3/getting-started.html<br />
<br /></div>
</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com7tag:blogger.com,1999:blog-2676809952989108356.post-66283858629653070242015-10-10T12:13:00.000+05:302018-02-01T09:53:21.599+05:30[ns-3] Installing ns-3 on Ubuntu 15.04: Simplified<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
This post describes a simplified approach to install ns-3 and related tools such as NetAnim, PyViz, Wireshark, Gnuplot and TraceMetrics in Ubuntu 15.04. </div>
<br />
<div style="text-align: justify;">
<b><span style="color: #990000;">Note:</span></b> This post is updated when a new version of ns-3 or a new version of Ubuntu is released.</div>
<br />
<b>First, update the package list by executing this command:</b> <span style="color: #990000;">sudo apt-get update</span><br />
<br />
<b>Install following packages (command is given below):</b><br />
<br />
For ns-3:<br />
1. gcc<br />
2. g++<br />
3. python<br />
4. python-dev<br />
<br />
For NetAnim:<br />
1. qt4-dev-tools<br />
<br />
For PyViz:<br />
1. libgtk-3-dev<br />
2. python-pygoocanvas<br />
3. python-pygraphviz<br />
<br />
For Wireshark and Gnuplot:<br />
1. wireshark<br />
2. gnuplot<br />
<br />
For TraceMetrics:<br />
1. openjdk-7-jdk (install openjdk-8-jdk if you're using Ubuntu 16.04 or higher)<br />
<br />
<b>Command to install all these packages together:</b><br />
<br />
<div style="text-align: justify;">
<span style="color: #990000;">sudo apt-get install gcc g++ python python-dev qt4-dev-tools libgtk-3-dev python-pygoocanvas python-pygraphviz wireshark gnuplot openjdk-7-jdk</span></div>
<br />
<div style="text-align: justify;">
Wireshark and Gnuplot will be ready to use after this command! TraceMetrics does not require installation. <a href="http://mohittahiliani.blogspot.in/2014/08/ns-3-tracemetrics-trace-file-analyzer.html" target="_blank">Read more about TraceMetrics</a></div>
<br />
<b>Steps to install ns-3:</b><br />
<br />
1. Download <a href="https://www.nsnam.org/release/ns-allinone-3.27.tar.bz2" target="_blank">ns-allinone-3.27.tar.bz2</a> and unzip it.<br />
<br />
2. Go to ns-allinone-3.27 and give the following command:<br />
<br />
<span style="color: #990000;"><b>./build.py --enable-examples --enable-tests</b></span><br />
<br />
This command will install ns-3, NetAnim and PyViz.<br />
<br />
<div style="text-align: justify;">
3. Once the installation completes, go to ns-allinone-3.27/ns-3.27 and give the following command:</div>
<br />
<span style="color: #990000;"><b>./test.py -c core</b></span><br />
<br />
You are done with it!<br />
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. Tahiliani</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com8tag:blogger.com,1999:blog-2676809952989108356.post-55974821223539200592014-12-11T16:27:00.002+05:302016-04-07T14:19:48.736+05:30[ns-3] Blackhole Attack Simulation in ns-3<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
The patch provided in this post enables a ns-3 user to simulate "Blackhole Attack in ns-3" for Mobile Ad hoc Network (MANET) Simulations. Blackhole attack has been implemented using Ad hoc On demand Distance Vector (AODV) routing protocol.<br />
<br />
This patch is available for:<br />
1. ns-allinone-3.25 - <a href="http://www.mediafire.com/download/m677727rz819qez/Blackhole-ns-3.25.patch" target="_blank">Blackhole-ns-3.25.patch</a><br />
2. ns-allinone-3.24.1 - <a href="http://www.mediafire.com/download/i41o3c8i2po44sd/Blackhole-ns-3.24.1.patch" target="_blank">Blackhole-ns-3.24.1.patch</a><br />
2. ns-allinone-3.24 - <a href="http://www.mediafire.com/download/szha7t9hursvndq/Blackhole-ns-3.24.patch" target="_blank">Blackhole-ns-3.24.patch</a><br />
3. ns-allinone-3.23 - <a href="http://www.mediafire.com/download/jqnh6i6bqd6oyg5/Blackhole-ns-3.23.patch" target="_blank">Blackhole-ns-3.23.patch</a><br />
4. ns-allinone-3.22 - <a href="http://www.mediafire.com/download/wwzfuywkr4cclb0/Blackhole-ns-3.22.patch" target="_blank">Blackhole-ns-3.22.patch</a><br />
5. ns-allinone-3.21 - <a href="http://www.mediafire.com/download/drxi55p31165h30/Blackhole-ns-3.21.patch" target="_blank">Blackhole-ns-3.21.patch</a><br />
6. ns-allinone-3.20 - <a href="http://www.mediafire.com/download/ebh8r13q3zcs12j/Blackhole-ns-3.20.patch" target="_blank">Blackhole-ns-3.20.patch</a><br />
<br />
<b>Patch for ns-3.20 Contributed by:</b> Shalini Satre, Wireless Information Networking Group (WiNG), NITK Surathkal.</div>
<br />
<b>Material provided with this post:</b><br />
<div style="text-align: justify;">
1. A patch to simulate Blackhole attack in ns-3 and steps to apply that patch.</div>
<div style="text-align: justify;">
2. Sample C++ Program to ensure that the patch is applied correctly!</div>
<br />
Follow the steps given below to apply Blackhole patch to ns-3.25:<br />
<br />
<span style="text-align: justify;"><b>Note: </b></span><span style="text-align: justify;">(i) Steps remain same for applying the patch to other versions of ns-3, except that you should use ns-3.xx instead of ns-3.25 wherever applicable. </span><span style="text-align: justify;">(ii) This blog post is updated whenever a new version of ns-3 is released.</span><br />
<span style="text-align: justify;"><br /></span>
<span style="color: #990000; text-align: justify;"><b>If ns-3 is "not installed" in your machine:</b></span><br />
<br />
1. Download <a href="https://www.nsnam.org/release/ns-allinone-3.25.tar.bz2" target="_blank">ns-allinone-3.25.tar.bz2</a><br />
<br />
2. Download Blackhole-ns-3.25.patch<br />
<br />
3. Unzip ns-allinone-3.25.tar.bz2. You will get a folder named ns-allinone-3.25<br />
<br />
4. Paste the downloaded Blackhole-ns3 patch in the above mentioned folder.<br />
<br />
5. Give the following command:<br />
<br />
<b>patch -p1 < Blackhole-ns-3.25.patch</b><br />
<br />
<div style="text-align: justify;">
6. Go in ns-allinone-3.25 via terminal and give the following command to install ns-3.25</div>
<br />
<b>./build.py --enable-examples --enable-tests</b><br />
<b><br /></b>
You are done with it!<br />
<div style="text-align: justify;">
<br />
<b><span style="color: #990000;">If ns-3 is "already installed" on your machine:</span></b></div>
<br />
1. Paste the downloaded Blackhole-ns-3.25 patch in ns-allinone-3.25 directory.<br />
<br />
2. Give the following command:<br />
<br />
<b>patch -p1 < Blackhole-ns-3.25.patch</b><br />
<br />
3. Go in ns-allinone-3.25/ns-3.25 directory and give the following commands:<br />
<br />
<b>./waf</b><br />
<br />
You are done with it!<br />
<br />
<b><span style="color: #990000;">Sample C++ Program to verify the working of Blackhole Patch:</span></b><br />
<br />
Download the zipped folder from the link given below and extract the files from it:<br />
<br />
<a href="http://www.mediafire.com/download/cvumsh2rw64ag6z/sample-program-blackhole-ns3.zip" target="_blank">sample-program-blackhole-ns3.zip</a><br />
<u><br /></u>Put both the extracted files in the following folder:<br />
<br />
ns-allinone-3.25/ns-3.25/scratch<br />
<br />
<b>How to use these files for verification?</b><br />
<br />
I. Go to ns-allinone-3.25/ns-3.25 via terminal and give the following command:<br />
<br />
<b>./waf --run scratch/blackhole</b><br />
<br />
<div style="text-align: justify;">
You will get an output as shown below:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgprEh8e9uYTQcAe-l7B6yjsnaKj-VXtA0Tahbw4NN76cMJPdTkx8Cbw_nf613aPHF1Eg1cIqAhtaOlE4_EBnNe-bFSfRxgPg3ulBdUlLGH7V9S8srASwa25TW9AQz24q3qf8dYlwDBIyzj/s1600/Blackhole-ns3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgprEh8e9uYTQcAe-l7B6yjsnaKj-VXtA0Tahbw4NN76cMJPdTkx8Cbw_nf613aPHF1Eg1cIqAhtaOlE4_EBnNe-bFSfRxgPg3ulBdUlLGH7V9S8srASwa25TW9AQz24q3qf8dYlwDBIyzj/s1600/Blackhole-ns3.png" width="400" /></a></div>
[Click on the Image to enlarge]</div>
<b><br /></b><b>Acknowledgements: </b><br />
<br />
<div style="text-align: justify;">
1. Thanks to Shalini Satre<b> </b>for developing this patch and providing a sample C++ Program to verify its working.<br />
<br />
2. Thanks to ns-3 mailing list on Google Groups for their wonderful support and encouragement!</div>
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. Tahiliani</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com52tag:blogger.com,1999:blog-2676809952989108356.post-61553010003843297642014-10-29T10:48:00.003+05:302014-11-08T15:24:29.422+05:30Automated Post Processing (APP) Tool for ns-2 trace files<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Automated Post Processing (APP) Tool has been designed and developed by Wireless Information Networking Group (WiNG) at NITK, Surathkal with an aim to help the ns-2 users in processing the trace files and plotting graphs. </div>
<br />
<div style="text-align: justify;">
Although several such tools already exist, APP has been designed with a few unique features that are distinct from other tools:</div>
<br />
<div style="text-align: justify;">
1. APP Tool does not require installation! Just download the APP folder and run the tool.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
2. APP Tool helps you to obtain values / graphs for at least 20 parameters!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
3. APP Tool uses AWK Scripts in the back end!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
4. APP Tool's source code is free and flexible! i.e., you can also add your own AWK Script in APP Tool and use it for plotting a graph.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
5. Front end of APP Tool is designed in Python! You can customize it as per your requirements.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div style="text-align: left;">
6. You need only two packages installed on your machine to run APP Tool: python-gi and python-matplotlib<span style="color: #333333; font-family: Consolas, Liberation Mono, Menlo, Courier, monospace;"><span style="font-size: 14px;">.</span></span></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
A total of 20 AWK Scripts are provided in the APP Tool, one for each of the parameter shown in the image below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZjdR54QImm0dhzKDZCDlKaWMtpC6fnfZ7SxrQ7U4PBxzTAP4Jhyphenhyphen2bEk9SUoLHCImr-nxqU7lrQbTleVCB4ovVUxmqcvC4G_I13gVA0M2-I9wi8X8luyKdElwX4t3MA5BnPmU-lxAZ9ffj/s1600/APP_Tool.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZjdR54QImm0dhzKDZCDlKaWMtpC6fnfZ7SxrQ7U4PBxzTAP4Jhyphenhyphen2bEk9SUoLHCImr-nxqU7lrQbTleVCB4ovVUxmqcvC4G_I13gVA0M2-I9wi8X8luyKdElwX4t3MA5BnPmU-lxAZ9ffj/s1600/APP_Tool.png" height="273" width="400" /></a></div>
<div style="text-align: center;">
[Click to enlarge the image]</div>
<div style="text-align: center;">
<br /></div>
</div>
<div style="text-align: justify;">
<b>Note:</b> You may have to modify some of the AWK Scripts to meet your requirements. As mentioned before, you can also add your own AWK Script to APP with ease, in case you want to analyze a different parameter. Moreover, not every parameter among the 20 mentioned above need graphs. Hence, APP plots graphs only for the parameter for which graphs are required. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<b><span style="font-size: large;"><a href="https://github.com/WiNG-NITK/APP-Tool" target="_blank">Download APP Tool</a></span></b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Instructions on "How to run APP Tool" have been provided in the Readme file available on the download link given above.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
APP Tool has been dual licensed under the MIT or GPL v3 Licenses. Contributors to this project: Sayan Paul, Jay Priyadarshi, Sasank Channapradaga, Spriha Awinpushpam and Mohit P. Tahiliani</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Kindly Note: </b>Please report to us in case you find any errors while working with the APP Tool. You can write to us at wing@nitk.ac.in or place a comment in this post itself.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Hope it helps.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Regards,</div>
<div style="text-align: justify;">
Mohit P. Tahiliani</div>
</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com13tag:blogger.com,1999:blog-2676809952989108356.post-71386916254481508872014-08-26T13:07:00.000+05:302014-08-26T13:19:36.088+05:30[ns-3] TraceMetrics: A trace file analyzer for ns-3<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
TraceMetrics, developed in Java, is an open source trace file analyzer for analyzing the trace files (.tr) of <i>ns-</i>3 [1]. <b>TraceMetrics does not require installation! </b>You just need to have Java installed on your machine to use it.</div>
<br />
<b><span style="color: #990000;">Prerequisites for working with TraceMetrics:</span></b> JDK 7 must be installed on your machine.<br />
<br />
Command to install JDK 7 on Ubuntu OS is:<br />
<br />
<b>sudo apt-get install openjdk-7-jdk</b><br />
<br />
<div style="text-align: justify;">
Before we proceed to work with TraceMetrics, it is important that we have a <i>ns-</i>3 trace file which we can analyze with TraceMetrics. To get the <i>ns-</i>3 trace file, follow any one of the three options given below:</div>
<br />
<b><span style="color: #990000;">Option 1:</span></b> If you have already installed <i>ns-</i>3, follow the steps given below:<br />
<br />
1. Copy the file named<br />
<br />
<b>tcp-bulk-send.cc </b><br />
<br />
from this directory: ns-allinone-3.xx/ns-3.xx/examples/tcp<br />
<br />
and paste it into the following directory: ns-allinone-3.xx/ns-3.xx/scratch<br />
<br />
2. Go to ns-allinone-3.xx/ns-3.xx via terminal and give the following command to run tcp-bulk-send.cc<br />
<br />
<b>./waf --run "scratch/tcp-bulk-send --tracing=true"</b><br />
<br />
<div style="text-align: justify;">
3. If the above mentioned command is successful, search for a file named <b>"tcp-bulk-send.tr"</b> in your ns-allinone-3.xx/ns-3.xx directory.</div>
<br />
<div style="text-align: justify;">
If you find "tcp-bulk-send.tr", then your trace file is ready for analysis. "tcp-bulk-send.tr" is the trace file which will be analyzed by TraceMetrics.</div>
<br />
You may Skip Option 2 and Option 3 and directly read "How to use TraceMetrics" Section!<br />
<br />
<b><span style="color: #990000;">Option 2: </span></b>If you have not yet installed ns-3, follow the steps given below:<br />
<br />
1. Install ns-3. I have written a separate post for installation of ns-3. Here is the link:<br />
<br />
<div style="text-align: center;">
<a href="http://mohittahiliani.blogspot.in/2014/08/ns-3-installing-and-testing-ns-3-on.html" target="_blank">[ns-3] Installing and Testing ns-3 with NetAnim on Ubuntu 14.04</a></div>
<br />
2. After successfully installing ns-3, follow the steps given in "Option 1" of this post.<br />
<br />
<div style="text-align: justify;">
<b><span style="color: #990000;">Option 3:</span></b> If you just want to see how TraceMetrics works and would like to generate your trace files at a later point, just download the "tcp-bulk-send.tr" from the link given below:</div>
<br />
Download <a href="http://www.mediafire.com/view/mb0fsbqocbg6xdx/tcp-bulk-send.tr" target="_blank">tcp-bulk-send.tr</a><br />
<br />
<b><span style="color: #990000;">How to use TraceMetrics</span></b><br />
<br />
Follow the steps given below to start analyzing "tcp-bulk-send.tr" by using TraceMetrics:<br />
<br />
1. Download TraceMetrics from the following link:<br />
<br />
<div style="text-align: center;">
<a href="http://sourceforge.net/projects/tracemetrics/" target="_blank">http://sourceforge.net/projects/tracemetrics/</a></div>
<br />
2. Unzip the downloaded file i.e., tracemetrics-1.3.0.zip.<br />
<br />
<div style="text-align: justify;">
3. Go in the extracted folder i.e., tracemetrics and open the file named "tracemetrics.jar". You should see tracemetrics loading like shown in the Image below:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVJ2RKrhaQCAaJow6l3NF3s5bVy64rouQBJxOUIwfa2nJmOR0-SHWSTAf4TC5wxJ9asyFrAw3EruXLbKz4PraaSiV_NsQN0neS5Ny_D9Ir-olypFuk54xR46iDE4VFI_7vZIvgDIjSsORF/s1600/tracemetrics.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVJ2RKrhaQCAaJow6l3NF3s5bVy64rouQBJxOUIwfa2nJmOR0-SHWSTAf4TC5wxJ9asyFrAw3EruXLbKz4PraaSiV_NsQN0neS5Ny_D9Ir-olypFuk54xR46iDE4VFI_7vZIvgDIjSsORF/s1600/tracemetrics.png" height="246" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
[Click on the Image to enlarge]</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
and then the following window should open:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2WDaId76rbpZ6IeTAYgR7UAK_UPgOglcFQEr_O-cZoDkk6jCO__swCErRpMje4zrrUqKvKWsIftlwpQaJQl-b3Cqyfa_rICBvkcQLNdGAkNiIbXAtj-xMasPAa86q-SMwy-yyADJtXUmh/s1600/tracemetrics_front.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2WDaId76rbpZ6IeTAYgR7UAK_UPgOglcFQEr_O-cZoDkk6jCO__swCErRpMje4zrrUqKvKWsIftlwpQaJQl-b3Cqyfa_rICBvkcQLNdGAkNiIbXAtj-xMasPAa86q-SMwy-yyADJtXUmh/s1600/tracemetrics_front.png" height="231" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
[Click on the Image to enlarge]</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
4. Select File -> Choose File and then navigate to the folder where you stored "tcp-bulk-send.tr". Select "tcp-bulk-send.tr"</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
5. The next window that appears will look like the Image shown below:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUKaKmDi7qFmwLE5U5et2tu8Mfna6Ypm1fy_qmXMmYchl6d27oH_E6LMvXyaL28lDHsBhTqHLdohDWx73dCRt0wvT_wm5rxOT_qkxxmaiPTgOrXtydvAhkInaXGa6foJTXNIwhi2g6OZ76/s1600/tracemetrics_execute.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUKaKmDi7qFmwLE5U5et2tu8Mfna6Ypm1fy_qmXMmYchl6d27oH_E6LMvXyaL28lDHsBhTqHLdohDWx73dCRt0wvT_wm5rxOT_qkxxmaiPTgOrXtydvAhkInaXGa6foJTXNIwhi2g6OZ76/s1600/tracemetrics_execute.png" height="230" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
[Click on the Image to enlarge]</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both;">
6. Click on "Execute analysis" button on the bottom right corner.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
You are done with it!</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="color: #990000;">NOTE: </span></b>A wonderful tutorial on how to analyze the parameters is provided by the developers of TraceMetrics. You can download it from the following link:</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Download <a href="http://sourceforge.net/projects/tracemetrics/files/Tutorials/Tutorial%20-%20TM%20-%20version%201.2b.pdf/download" target="_blank">TraceMetrics Tutorial</a></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>References:</b></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
[1] TraceMetrics Official Webpage: <a href="http://www.tracemetrics.net/" target="_blank">http://www.tracemetrics.net/</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Hope it helps.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Best Regards,</div>
<div class="separator" style="clear: both; text-align: left;">
Mohit P. Tahiliani</div>
<br /></div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com4tag:blogger.com,1999:blog-2676809952989108356.post-13168678789095168432014-08-21T15:30:00.001+05:302014-08-23T21:40:38.476+05:30[ns-3] Installing and Testing ns-3 with NetAnim on Ubuntu 14.04<div dir="ltr" style="text-align: left;" trbidi="on">
This post describes a step-by-step procedure to download, install and test <i>ns-</i>3 with NetAnim on Ubuntu 14.04 LTS.<br />
<br />
<i>ns-</i>3 version considered: <b>ns-allinone-3.20</b><br />
<br />
<b><span style="color: #990000;">List of Prerequisite Packages to be installed:</span></b><br />
1. gcc<br />
2. g++<br />
3. python<br />
4. python-dev (Optional: If you want to use Python as the main language for network configuration)<br />
5. mercurial (Optional: If you choose Method 2 (explained below) for downloading and installing <i>ns-</i>3)<br />
6. qt4-dev-tools (Optional: If you want to install *NetAnim* (animator for <i>ns-</i>3) along with <i>ns-</i>3)<br />
7. tcpdump (Optional: Required for analyzing packet capture files (.pcap) generated by <i>ns-</i>3)<br />
8. wireshark (Optional: Alternative to tcpdump. You can use anyone of these)<br />
9. gnuplot (Optional: Required for plotting high quality graphs through *.dat* files generated by <i>ns-</i>3)<br />
<br />
<b><span style="color: #990000;">Installing Prerequisite Packages:</span></b><br />
Give the following command to install the above mentioned packages:<br />
<br />
<b>sudo apt-get install gcc g++ python python-dev mercurial qt4-dev-tools tcpdump wireshark gnuplot</b><br />
<br />
You may remove the optional package's name from the above command if it is not required!<br />
<br />
<b><span style="color: #990000;">Downloading <i>ns-</i>3:</span></b><br />
<i>ns-</i>3 can be downloaded in at least two different ways [1]:<br />
<br />
<b>Method 1 (Recommended for beginners):</b> Downloading a <i>ns-</i>3 tarball i.e., a zipped folder (We follow this method here)<br />
<br />
Go to following link to download ns-allinone-3.20 tarball:<br />
<br />
<a href="https://www.nsnam.org/release/ns-allinone-3.20.tar.bz2" target="_blank">https://www.nsnam.org/release/ns-allinone-3.20.tar.bz2</a><br />
<br />
For older versions of <i>ns-</i>3, you can download the tarball from the following link:<br />
<br />
<a href="http://www.nsnam.org/releases/older/" target="_blank">http://www.nsnam.org/releases/older/</a><br />
<br />
<b>Method 2: </b>Downloading through *bake*<br />
<br />
You need to have packages 4 and 5 from the list shown above to download <i>ns-</i>3 using bake. Once the prerequisite packages are installed, follow the instructions given on [1] to download <i>ns-</i>3:<br />
<br />
<b><span style="color: #990000;">Installing <i>ns-</i>3 and NetAnim:</span></b><br />
<i>ns-</i>3 can be installed in three different ways [2]:<br />
<br />
Method 1: by using build.py (We follow this method in this post) <br />
Method 2: by using bake <br />
Method 3: by using Waf <br />
<br />
For Method 2 and Method 3 of installation, follow [2].<br />
<br />
<div style="text-align: justify;">
After you have followed Method 1 for downloading ns-allinone-3.20 tarball, you may keep your downloaded tarball on the Desktop and then follow the steps given below to install it:</div>
<br />
<div style="text-align: justify;">
<b>NOTE:</b> NetAnim (the animator for <i>ns-</i>3) package comes bundled in ns-allinone-3.xx tarball. So if you want to install *NetAnim* along with ns-allinone-3.20, then install <b>qt4-dev-tools</b> package<b> </b>before you proceed to the next steps because when you try to install ns-allinone-3.xx package, it first tries to install NetAnim. It searches for qt4-dev-tools package and if it is not found - NetAnim installation will be skipped! Alternatively, you can also choose to install NetAnim later via apt-get </div>
<br />
Step 1: Go to Desktop via terminal and unzip the ns-allinone-3.20.tar.bz2 tarball<br />
<br />
<b>cd Desktop</b><br />
<br />
<b>tar xjf ns-allinone-3.20.tar.bz2</b><br />
<br />
Step 2: Go in ns-allinone-3.20 folder and give the following command for installation:<br />
<br />
<b>./build.py --enable-examples --enable-tests</b><br />
<br />
After a while, you may see the following message<br />
<br />
<b>Leaving directory './ns-3.20'</b><br />
<br />
which indicates that <i>ns-</i>3 is installed !!!<br />
<br />
<b><span style="color: #990000;">Testing <i>ns-</i>3:</span></b><br />
To test whether all modules of <i>ns-</i>3 are installed successfully, follow the procedure as given below:<br />
<br />
Step 1: Go to ns-allinone-3.20/ns-3.20 folder and give the following directory:<br />
<br />
<b>./test.py -c core</b><br />
<br />
Some tests may be skipped while testing but that should not bother you if your module is not among those that were skipped!<br />
<br />
<b><span style="color: #990000;">Testing NetAnim (only for those users who installed qt4-dev-tools package before <i>ns-</i>3 installation):</span></b><br />
To test whether NetAnim is installed successfully, follow the procedure given below:<br />
<br />
Step 1: Go to ns-allinone-3.20/netanim-3.105 and give the following command:<br />
<br />
<b>./NetAnim</b><br />
<br />
A window as shown below should open:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLHcBclSUg3IJJcvpvEZ3HueVVa0JOQm9a4muhEOjR3F_zZfR2GX-L_JQOvl1-exyCWS9tJzWa6gjcVR7e1Cc1NJHuH4bUWsrpLhLxyk23sOLpogQqU22DeO8TKy0qYTl8RP1QwxCF9Jrq/s1600/Screenshot+from+2014-08-21+14:26:06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLHcBclSUg3IJJcvpvEZ3HueVVa0JOQm9a4muhEOjR3F_zZfR2GX-L_JQOvl1-exyCWS9tJzWa6gjcVR7e1Cc1NJHuH4bUWsrpLhLxyk23sOLpogQqU22DeO8TKy0qYTl8RP1QwxCF9Jrq/s1600/Screenshot+from+2014-08-21+14:26:06.png" height="203" width="320" /></a></div>
<div style="text-align: center;">
[Click on the Image to enlarge]</div>
<br />
You are done with it!<br />
<br />
<b>References:</b><br />
<br />
[1] Downloading <i>ns-</i>3, <a href="http://www.nsnam.org/docs/release/3.20/tutorial/singlehtml/index.html#downloading-ns3" target="_blank">http://www.nsnam.org/docs/release/3.20/tutorial/singlehtml/index.html#downloading-ns3</a><br />
<br />
[2] Building <i>ns-</i>3, <a href="http://www.nsnam.org/docs/release/3.20/tutorial/singlehtml/index.html#building-ns3" target="_blank">http://www.nsnam.org/docs/release/3.20/tutorial/singlehtml/index.html#building-ns3</a> </div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com8tag:blogger.com,1999:blog-2676809952989108356.post-72474032177066447592014-07-19T09:59:00.001+05:302019-02-18T13:52:03.810+05:30Underwater Sensor Network Simulations in ns-2 using Aqua-Sim<div dir="ltr" style="text-align: left;" trbidi="on">
This post describes a step-by-step procedure to simulate "Underwater Sensor Networks" in ns-2 by using Aqua-Sim tool [1]. Some of the outstanding features of Aqua-Sim are [2]:<br />
<br />
1. Simulates acoustic signal attenuation and packet collisions in underwater sensor networks.<br />
2. Supports 3D deployment.<br />
3. Can be easily integrated with existing codes of ns-2.<br />
4. Independent of CMU wireless simulation package of ns-2.<br />
5. Changes in either of them do not affect the other packages.<br />
<br />
<b>NOTE: </b><br />
1. You do not need to have ns-2 pre-installed to work with Aqua-Sim.<br />
2. Aqua-Sim tool is distributed as a *tarball* rather than a *patch* [2].<br />
3. Aqua-Sim tarball = Original ns-2.30 tarball + Aqua-Sim Source Codes.<br />
4. Installing the *tarball* distributed by Aqua-Sim developers is enough.<br />
5. Source code for 3D deployment is not distributed inside the above mentioned tarball.<br />
6. For 3D deployment, separate tarball called *Aqua-3D* is distributed [3].<br />
7. First, this post explains the installation of Aqua-Sim tarball.<br />
8. Secondly, this post explains the installation of Aqua-3D.<br />
<br />
<b>Follow the steps given below to install Aqua-Sim:</b><br />
<br />
1. Download <a href="http://www.mediafire.com/file/h5hrm5ag2wwk57s/Aqua-Sim-1.0.tgz/file" target="_blank">Aqua-Sim-1.0.tgz</a><br />
<br />
2. Unzip Aqua-Sim-1.0.tgz. You will get a folder named Aqua-Sim-1.0<br />
<br />
3. Give the following command:<br />
<br />
<b>./install</b><br />
<br />
4. If you get error in *otcl* installation, then go to the following folder:<br />
<br />
<b>Aqua-Sim-1.0/otcl-1.12</b><br />
<br />
and then open the *configure* file. Go to line number 5516 and replace<br />
<br />
<b>ld</b> -shared<br />
<br />
by<br />
<br />
<b>gcc</b> -shared<br />
<br />
then go back to Aqua-Sim-1.0 folder via terminal and try to re-install Aqua-Sim by giving the following command:<br />
<br />
<b>./install</b><br />
<br />
5. You may or may not get further errors depending on the gcc version of your Linux flavor.<br />
<br />
6. Once the installation is completed, go to following directory:<br />
<br />
<b>Aqua-Sim-1.0/ns-2.30</b><br />
<br />
and give the following command (NOTE: this command requires *root* access):<br />
<br />
<b>make install </b><br />
<br />
7. Verify whether Aqua-Sim is installed successfully or not by going to the following folder:<br />
<br />
Aqua-Sim-1.0/ns-2.30/underwatersensor/uw_tcl<br />
<br />
and give the following command<br />
<br />
<b>ns vbf_example_5.tcl</b><br />
<br />
If the above TCL Script works fine, Aqua-Sim has installed successfully!<br />
<br />
Otherwise, please feel free to report the errors that you get during the installation procedure.<br />
<br />
<b>Following are the steps to install Aqua-3D:</b><br />
<br />
1. Download <a href="http://www.mediafire.com/file/c7cnk4mqnu4w4m1/Aqua3d-1.0.0-src.tgz/file" target="_blank">Aqua3d-1.0.0-src.tgz</a><br />
<br />
2. Depending on your Linux flavor, install the packages listed on the following link, before proceeding for installation:<br />
<br />
<a href="http://obinet.engr.uconn.edu/wiki/index.php/Aqua-3D#Requirements">http://obinet.engr.uconn.edu/wiki/index.php/Aqua-3D#Requirements</a><br />
<br />
3. Unzip Aqua3d-1.0.0-src.tgz. You will get a folder named aqua3d-1.0.0-src<br />
<br />
4. Go in aqua3d-1.0.0-src folder via terminal and give the following command:<br />
<br />
<b>make</b><br />
<br />
5. If all packages were properly installed during Step 2, you will get a exectuable named *aqua3d* in aqua3d-1.0.0-src folder. Try running it by giving the following command;<br />
<br />
<b>./aqua3d</b><br />
<br />
or just *double click* on aqua3d.<br />
<br />
6. New window, like the one shown below, will open:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRFDGF-YcSkjoS3lAzprcWgfWFesElLkSdOwp0pXLHvxe6IkVu1S1OGUoreZsie0K70bB23WcA_B9ejgSpjb5wrPgmf0ypSw5rScjAGruX6Isu4iAvhoXEeVnSSREirodv8hTpTfibrc5d/s1600/aqua3d.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="255" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRFDGF-YcSkjoS3lAzprcWgfWFesElLkSdOwp0pXLHvxe6IkVu1S1OGUoreZsie0K70bB23WcA_B9ejgSpjb5wrPgmf0ypSw5rScjAGruX6Isu4iAvhoXEeVnSSREirodv8hTpTfibrc5d/s1600/aqua3d.png" width="320" /></a></div>
[Click on the image to enlarge]<br />
<br />
7. Aqua-Sim takes *.nam* files as input. A Sample .nam file called *vbva.nam* is provided in the following folder:<br />
<br />
<b>aqua3d-1.0.0-src/trace_example</b><br />
<br />
8. Using the *File -> Open Trace (no options)* option in the window shown above, open vbva.nam. A new window, as shown below, would open:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5NDa9ZDp_2GTqewBKxKaIeP35-q6Lm8eJ9fkzmLZHizAJMgz0QtBQ5N1f52L6amVKnZsqR44S0DWB6B8VGicpzQEKzUXAVIxzLPJKrWvdDdvVdt-zmr9N0f1bd-M-_4k9p53UISdgATPR/s1600/aqua3d-vbva.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5NDa9ZDp_2GTqewBKxKaIeP35-q6Lm8eJ9fkzmLZHizAJMgz0QtBQ5N1f52L6amVKnZsqR44S0DWB6B8VGicpzQEKzUXAVIxzLPJKrWvdDdvVdt-zmr9N0f1bd-M-_4k9p53UISdgATPR/s1600/aqua3d-vbva.png" width="320" /></a></div>
[Click on the image to enlarge]<br />
<br />
9. Alternatively, you can also open the same file with *File -> Open Trace (with options)*<br />
<br />
A very detailed and clear information about Aqua-Sim's features, architecture, support of routing protocols and mac protocols, mailing lists, etc is provided on the following link:<br />
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<a href="http://obinet.engr.uconn.edu/wiki/index.php/Aqua-Sim">http://obinet.engr.uconn.edu/wiki/index.php/Aqua-Sim</a></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
A very clear and basic tutorial (contains explanation of the TCL scripts corresponding to Aqua-Sim) is available on the following link:</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<a href="http://obinet.engr.uconn.edu/wiki/images/User_tutorial_for_Aqua-sim-10-26.pdf" target="_blank">http://obinet.engr.uconn.edu/wiki/images/User_tutorial_for_Aqua-sim-10-26.pdf</a></div>
<br />
<b>References / Acknowledgements:</b><br />
<br />
[1] "<a href="http://obinet.engr.uconn.edu/wiki/images/Aqua-Sim_2.pdf" target="_blank">Aqua-Sim 2: An NS-2 Based Simulator for Underwater Sensor Networks</a>", Yibo Zhu, Xiaoyan Lu, Lina Pu, Yishan Su, Robert Martin, Michael Zuba, Zheng Peng and and Jun-Hong Cui, in Proc. of ACM WUWNet, Kaohsiung, Taiwan, 2013.<br />
<br />
[2] Official webpage of Aqua-Sim: <a href="http://obinet.engr.uconn.edu/wiki/index.php/Aqua-Sim" target="_blank">http://obinet.engr.uconn.edu/wiki/index.php/Aqua-Sim</a><br />
<br />
[3] Official webpage of Aqua-3D: <a href="http://obinet.engr.uconn.edu/wiki/index.php/Aqua-3D" target="_blank">http://obinet.engr.uconn.edu/wiki/index.php/Aqua-3D</a><br />
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. Tahiliani</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com17tag:blogger.com,1999:blog-2676809952989108356.post-47755813860313160672014-05-22T18:09:00.001+05:302014-05-23T23:14:24.004+05:30Blackhole Attack in ns-2<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
The patch provided in this post enables a ns-2 user to simulate "Blackhole Attack in ns-2" for Mobile Ad hoc Network (MANET) Simulations. Blackhole attack has been implemented using Ad hoc On demand Distance Vector (AODV) routing protocol. As of now the patch will only work on ns-2.35 version! Patches for older versions of ns-2 will be provided soon.</div>
<br />
<b>Material provided with this post:</b><br />
<br />
<div style="text-align: justify;">
1. A patch to simulate Blackhole attack in ns-2.35 and steps to apply that patch.</div>
<div style="text-align: justify;">
2. Sample TCL script to demonstrate how to configure a malicious nodes.</div>
<div style="text-align: justify;">
3. AWK Script that calculates Packet Delivery Ratio (to confirm whether the code really works!)</div>
<br />
Follow the steps given below to apply Blackhole patch to ns-2.35:<br />
<br />
1. Download <a href="http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download" target="_blank">ns-allinone-2.35.tar.gz</a><br />
<br />
2. Download <a href="http://www.mediafire.com/download/qzckp45yada6c14/Blackhole.patch" target="_blank">Blackhole.patch</a><br />
<br />
3. Unzip ns-allinone-2.35.tar.gz. You will get a folder named ns-allinone-2.35<br />
<br />
4. Paste the downloaded Blackhole patch in the above mentioned folder.<br />
<br />
5. Give the following command:<br />
<br />
<b>patch -p1 -t < Blackhole.patch</b><br />
<br />
<div style="text-align: justify;">
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):</div>
<br />
<b>./install</b><br />
<br />
<div style="text-align: justify;">
If you already have an installed copy of ns-allinone-2.35, then follow the steps given below to apply the Blackhole patch:</div>
<br />
1. Paste the downloaded Blackhole patch in ns-allinone-2.35 directory.<br />
<br />
2. Give the following command:<br />
<br />
<b>patch -p1 -t < Blackhole.patch</b><br />
<br />
3. Go in ns-allinone-2.35/ns-2.35 directory and give the following commands:<br />
<br />
<b>./configure</b><br />
<b>make clean</b><br />
<b>make</b><br />
<b>make install</b><br />
<br />
You are done with it!<br />
<br />
<b>Sample TCL Script and AWK Script to verify the working of Blackhole Patch:</b><br />
<br />
Download blackhole.tcl and pdf.awk from the links given below and keep them in the same folder:<br />
<br />
<a href="http://www.mediafire.com/view/0f40bf6z4opr4oe/blackhole.tcl" target="_blank">blackhole.tcl</a><br />
<u><br /></u><a href="http://www.mediafire.com/view/zbqypz2c9x8c2ym/pdf.awk" target="_blank">pdf.awk</a><br />
<br />
<b>How to use these files for verification?</b><br />
<br />
I. Open blackhole.tcl and comment the following line (remember: # is used for commenting)<br />
<br />
<b>$ns at 0.0 "[$n5 set ragent_] hacker"</b><br />
<br />
<div style="text-align: justify;">
$n5 in the above line represents node 5. The word "hacker" has been used to represent "attacker". You may try making any other node as an hacker also. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
0.0 in the above line indicates that from beginning of the simulation itself, node 5 acts an attacker in the network. Blackhole attack is mainly launched during the Route Establishment phase and hence it is important to configure a node to be an attacker from the beginning of the simulation.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
We comment the above line so that we can first analyze the behavior of a normal network without Blackhole attack. At a later point, we will uncomment this line and analyze the behavior of the network when it is attacked by node 5.</div>
<br />
II. Run blackhole.tcl by giving the following command:<br />
<br />
<b>ns blackhole.tcl</b><br />
<br />
III. Give the following command to run the pdf.awk and note down the results:<br />
<br />
<b>awk -f pdf.awk blackhole.tr</b><br />
<br />
<div style="text-align: justify;">
IV. Open blackhole.tcl again and uncomment the line which you commented earlier (i.e., this time the attacker will attack the network)</div>
<br />
V. Run blackhole.tcl by using the same command as mentioned in Step II.<br />
<br />
VI. Note down new results by running the pdf.awk as mentioned in Step III.<br />
<br />
You would observe that none of the packets are delivered and ratio turns out to be zero.<br />
<br />
<div style="text-align: justify;">
You can also verify the working of the patch by observing packet drops in NAM window. Here is one snapshot which shows the same:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid8SVtJrpSEd3q5wsZH26rvvlLHUUAmXQT-VDBSVXjNzw00FDHnM-0lgRJGzksD7QsHHhq4IurfCZVOdWnTx88TKXIUUxJ5vaQWAnMFBT3wUCaWAMhEV18fRjTNkE3HFg5NYxu6dPfgKWZ/s1600/Blackhole.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid8SVtJrpSEd3q5wsZH26rvvlLHUUAmXQT-VDBSVXjNzw00FDHnM-0lgRJGzksD7QsHHhq4IurfCZVOdWnTx88TKXIUUxJ5vaQWAnMFBT3wUCaWAMhEV18fRjTNkE3HFg5NYxu6dPfgKWZ/s1600/Blackhole.png" height="253" width="400" /></a></div>
<div style="text-align: center;">
[Click on the Image to enlarge]</div>
<b><br /></b>
<b>Acknowledgements: </b><br />
<br />
1. Thanks to <b>E. Talipov's link</b>: http://elmurod.net/en/index.php/archives/196 using which a major part of the patch has been designed.<br />
<br />
<div style="text-align: justify;">
2. Thanks to <b>Gaurav Gupta </b>for designing the sample TCL script named "blackhole.tcl" and also for his assistance in shaping up this patch.<br />
<br />
3. Thanks to <b>Knud F. L.</b> for his crucial feedback on the design of the patch.</div>
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. Tahiliani</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com92tag:blogger.com,1999:blog-2676809952989108356.post-25742474260785830472013-05-26T19:44:00.000+05:302013-05-26T19:51:35.862+05:30CoDel's patch for ns-2.31 (to support TCP Evaluation Suite) <div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">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: <a href="http://www.pollere.net/CoDel.html" target="_blank">http://www.pollere.net/CoDel.html</a></span></div>
<span style="font-family: sans-serif; font-size: 13px; line-height: 19px; text-align: justify;"><br />
</span> <span style="font-family: sans-serif; font-size: 13px; line-height: 19px; text-align: justify;">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. </span><br />
<span style="font-family: sans-serif; font-size: 13px; line-height: 19px; text-align: justify;"><br />
</span> <span style="font-family: sans-serif; font-size: 13px; line-height: 19px; text-align: justify;">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. </span><br />
<span style="font-family: sans-serif; font-size: 13px; line-height: 19px; text-align: justify;"><br />
</span> <span style="font-family: sans-serif; font-size: 13px; line-height: 19px; text-align: justify;">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.</span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">Contributed by: <b>Dipesh Raghuvanshi</b></span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">Following are the steps to be followed to apply given patch to ns-2.31:</span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">1. Download <a href="http://wing.nitk.ac.in/resources/ns-allinone-2.31.tar.gz" target="_blank">ns-allinone-2.31.tar.gz</a></span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">2. Download <a href="http://www.mediafire.com/?r8bl8yb4079a356" target="_blank">CoDel-ns-2.31.patch</a></span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">3. Unzip ns-allinone-2.31.tar.gz. You will get a folder named ns-allinone-2.31</span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">4. Paste the downloaded patch in this folder.</span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">5. Give the following command:</span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"> <b>patch -p1 > CoDel-ns-2.31.patch</b></span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">6. Then give <b>./install</b></span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">If you already have an installed copy of ns-allinone-2.31, then follow the steps given below to apply the CoDel patch:</span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">1. Paste the downloaded patch in ns-allinone-2.31 folder.</span><br />
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span> <span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">2. </span><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">Give the following command:</span><br />
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"> <b> patch -p1 > CoDel-ns-2.31.patch</b></span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">3. Go in ns-allinone-2.31/ns-2.31 directory.</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">4. Give the following commands:</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"> <b>./configure</b></span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"> <b>make clean</b></span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"> <b>make</b></span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"> <b>make install</b></span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">You are done with it!</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">To verify the working of this patch, an example TCL Script named "<b>codel.tcl</b>" will now be available in ns-allione-2.31/ns-2.31 directory.</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">Go in ns-allinone-2.31/ns-2.31 directory and run the file by giving:<b> ns codel.tcl</b></span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">If you encounter any problem in downloading the patch from the link given above, please follow this link:</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: inherit; line-height: 19px;"><a href="http://www.mediafire.com/?r8bl8yb4079a356" target="_blank">http://www.mediafire.com/?r8bl8yb4079a356</a></span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">Hope it helps.</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><br />
</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">Regards,</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;">Mohit P. Tahiliani</span></div>
</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com17tag:blogger.com,1999:blog-2676809952989108356.post-26763407093994998552012-08-31T15:10:00.002+05:302012-08-31T15:10:35.120+05:30Rate Control Protocol (RCP) Patch for ns-2.35<div dir="ltr" style="text-align: left;" trbidi="on">
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:<br />
<br />
<a href="http://yuba.stanford.edu/rcp/" target="_blank">http://yuba.stanford.edu/rcp/</a><br />
<br />
<div style="text-align: justify;">
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.</div>
<br />
Follow the steps given below to apply RCP's patch to ns-2.35:<br />
<br />
1. Download <a href="http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download" target="_blank">ns-allinone-2.35.tar.gz</a><br />
<br />
2. Download <a href="http://www.mediafire.com/?wdr58vywd3jkzbx" target="_blank">rcp-ns2-35.patch</a><br />
<br />
3. Unzip ns-allinone-2.35.tar.gz. You will get a folder named ns-allinone-2.35<br />
<br />
4. Paste the downloaded RCP patch in the above mentioned folder.<br />
<br />
5. Give the following command:<br />
<br />
<b>patch -p1 < rcp-ns2-35.patch</b><br />
<br />
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):<br />
<br />
<b>./install</b><br />
<br />
<div style="text-align: justify;">
If you already have an installed copy of ns-allinone-2.35, then follow the steps given below to apply the RCP patch:</div>
<br />
1. Paste the downloaded RCP patch in ns-allinone-2.35 directory.<br />
<br />
2. Give the following command:<br />
<br />
<b>patch -p1 < rcp-ns2-35.patch</b><br />
<br />
3. Go in ns-allinone-2.35/ns-2.35 directory and give the following commands:<br />
<br />
<b>./configure</b><br />
<b>make clean</b><br />
<b>make</b><br />
<b>make install</b><br />
<br />
You are done with it!<br />
<br />
<b>Sample TCL Scripts:</b><br />
Use the sample TCL Scripts provided on the official website of RCP. Following is the link:<br />
<br />
<a href="http://yuba.stanford.edu/rcp/#implementation" target="_blank">http://yuba.stanford.edu/rcp/#implementation</a><br />
<br />
<a href="http://yuba.stanford.edu/rcp/rcp-ns2.30.tar.gz" target="_blank">rcp-ns-2.30.tar.gz</a> must be downloaded from the above link. It contains a folder named "example-tcl-files" which contains the sample TCL Scripts.<br />
<br />
<b>A Note on the installation of ns-allinone-2.35:</b><br />
<div style="text-align: justify;">
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.</div>
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. Tahiliani</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com38tag:blogger.com,1999:blog-2676809952989108356.post-46598950170280908932012-01-16T12:01:00.002+05:302012-11-02T13:02:59.920+05:30Refined Adaptive RED (Re-ARED or RARED) patch for NS-2<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="text-align: justify;">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. </span><br />
<span style="text-align: justify;"><br /></span>
<span style="text-align: justify;">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.</span><br />
<span style="text-align: justify;"><br /></span>
<span style="text-align: justify;"><b>Reference: </b>"Refined Adaptive RED in TCP/IP Networks", Tae-Hoon Kim and Kee-Hyun Lee, SICE-ICASE International Joint Conference, pp. 3722-3725 (2006).</span><br />
<span style="text-align: justify;"><br /></span>
<span style="text-align: justify;">The following patch provides implementation of Re-ARED (or RARED) in NS-2:</span><br />
<span style="text-align: justify;"><br /></span>
<br />
<div style="text-align: justify;">
Download <a href="http://www.mediafire.com/?b6c9vut7tg4rjua" target="_blank">Re-ARED patch for NS-2</a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">Following are the steps to be followed to apply above given patch to ns-2.34:</span></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">1. Download <a href="http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.34/ns-allinone-2.34.tar.gz/download" target="_blank">ns-allinone-2.34.tar.gz</a> </span></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">2. Download <a href="http://www.mediafire.com/?b6c9vut7tg4rjua" target="_blank">Re-ARED.patch</a></span></span><a href="http://www.megaupload.com/?d=22RAG7JV" target="_blank"></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
3. Unzip ns-allinone-2.34.tar.gz. You will get a folder named ns-allinone-2.34.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
4. Paste the downloaded patch in this folder.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
5. Give the following command:<b> </b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b> patch -p1 < Re-ARED.patch</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
6. Then give <b>./install</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
If you have already installed copy of ns-allinone-2.34 then follow the below given steps to apply Re-ARED patch</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
1. Paste the downloaded patch in ns-allinone-2.34 folder.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
2. Give the following command:<b> </b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b> patch -p1 < Re-A<span class="Apple-style-span" style="font-weight: normal;"><b>RED</b></span>.patch</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
3. Go in ns-allinone-2.34/ns-2.34 directory and give the following commands:<b> </b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b> ./configure</b></div>
<div style="text-align: justify;">
<b> make clean</b></div>
<div style="text-align: justify;">
<b> make</b></div>
<div style="text-align: justify;">
<b> make install</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
You are done with it!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>TCL Commands:</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Please read this post before getting started with Re-ARED simulation in NS-2 <a href="http://www.mohittahiliani.blogspot.com/2011/08/random-early-detection-red-in-ns-2-tcl.html" target="_blank">"Random Early Detection (RED) in NS-2 - TCL - Part 1"</a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
To simulate Re-ARED, you need to <b>ensure</b> that following two lines are added in the TCL Script:</div>
<div style="text-align: justify;">
<br /></div>
<div style="color: #e69138; text-align: justify;">
<b>Queue/RED set adaptive_ 1</b><br />
<b>Queue/RED set refined_adaptive_ 1 </b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Rest all commands remain same as explained in <a href="http://www.mohittahiliani.blogspot.com/2011/08/random-early-detection-red-in-ns-2-tcl.html" target="_blank">"Random Early Detection (RED) in NS-2 - TCL - Part 1"</a>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Hope it helps.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Regards,</div>
<span style="text-align: justify;">Mohit P. Tahiliani</span><br />
<div style="text-align: justify;">
<b style="font-family: inherit; line-height: 24px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b>
<b style="font-family: inherit; line-height: 24px;"><span style="font-family: Arial, Helvetica, sans-serif;">Related Blogs:</span></b></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">1. <a href="http://mohittahiliani.blogspot.in/2011/08/random-early-detection-red-in-ns-2-tcl.html" target="_blank">Random Early Detection (RED) in NS-2 - TCL - Part 1</a></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">2. </span><a href="http://mohittahiliani.blogspot.in/2012/01/nonlinear-red-nlred-patch-for-ns-2.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="_blank">Nonlinear RED (NLRED) patch for NS-2</a><br />
<br /></div>
</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com15tag:blogger.com,1999:blog-2676809952989108356.post-50608018636294491582012-01-12T16:02:00.009+05:302012-11-02T13:04:45.710+05:30Nonlinear RED (NLRED) patch for NS-2<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
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. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Reference:</b> "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). </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
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.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Download <a href="http://www.mediafire.com/?ic04qp748xn7vpp" target="_blank">NLRED patch for NS-2</a><span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;"> </span></span><br />
<br />
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">Following are the steps to be followed to apply above given patch to ns-2.34:</span></span><br />
<br />
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">1. Download <a href="http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.34/ns-allinone-2.34.tar.gz/download" target="_blank">ns-allinone-2.34.tar.gz</a> </span></span><br />
<br />
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">2. Download <a href="http://www.mediafire.com/?ic04qp748xn7vpp" target="_blank">NLRED.patch</a></span></span><a href="http://www.megaupload.com/?d=22RAG7JV" target="_blank"></a><br />
<br />
3. Unzip ns-allinone-2.34.tar.gz. You will get a folder named ns-allinone-2.34.<br />
<br />
4. Paste the downloaded patch in this folder.<br />
<br />
5. Give the following command:<b> </b><br />
<br />
<b> patch -p1 < NLRED.patch</b><br />
<br />
6. Then give <b>./install</b><br />
<br />
If you have already installed copy of ns-allinone-2.34 then follow the below given steps to apply NLRED patch<br />
<br />
1. Paste the downloaded patch in ns-allinone-2.34 folder.<br />
<br />
2. Give the following command:<b> </b><br />
<br />
<b> patch -p1 < <span class="Apple-style-span" style="font-weight: normal;"><b>NLRED</b></span>.patch</b><br />
<br />
3. Go in ns-allinone-2.34/ns-2.34 directory and give the following commands:<b> </b><br />
<br />
<b> ./configure</b><br />
<b> make clean</b><br />
<b> make</b><br />
<b> make install</b><br />
<br />
You are done with it!<br />
<br />
<b>TCL Commands:</b><br />
<br />
Please read this post before getting started with NLRED simulation in NS-2 <a href="http://www.mohittahiliani.blogspot.com/2011/08/random-early-detection-red-in-ns-2-tcl.html" target="_blank">"Random Early Detection (RED) in NS-2 - TCL - Part 1"</a><br />
<br />
To simulate NLRED, you just need to include the following command in TCL Script:<br />
<br />
<div style="color: #e69138;">
<b>Queue/RED set nonlinear_ 1 </b></div>
<br />
Rest all commands remain same as explained in <a href="http://www.mohittahiliani.blogspot.com/2011/08/random-early-detection-red-in-ns-2-tcl.html" target="_blank">"Random Early Detection (RED) in NS-2 - TCL - Part 1"</a>.<br />
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. Tahiliani<br />
<b style="font-family: inherit; line-height: 24px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b>
<b style="font-family: inherit; line-height: 24px;"><span style="font-family: Arial, Helvetica, sans-serif;">Related Blogs:</span></b><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">1. </span><a href="http://mohittahiliani.blogspot.in/2011/08/random-early-detection-red-in-ns-2-tcl.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="_blank">Random Early Detection (RED) in NS-2 - TCL - Part 1</a><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">2. </span><a href="http://mohittahiliani.blogspot.in/2012/01/refined-adaptive-red-re-ared-or-rared.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="_blank">Refined Adaptive RED (Re-ARED or RARED) patch for NS-2</a><br />
<br />
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span></div>
</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com2tag:blogger.com,1999:blog-2676809952989108356.post-54237355608903184022011-08-26T13:36:00.002+05:302014-12-24T12:08:44.639+05:30Random Early Detection (RED) in NS-2 - TCL - Part 1<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="text-align: justify;">
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:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
1. Minimum threshold</div>
<div class="MsoNormal">
2. Maximum threshold</div>
<div class="MsoNormal">
3. Exponential weighted moving average constant</div>
<div class="MsoNormal">
4. Maximum drop probability</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal" style="text-align: justify;">
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.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal" style="text-align: justify;">
In NS-2, the
default RED which is active is Gentle RED + RED with automatic settings. 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:</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138; font-family: inherit;"><b>Queue/RED set thresh_ 5<o:p></o:p></b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138; font-family: inherit;"><b>Queue/RED set maxthresh_ 15<o:p></o:p></b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138; font-family: inherit;"><b>Queue/RED set q_weight_ 0.001</b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138; font-family: inherit;"><b>Queue/RED set bytes_ false<o:p></o:p></b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138; font-family: inherit;"><b>Queue/RED set queue_in_bytes_ false<o:p></o:p></b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138; font-family: inherit;"><b>Queue/RED set gentle_ false<o:p></o:p></b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138; font-family: inherit;"><b>Queue/RED set mean_pktsize_ 1000</b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;">
<span class="Apple-style-span" style="font-family: inherit;">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!</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: inherit;"><span class="Apple-style-span" style="color: #e69138;"><b>thresh_</b></span> = minimum threshold</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138;"><b>maxthresh_</b></span> = maximum threshold</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138;"><b>q_weight_</b></span> = exponential weighted moving average constant</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;">
<span class="Apple-style-span" style="color: #e69138;"><b>bytes_</b></span><span class="Apple-style-span" style="color: orange;"> </span>and<span class="Apple-style-span" style="color: orange;"> </span><span class="Apple-style-span" style="color: #e69138;"><b>queue_in_bytes_</b></span> = indicate calculations of average queue size in bytes. Setting them to false indicates average queue size will be calculated in packets (not in bytes).</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;">
<span class="Apple-style-span" style="color: #e69138;"><b>gentle_</b></span> = Gentle RED mode. Setting it false indicates Gentle mode is OFF</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138;"><b>mean_pktsize_</b></span> = average size of a packet arriving at the router</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b>Setting RED in Wired Networks:</b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
Sample command is:</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138;"><b>$ns duplex-link $n0 $n2 10Mb 10ms RED</b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b>Setting RED in Wireless Networks:</b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
Sample command is:</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138;"><b>set val(ifq) Queue/RED</b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b>Gentle RED Settings in NS-2:</b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
To enable Gentle RED option, the only change required is:</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span class="Apple-style-span" style="color: #e69138;"><b>Queue/RED set gentle_ true</b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
Rest all commands and syntax for Gentle RED are exactly same as mentioned above for Original RED.</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
Hope it helps.</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
Regards,</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
Mohit P. Tahiliani</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;">
<b>References:</b> S. Floyd and V. Jacobson, "Random Early Detection Gateways for Congestion Avoidance", IEEE/ACM Transactions on Networking, 1, 397-413.<br />
<b style="font-family: inherit; line-height: 24px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b>
<b style="font-family: inherit; line-height: 24px;"><span style="font-family: Arial, Helvetica, sans-serif;">Related Blogs:</span></b><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">1. </span><a href="http://mohittahiliani.blogspot.in/2012/01/nonlinear-red-nlred-patch-for-ns-2.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="_blank">Nonlinear RED (NLRED) patch for NS-2</a><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">2. </span><a href="http://mohittahiliani.blogspot.in/2012/01/refined-adaptive-red-re-ared-or-rared.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="_blank">Refined Adaptive RED (Re-ARED or RARED) patch for NS-2</a><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">3.</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;"> </span><a href="http://mohittahiliani.blogspot.in/2009/10/tcl-script-generator.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="_blank">TCL Script Generator</a><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">4.</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;"> </span><a href="http://mohittahiliani.blogspot.in/2009/10/tcl-script-generator-centered-on-nsg.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="_blank">TCL Script Generator centered on NSG</a><br />
<br /></div>
</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com26tag:blogger.com,1999:blog-2676809952989108356.post-17981812386539095882011-08-06T15:51:00.002+05:302014-05-24T10:50:29.651+05:30AWK Scripts for Normalized Routing Load/ Normalized Routing Overhead<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Normalized Routing Load (or Normalized Routing Overhead) is defined as the total number of routing packet transmitted per data packet.</div>
<br />
<div style="text-align: justify;">
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.</div>
<br />
<div style="text-align: justify;">
AWK Script to calculate Normalized Routing Load for Old trace format can be downloaded from the link given below:</div>
<br />
<div style="text-align: center;">
<b>AWK Script for Normalized Routing Load - Old Trace Format:</b></div>
<a href="http://www.megaupload.com/?d=4GF89D4G"></a><br />
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background-color: #5d7cba; border: 1px solid rgb(53, 53, 53); font-family: Arial,Helvetica,sans-serif; font-size: 11px; padding: 0px; text-align: center;"><tbody>
<tr style="background-color: white;"><td style="padding: 5px 5px 3px; text-align: center;"></td></tr>
<tr style="background-color: white;"><td style="padding: 5px; text-align: center;"><b><a href="http://www.mediafire.com/?czvehuu2os3jh0u" style="color: #333333;" target="_blank">nrl_ot.awk</a></b></td></tr>
<tr><td style="color: white; font-size: 9px; padding: 5px;" valign="bottom"></td></tr>
</tbody></table>
<br />
<div style="text-align: justify;">
AWK Script to calculate Normalized Routing Load for New trace format can be downloaded from the link given below:</div>
<br />
<div style="text-align: center;">
<b>AWK Script for Normalized Routing Load - New Trace Format:</b></div>
<a href="http://www.megaupload.com/?d=WRI2GJB0"></a><br />
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background-color: #5d7cba; border: 1px solid rgb(53, 53, 53); font-family: Arial,Helvetica,sans-serif; font-size: 11px; padding: 0px; text-align: center;"><tbody>
<tr style="background-color: white;"><td style="padding: 5px 5px 3px; text-align: center;"></td></tr>
<tr style="background-color: white;"><td style="padding: 5px; text-align: center;"><b><a href="http://www.mediafire.com/?8v0o8g7adv0prbq" style="color: #333333;" target="_blank">nrl_nt.awk</a></b></td></tr>
<tr><td style="color: white; font-size: 9px; padding: 5px;" valign="bottom"></td></tr>
</tbody></table>
</div>
<br />
<div style="text-align: justify;">
If there are any problems encountered in downloading above files, please visit the link given below:</div>
<br />
<a href="http://www.mediafire.com/?z1c2cxdt1a31d" target="_blank">http://www.mediafire.com/?z1c2cxdt1a31d</a><br />
<br />
<div style="text-align: justify;">
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.</div>
<br />
<b>Note:</b> Please report any bugs if encountered.<br />
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. Tahiliani<br />
<br />
<div style="text-align: justify;">
<b style="font-family: inherit; line-height: 24px;"><span style="font-family: Arial, Helvetica, sans-serif;">Related Blogs:</span> </b></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">1. </span><a href="http://mohittahiliani.blogspot.com/2010/03/awk-script-for-ns2-supporting-new-trace.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="first_window">AWK Script for NS2 supporting New Trace Format</a></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">2. </span><a href="http://mohittahiliani.blogspot.com/2010/02/few-more-awk-scripts-for-ns2.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="first_window">Few more AWK Scripts for NS2</a></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">3.</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;"> <a href="http://mohittahiliani.blogspot.in/2010/08/xgraph-and-awk-scripts-in-ns-2_06.html" target="_blank">Xgraph and AWK Scripts in NS-2</a></span></div>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: justify;">4.</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: justify;"> </span><a href="http://mohittahiliani.blogspot.in/2009/12/awk-script-for-ns2.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: justify;" target="_blank">AWK Scripts for NS2</a> </div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com49tag:blogger.com,1999:blog-2676809952989108356.post-73427099059642641842011-07-05T20:29:00.004+05:302012-01-21T15:33:36.296+05:30Modified AOMDV with Multiple Interface Support in NS-2<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: inherit;">
<span style="font-size: small;">This patch is designed for ns-allinone-2.33.</span></div>
<div style="font-family: inherit;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: inherit;">
<span style="font-size: small;">Contributed by: <b>Chirag Raval</b></span></div>
<div style="font-family: inherit; text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;"><br /></span></span><span style="font-size: small;">
</span><span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;"><span class="Apple-style-span">Download </span><a href="http://www.mediafire.com/?mbf2saf74asxfv8" target="_blank"><span class="Apple-style-span">NS-2.33-AOMDV-Multiple-Interface.patch</span></a></span></span>
<br />
<div style="color: black; line-height: normal; margin: 0px;">
<span style="font-size: small;"><br /></span>
<div>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">Following are the steps to be followed to apply above given patch to ns-2.33:</span></span></div>
</div>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<div style="color: black; line-height: normal; margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;"><br /></span></span></div>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<div style="color: black; line-height: normal; margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">1. Download <a href="http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.33/ns-allinone-2.33.tar.gz/download" target="first_window">ns-allinone-2.33.tar.gz</a></span></span></div>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<div style="color: black; line-height: normal; margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;"><br /></span></span></div>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<div style="color: black; line-height: normal; margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">2. Download <a href="http://www.mediafire.com/?mbf2saf74asxfv8" target="_blank">NS-2.33-AOMDV-Multiple-Interface.patch</a></span></span></div>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<div style="color: black; line-height: normal; margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;"><br /></span></span></div>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<div style="color: black; line-height: normal; margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">3. Unzip ns-allinone-2.33.tar.gz. You will get a folder named ns-allinone-2.33.</span></span></div>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
</span></span>
<div style="color: black; line-height: normal; margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;"><br /></span></span></div>
<span class="Apple-style-span" style="color: #31302c; font-size: small;"><span class="Apple-style-span" style="line-height: 20px;">
<div style="color: black; line-height: normal; margin: 0px;">
4. Paste the downloaded patch in this folder.</div>
<div style="color: black; line-height: normal; margin: 0px;">
<br /></div>
<div style="color: black; line-height: normal; margin: 0px;">
5. Give the following command:</div>
<div style="color: black; line-height: normal; margin: 0px;">
<br /></div>
<div style="color: black; line-height: normal; margin: 0px;">
<b>patch -p1 < NS-2.33-AOMDV-Multiple-Interface.patch</b></div>
<div style="color: black; line-height: normal; margin: 0px;">
<br /></div>
<div style="color: black; line-height: normal; margin: 0px;">
6. Then give <b>./install</b></div>
<div style="color: black; line-height: normal; margin: 0px;">
<br /></div>
<div style="color: black; line-height: normal; text-align: justify;">
<div style="margin: 0px;">
If you have already installed copy of ns-allinone-2.33 then follow the below given steps to apply multi-interface patch.</div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<br /></div>
<div style="color: black; line-height: normal; margin: 0px;">
1. Paste the downloaded patch in ns-allinone-2.33 folder.</div>
<div style="color: black; line-height: normal; margin: 0px;">
<br /></div>
<div style="color: black; line-height: normal; margin: 0px;">
2. Give the following command:</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<b>patch -p1 < <span class="Apple-style-span" style="font-weight: normal;"><b>NS-2.33-AOMDV-Multiple-Interface</b></span>.patch</b></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
3. Go in ns-allinone-2.33/ns-2.33 directory.</div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
4. Give the following commands:</div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<b>./configure</b></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<b>make clean</b></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<b>make</b></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<b>make install</b></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
You are done with it!</div>
</div>
<div style="color: black; line-height: normal; margin: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
<div style="color: black; line-height: normal; margin: 0px; text-align: justify;">
<div style="margin: 0px;">
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:</div>
<div>
<br /></div>
<div>
<span class="Apple-style-span">Download </span><a href="http://www.mediafire.com/?4dchcj5w6bagx42" target="_blank"><span class="Apple-style-span">Multi-Interface TCL Scripts - DSDV.zip</span></a></div>
<div>
<br /></div>
<div>
<div style="margin: 0px; text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;"><b>Kindly Note:</b> 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.</span></div>
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;">
</span>
<div style="margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;"><br /></span></div>
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;">
</span>
<div style="margin: 0px;">
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;">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.</span></div>
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;"><br /></span>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;">If you encounter any problem in downloading the patch from the link given above, please follow this link:</span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;"><br /></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;"><a href="http://www.mediafire.com/?mbf2saf74asxfv8" target="_blank">http://www.mediafire.com/?mbf2saf74asxfv8</a></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;"><br /></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;">If you encounter any problem in downloading example tcl scripts, please follow this link:</span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;"><br /></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;"><a href="http://www.mediafire.com/?4dchcj5w6bagx42" target="_blank">http://www.mediafire.com/?4dchcj5w6bagx42</a></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;"><br /></span></div>
<div style="text-align: justify;">
<div style="margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;">Hope it helps.</span></div>
<div style="margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;"><br /></span></div>
<div style="margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;">Regards,</span></div>
<div style="margin: 0px;">
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;">Mohit P. Tahiliani</span></div>
</div>
</div>
<span class="Apple-style-span" style="color: #31302c; line-height: 20px;">
</span></div>
</div>
</span></span></div>
</div>Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com85tag:blogger.com,1999:blog-2676809952989108356.post-28582478066318075162010-08-06T11:21:00.005+05:302014-10-31T12:48:08.408+05:30Xgraph and AWK Scripts in NS-2<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: inherit; text-align: justify;">
<span style="font-size: small; line-height: 115%;">AWK scripts (.awk), which are used to extract
the necessary information from trace files (.tr) are also useful to plot graphs
using Xgraph (.xgr) utility of NS-2. However, the AWK scripts that are used to
plot graphs differ from the AWK scripts that just print the values on the
terminal.</span><br />
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div style="font-family: inherit;">
<span style="font-size: small; line-height: 115%;"></span>
</div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;">I will try to explain the
difference between these two types of AWK scripts with the help of an example. Assume
that we have designed a tcl script named “energy.tcl” which simulates a network
for 100 seconds. We run this tcl script with the following command:<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><b>ns energy.tcl</b></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><span style="line-height: 115%;">After executing the tcl script we get a trace
file (.tr) and a NAM file (.nam) i.e. “energy.tr” and “energy.nam”. Now we may have two scenarios as explained below:</span></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;">1. We want the value of residual
(remaining) energy of a node <b>at the end
of the simulation</b>. (Here graph of Time v/s Residual energy is not required).</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;">2. We want the value of residual (remaining) energy of
a node <b>at each instance of time</b> i.e
from beginning of the simulation to the end of the simulation. (Time v/s
Residual energy graph is required to observe the decrease in the total energy
of a node).</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;">For both of the above mentioned
scenarios we need to design two different AWK scripts. However, the main logic
to calculate the residual energy will remain the same. Only the way we print
the values differs.</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;">Let <b>scen1.awk</b> be the awk file for first scenario and <b>scen2.awk</b> be the awk file for second
scenario. scen1.awk should be designed such that when we run it by using the
following command:</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><b>awk
-f scen1.awk energy.tr</b></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;">it should print the residual
(remaining) energy of a node on the terminal.</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;">And scen2.awk should be designed
such that when we run it by using the following command:</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><b>awk -f
scen2.awk energy.tr >
energy.xgr</b></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><span style="line-height: 115%;">it should print two values in “energy.xgr”: time
and residual (remaining) energy of a node.</span></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;">If you open “energy.xgr” you will
notice that there are two columns created. In first column, values related to “time”
are printed and in another column values related to “residual energy” are
printed. The values in first column form X-axis of the graph and the values in
second column form Y-axis of the graph (thus you get a graph of Time v/s
Residual Energy). </span><span style="font-size: small;">Give the following command to see
the graph:</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><b>xgraph energy.xgr</b></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;">Default background color of the
graph is grey. If you want a graph with background color as white, give the
following command:</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><b>xgraph energy.xgr
-bg white</b></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;">Other options (like changing
background colors, plotting bar graphs, etc) related to Xgraph are available in
the pdf file given below:</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><a href="http://www.mediafire.com/?oiykyfbk83dt7x1" target="_blank">Xgraph Utility of NS-2</a></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;">Hope it helps.</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;"><br /></span></div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small;">Regards,</span></div>
<div class="MsoNormal" style="margin-bottom: 0in; text-align: justify;">
<div style="font-family: inherit;">
<span style="font-size: small;">Mohit P. Tahiliani</span></div>
<div style="font-family: inherit;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: inherit;">
<span style="font-size: small;"><b><span style="color: blue;">[Latest Update]</span></b> You can also check the latest Automated Post Processing (APP) Tool which works based on AWK Scripts and automatically plots the graphs.</span></div>
<div style="font-family: inherit;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: inherit;">
<span style="font-size: small;">Here is the link to APP Tool's blog post:</span></div>
<div style="font-family: inherit;">
<span style="font-size: small;"><br /></span></div>
<a href="http://mohittahiliani.blogspot.in/2014/10/automated-post-processing-app-tool-for.html">http://mohittahiliani.blogspot.in/2014/10/automated-post-processing-app-tool-for.html</a><span style="font-family: inherit; font-size: small;"> </span><br />
<div style="font-family: inherit;">
<b style="font-family: inherit; line-height: 24px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b>
<b style="font-family: inherit; line-height: 24px;"><span style="font-family: Arial, Helvetica, sans-serif;">Related Blogs:</span> </b></div>
<div style="font-family: inherit;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">1. </span><a href="http://mohittahiliani.blogspot.com/2010/03/awk-script-for-ns2-supporting-new-trace.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="first_window">AWK Script for NS2 supporting New Trace Format</a></div>
<div style="font-family: inherit;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">2. </span><a href="http://mohittahiliani.blogspot.com/2010/02/few-more-awk-scripts-for-ns2.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="first_window">Few more AWK Scripts for NS2</a></div>
<div style="font-family: inherit;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">3.</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;"> </span><a href="http://mohittahiliani.blogspot.in/2011/08/awk-scripts-for-normalized-routing.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="_blank">AWK Scripts for Normalized Routing Load / Overhead</a></div>
<div style="font-family: inherit;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;">4.</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;"> </span><a href="http://mohittahiliani.blogspot.in/2009/12/awk-script-for-ns2.html" style="font-family: Arial, Helvetica, sans-serif; line-height: 24px;" target="_blank">AWK Scripts for NS2</a></div>
</div>
<div class="MsoNormal" style="font-family: inherit; margin-bottom: 0in; text-align: justify;">
<span style="font-size: small; line-height: 115%;"><span style="line-height: 115%;"></span></span></div>
<div class="MsoListParagraph" style="font-family: inherit; margin-bottom: 0in; text-align: justify; text-indent: -0.25in;">
</div>
</div>
Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com338tag:blogger.com,1999:blog-2676809952989108356.post-21568724866252344072010-06-16T14:11:00.001+05:302012-01-21T15:11:00.760+05:30Modified DSDV for Multiple Interface Support in NS-2<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: 13px; line-height: 20px;">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.</span></div>
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: 13px; line-height: 20px;"><br /></span>
<br />
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: 13px; line-height: 20px;"><b>There are few modifications required in the routing protocols such as DSDV, AODV and DSR to use multiple interface support in ns-2.</b> 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 <a href="http://mohittahiliani.blogspot.com/2010/04/revised-adding-multiple-interface.html" target="first_window">"Revised: Adding Multiple Interface Support in NS-2" </a>.</span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: 13px; line-height: 20px;"><br /></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 20px;">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:</span></span><br />
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 20px;"><br /></span></span>
<span class="Apple-style-span" style="color: #31302c; font-family: Arial;"><span class="Apple-style-span" style="line-height: 20px;"><span class="Apple-style-span" style="font-size: x-large;">Download </span><a href="http://www.mediafire.com/?y5tjaz5x6me2bh3" target="_blank"><span class="Apple-style-span" style="font-size: x-large;">NS-2.33-DSDV-Multiple-Interface.patch</span></a></span></span>
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 20px;"></span></span>
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 20px;"></span></span>
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 20px;"></span></span><br />
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 20px;"></span></span><br />
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 20px;"></span></span><br />
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 20px;">Following are the steps to be followed to apply above given patch to ns-2.33:</span></span></div>
<span class="Apple-style-span" style="color: #31302c; font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 20px;">
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
1. Download <a href="http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.33/ns-allinone-2.33.tar.gz/download" target="first_window">ns-allinone-2.33.tar.gz</a></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
2. Download <a href="http://www.mediafire.com/?y5tjaz5x6me2bh3" target="_blank">NS-2.33-DSDV-Multiple-Interface.patch</a></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
3. Unzip ns-allinone-2.33.tar.gz. You will get a folder named ns-allinone-2.33.</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
4. Paste the downloaded patch in this folder.</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
5. Give the following command:</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<b>patch -p1 < NS-2.33-DSDV-Multiple-Interface.patch</b></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
6. Then give <b>./install</b></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; text-align: justify;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
If you have already installed copy of ns-allinone-2.33 then follow the below given steps to apply multi-interface patch.</div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
1. Paste the downloaded patch in ns-allinone-2.33 folder.</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
2. Give the following command:</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<b>patch -p1 < <span class="Apple-style-span" style="font-weight: normal;"><b>NS-2.33-DSDV-Multiple-Interface</b></span>.patch</b></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
3. Go in ns-allinone-2.33/ns-2.33 directory.</div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
4. Give the following commands:</div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<b>./configure</b></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<b>make clean</b></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<b>make</b></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<b>make install</b></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
You are done with it!</div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
Example TCL scripts to verify the working of the patch can be found on the link given below:</div>
<div>
<br /></div>
<div>
<span class="Apple-style-span" style="font-size: x-large;">Download </span><a href="http://www.mediafire.com/?4dchcj5w6bagx42" target="_blank"><span class="Apple-style-span" style="font-size: x-large;">Multi-Interface TCL Scripts - DSDV.zip</span></a></div>
<div>
<br /></div>
<div>
<span class="Apple-style-span" style="color: #31302c; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"></span>
<span class="Apple-style-span" style="color: #31302c; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"></span>
<span class="Apple-style-span" style="color: #31302c; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"></span><br />
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<span class="Apple-style-span" style="color: #31302c; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"><b>Kindly Note:</b> 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.</span></div>
<span class="Apple-style-span" style="color: #31302c; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="text-align: justify;">
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.</div>
<br />
<div style="text-align: justify;">
If you encounter any problem in downloading the patch from the link given above, please follow this link:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<a href="http://www.mediafire.com/?y5tjaz5x6me2bh3" target="_blank">http://www.mediafire.com/?y5tjaz5x6me2bh3</a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
If you encounter any problem in downloading example tcl scripts, please follow this link:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<a href="http://www.mediafire.com/?4dchcj5w6bagx42" target="_blank">http://www.mediafire.com/?4dchcj5w6bagx42</a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
Hope it helps.</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
Regards,</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
Mohit P. Tahiliani</div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Acknowledgements</b>: I would like to Thank <b>Chirag J. Raval</b> and <b>Vaidehi S. Panwala</b> 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.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Very Important!!! Please Note: </b><br />
<b>(1) </b>The DSDV modifications are still under review and the patch has been verified with only few TCL scripts. Please report any bugs if encountered.<br />
<b>(2)</b> 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).<br />
<b>(3)</b> 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. </div>
</div>
</span></div>
</div>
</span></span></div>
</div>Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com19tag:blogger.com,1999:blog-2676809952989108356.post-53768571331996731942010-05-14T10:40:00.001+05:302010-05-14T10:41:39.922+05:30NS-2.35 on Ubuntu 9.04Hello,<br />
<br />
<div style="text-align: justify;">
I tried compiling ns-allinone-2.35-RC4 on Ubuntu 9.04 and it works! No patches were required.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The installation procedure is the same.</div>
<br />
<div style="text-align: justify;">
1. Download <a href="http://www.isi.edu/nsnam/dist/release/ns-allinone-2.35-RC4.tar.gz" target="first_window">ns-allinone-2.35-RC4</a>.</div>
<br />
2. Untar the downloaded folder.<br />
<br />
3. Go in ns-allinone-2.35-RC4 directory.<br />
<br />
4. Give the following command: <b>./install</b><br />
<br />
<div style="text-align: justify;">
5. After the installation is successfully completed, set the paths properly which will be provided at the end of the installation procedure.</div>
<br />
6. Go in ns-2.35 directory.<br />
<br />
<div style="text-align: justify;">
7. Start validation by giving following command: <b>./validate</b></div>
<br />
Once the validation is over you are done with installation procedure!<br />
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. TahilianiMohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com2tag:blogger.com,1999:blog-2676809952989108356.post-81617184877757329332010-05-11T12:50:00.002+05:302010-05-11T12:55:30.848+05:30DCCP patches for NS-2<div style="text-align: justify;">
Datagram Congestion Control Protocol (DCCP) is a message oriented transport layer protocol. It implements reliable connection setup, teardown, flow-based semantics, congestion control as in TCP but does not provide reliable in-order delivery of packets. It is because this protocol is used for applications that have strict timing constraints on the delivery of data.</div>
<br />
-- From <a href="http://en.wikipedia.org/wiki/Datagram_Congestion_Control_Protocol" target="first_window">Wikipedia</a>, the free encyclopedia.<br />
<br />
<div style="text-align: justify;">
Various patches for DCCP have been designed for NS-2 depending on various versions of NS-2. You can download the patches from the links given below:</div>
<br />
<b>DCCP Patch for ns-2.26:</b> Patch given for ns-2.31 includes the patch for ns-2.26 as well.<br />
<br />
<b>DCCP Patch for ns-2.28:</b> <a href="http://eugen.dedu.free.fr/ns2/dccp-ns2.28.patch" target="first_window">http://eugen.dedu.free.fr/ns2/dccp-ns2.28.patch</a><br />
<br />
<b>DCCP Patch for ns-2.29:</b> <a href="http://eugen.dedu.free.fr/ns2/dccp-ns2.29.patch" target="first_window">http://eugen.dedu.free.fr/ns2/dccp-ns2.29.patch</a><br />
<br />
<b>DCCP Patch for ns-2.31:</b> <a href="http://eugen.dedu.free.fr/ns2/dccp-ns2.31.patch" target="first_window">http://eugen.dedu.free.fr/ns2/dccp-ns2.31.patch</a><br />
<br />
<b>DCCP Patch for ns-2.33:</b> <a href="http://www.nicta.com.au/people/mehanio/nsmisc/ns-233-dccp-1.patch" target="first_window">http://www.nicta.com.au/people/mehanio/nsmisc/ns-233-dccp-1.patch</a><br />
<br />
<b>DCCP Patch for ns-2.34:</b> <a href="http://eugen.dedu.free.fr/ns2/dccp-ns2.34.patch" target="first_window">http://eugen.dedu.free.fr/ns2/dccp-ns2.34.patch</a> or <a href="http://sourceforge.net/projects/dccp-ns/files/" target="first_window">http://sourceforge.net/projects/dccp-ns/files/</a><br />
<br />
<b>DCCP Patch for ns-2.35:</b> <a href="http://sourceforge.net/projects/dccp-ns/files/" target="first_window">http://sourceforge.net/projects/dccp-ns/files/</a><br />
<br />
<b>DCCP Patch compatible with MobiWAN:</b> <a href="http://www.nicta.com.au/__data/assets/file/0003/16869/ns-233-dccp_mobiwan-1.patch" target="first_window">http://www.nicta.com.au/__data/assets/file/0003/16869/ns-233-dccp_mobiwan-1.patch</a><br />
<br />
Thanks to <b>Eugen Dedu, Sidney Doria and NICTA</b> for designing and making these patches available for ns-2 community.<br />
<br />
The official links where these patches and more details about the same can be obtained are as given below:<br />
<br />
1) <a href="http://eugen.dedu.free.fr/ns2/" target="first_window">http://eugen.dedu.free.fr/ns2/</a><br />
<br />
2) <a href="http://sourceforge.net/projects/dccp-ns/files/" target="first_window">http://sourceforge.net/projects/dccp-ns/files/</a><br />
<br />
3) <a href="http://www.nicta.com.au/people/mehanio/nsmisc" target="first_window">http://www.nicta.com.au/people/mehanio/nsmisc</a><br />
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. Tahiliani<br />
<br />
<br />
<br />Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com6tag:blogger.com,1999:blog-2676809952989108356.post-68849923124487218492010-05-07T11:01:00.000+05:302010-05-07T11:01:42.486+05:30NS-2.35 Released!<div style="text-align: justify;">
The latest version of ns-2: ns-2.35 has been released.</div>
<br />
<a href="http://www.isi.edu/nsnam/dist/release/ns-allinone-2.35-RC4.tar.gz" target="first_window"><span class="Apple-style-span" style="font-size: x-large;">Download ns-allinone-2.35</span></a><br />
<br />
<div style="text-align: left;">
The official website can be found on this link: <a href="http://nsnam.isi.edu/nsnam/index.php/Roadmap#Release_schedule" target="first_window">http://nsnam.isi.edu/nsnam/index.php/Roadmap#Release_schedule</a></div>
<br />
<div style="text-align: justify;">
The download link given above is of ns-allinone-2.35-RC4 package. The platform support is yet to be tested.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
But ns-allinone-2.35-RC2 has been tested on Ubuntu Karmic, Ubuntu 8.04, Fedora 12, etc.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For more information please visit the official website <a href="http://nsnam.isi.edu/nsnam/index.php/Roadmap#Release_schedule" target="first_window">here</a>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Hope it helps.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Regards,</div>
<div style="text-align: justify;">
Mohit P. Tahiliani</div>Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com5tag:blogger.com,1999:blog-2676809952989108356.post-12668533836780508042010-04-24T16:18:00.005+05:302010-04-24T16:23:01.958+05:30Mobility Models for NS-2<div style="text-align: justify;">
<span class="Apple-style-span"><span class="Apple-style-span" style="font-size: x-large;">Bonnmotion:</span></span><br />
<span class="Apple-style-span">Mobility scenario generation & analysis tool</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Bonnmotion is a Java Software developed by the Communication Systems Group at the Institute of Computer Science 4 of the University of Bonn, Germany. This tool creates and analyses mobility scenarios.<br />
<br />
The scenarios generated by Bonnmotion can also be exported for network simulator - 2 (ns-2), glomosim/qualnet, cooja and mixim.</div>
<br />
<div style="text-align: justify;">
Following mobility models are supported by Bonnmotion:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
1. Random-Waypoint Model</div>
<div style="text-align: justify;">
2. Gauss-Markov Model</div>
<div style="text-align: justify;">
3. Manhattan Grid Model</div>
<div style="text-align: justify;">
4. Reference Point Group Mobility Model</div>
<div style="text-align: justify;">
5. Disaster Area Model</div>
<div style="text-align: justify;">
<br /></div>
Download latest verison - <span class="Apple-style-span"><a href="http://net.cs.uni-bonn.de/fileadmin/ag/martini/projekte/BonnMotion/src/bonnmotion-1.4.zip" target="first_window"><span class="Apple-style-span" style="font-size: x-large;">Bonnmotion v1.4</span></a></span><br />
<br />
<div style="text-align: justify;">
For more information on Bonnmotion such as documentation, FAQs, Feedback and updates, please visit the official webpage of Bonnmotion on the link given below:<br />
<a href="http://net.cs.uni-bonn.de/wg/cs/applications/bonnmotion/" target="first_window">http://net.cs.uni-bonn.de/wg/cs/applications/bonnmotion/</a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Kindly Note</b>: The material provided above is taken from the same <a href="http://net.cs.uni-bonn.de/wg/cs/applications/bonnmotion/" target="first_window">official webpage</a> of Bonnmotion.</div>
<div style="text-align: justify;">
<br /></div>
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. TahilianiMohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com9tag:blogger.com,1999:blog-2676809952989108356.post-16309320954423318682010-04-16T16:21:00.000+05:302010-04-16T16:21:33.723+05:30Application Layer Simulations on NS-2A framework named "ns2-app" is developed and maintained by <a href="http://xizhizhu.blogspot.com/" target="first_window">Xizhi Zhu</a> to simplify the application layer simulations on NS-2.<br />
<br />
This framework has been tested on ns-2.33.<br />
<br />
The source code can be downloaded from the following link:<br />
<br />
<span class="Apple-style-span" style="font-size: x-large;"><a href="http://ns2-app.googlecode.com/files/ns2-app-0.02.tar.bz2" target="first_window">Download ns2-app-0.02.tar.bz2</a></span><br />
<br />
<div style="text-align: justify;">
After downloading, untar the downloaded folder in ~/ns-2.33 directory and recompile NS-2.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For more details on installation and the possible errors, please visit the official website of ns2-app <a href="http://code.google.com/p/ns2-app/" target="first_window">here</a>.</div>
<div style="text-align: justify;">
<br /></div>
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. TahilianiMohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com37tag:blogger.com,1999:blog-2676809952989108356.post-53501591830992168272010-04-13T14:48:00.004+05:302012-01-21T15:13:30.971+05:30Installing ns-2.1b9a on Fedora 8 / Ubuntu 9.04<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<b>Kindly Note:</b> Before you start installing ns-2.1b9a on Fedora 8/Ubuntu 9.04 please make sure you have installed gcc-3.3 and g++-3.3.</div>
<br />
<div style="text-align: justify;">
The patch required to install ns-2.1b9a on Fedora 8/Ubuntu 9.04 is designed and is available on the following link:</div>
<br />
<table border="0" cellpadding="0" cellspacing="0" style="background-color: #5d7cba; border-color: #353535; border-style: solid; border-width: 1px; color: #0; font-family: Arial, Helvetica, sans-serif; font-size: 11px; padding: 0px;"><tbody>
<tr style="background-color: white;"><td align="center" style="padding: 5px;"><a href="http://www.esnips.com/doc/4392e5f2-6c95-43d6-b174-3e5b461d34c2/ns21b9a" target="first_window"></a></td></tr>
<tr style="background-color: white;"><td align="center" style="padding: 5px;"><strong><a href="http://www.mediafire.com/?4yy7dlrgub7cj6b" style="color: #333333;" target="_blank">ns21b9a.patch</a></strong></td></tr>
<tr><td style="color: white; font-size: 9px; padding: 5px;" valign="bottom"></td></tr>
</tbody></table>
<br />
<div style="text-align: justify;">
Following are the steps to install ns-2.1b9a on Fedora 8/Ubuntu 9.04:</div>
<div style="text-align: justify;">
<br /></div>
1. Download <a href="http://www.isi.edu/nsnam/dist/ns-allinone-2.1b9a-gcc32.tar.gz">ns-allinone-2.1b9a-gcc32.tar.gz</a><br />
<br />
2. Download above given <a href="http://www.mediafire.com/?4yy7dlrgub7cj6b" target="_blank">ns21b9a.patch</a><br />
<br />
3. Untar ns-allinone-2.1b9a-gcc32.tar.gz. You will get a folder named ns-allinone-2.1b9a<br />
<br />
4. Paste <b>ns21b9a.patch</b> in this folder and give the following command via terminal<br />
<br />
<b>patch -p1 < ns21b9a.patch</b><br />
<br />
5. Then give the following command<br />
<br />
<b>./install</b><br />
<br />
You are done with it!<br />
<br />
If you encounter any problem in downloading the patch, please follow this link:<br />
<br />
<a href="http://www.mediafire.com/?4yy7dlrgub7cj6b" target="_blank">http://www.mediafire.com/?4yy7dlrgub7cj6b</a><br />
<br />
Hope it helps.<br />
<br />
Regards,<br />
Mohit P. Tahiliani<br />
<br />
<br /></div>Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com15tag:blogger.com,1999:blog-2676809952989108356.post-65601984982093566762010-04-12T11:13:00.003+05:302012-01-21T15:16:28.728+05:30Revised: Adding Multiple Interface Support in NS-2<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
After designing the patch provided in my previous blog <a href="http://mohittahiliani.blogspot.com/2010/03/adding-multiple-interface-support-in-ns.html" target="first_window">"Adding Multiple Interface Support in NS-2"</a>, I tried to design an example tcl script (with reference to Chapter 6 in the document prepared by Ramon Aguero Calvo and Jesus Perez Campo) to verify the working of the patch.</div>
<br />
<div style="text-align: justify;">
I found few errors and later found there was a problem with mac-802_11.cc file. I have corrected the error and the modified patch can be found on the link given below:</div>
<br />
<table border="0" cellpadding="0" cellspacing="0" style="background-color: #5d7cba; border: 1px solid rgb(53, 53, 53); font-family: Arial,Helvetica,sans-serif; font-size: 11px; padding: 0px;"><tbody>
<tr style="background-color: white;"><td align="center" style="padding: 5px;"><a href="http://www.esnips.com/doc/129dd331-f019-4d3f-9643-9642d5493e41/multi-interface%28ns-2.33%29" target="first_window"></a></td></tr>
<tr style="background-color: white;"><td align="center" style="padding: 5px;"><b><a href="http://www.mediafire.com/?au0dce1r3ct0x7t" style="color: #333333;" target="_blank">multi-interface(ns...</a></b></td></tr>
<tr><td style="color: white; font-size: 9px; padding: 5px;" valign="bottom"></td></tr>
</tbody></table>
<br />
Following are the steps to be followed to apply above given patch to ns-2.33:<br />
<br />
1. Download <a href="http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.33/ns-allinone-2.33.tar.gz/download" target="first_window">ns-allinone-2.33.tar.gz</a><br />
<br />
2. Download <a href="http://www.mediafire.com/?au0dce1r3ct0x7t" target="_blank">multi-interface.patch</a><br />
<br />
3. Unzip ns-allinone-2.33.tar.gz. You will get a folder named ns-allinone-2.33.<br />
<br />
4. Paste the downloaded multi-interface.patch in this folder.<br />
<br />
5. Give the following command: <br />
<br />
<b>patch -p1 < multi-interface(ns-2.33).patch</b><br />
<br />
6. Then give <b>./install</b><br />
<br />
<div style="text-align: justify;">
If you have already installed copy of ns-allinone-2.33 then follow the below given steps to apply multi-interface patch.</div>
<br />
1. Paste the downloaded multi-interface.patch in ns-allinone-2.33 folder.<br />
<br />
2. Give the following command: <br />
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px;">
<b>patch -p1 < multi-interface(ns-2.33).patch</b></div>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px;">
3. Go in ns-allinone-2.33/ns-2.33 directory.</div>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px;">
4. Give the following commands:</div>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px;">
<b>./configure</b></div>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px;">
<b>make clean</b></div>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px;">
<b>make</b></div>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px;">
<b>make install</b></div>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px;">
You are done with it!</div>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px; text-align: justify;">
Example TCL scripts to verify the working of the patch can be found on the link given below:</div>
<br />
<table border="0" cellpadding="0" cellspacing="0" style="background-color: #5d7cba; border: 1px solid rgb(53, 53, 53); font-family: Arial,Helvetica,sans-serif; font-size: 11px; padding: 0px;"><tbody>
<tr style="background-color: white;"><td align="center" style="padding: 5px;"><a href="http://www.esnips.com/doc/617613c8-cc47-429e-a84e-f9dc258062c3/Multi-Interface-TCL-Scripts.tar" target="first_window"></a></td></tr>
<tr style="background-color: white;"><td align="center" style="padding: 5px;"><b><a href="http://www.mediafire.com/?avpbigc1ynyjj7d" style="color: #333333;" target="_blank">Multi-Interface TC...</a></b></td></tr>
<tr><td style="color: white; font-size: 9px; padding: 5px;" valign="bottom"></td></tr>
</tbody></table>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px; text-align: justify;">
<b>Kindly Note:</b> 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.</div>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px;">
<div style="text-align: justify;">
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.</div>
<br />
<div style="text-align: justify;">
If you encounter any problem in downloading the patch from the link given above, please follow this link:</div>
<br />
<a href="http://www.mediafire.com/?au0dce1r3ct0x7t" target="_blank">http://www.mediafire.com/?au0dce1r3ct0x7t</a><br />
<br />
<div style="text-align: justify;">
If you encounter any problem in downloading example tcl scripts, please follow this link:</div>
<br />
<a href="http://www.mediafire.com/?avpbigc1ynyjj7d" target="_blank">http://www.mediafire.com/?avpbigc1ynyjj7d</a><br />
<br /></div>
<div style="margin: 0px;">
Hope it helps.</div>
<div style="margin: 0px;">
<br /></div>
<div style="margin: 0px;">
Regards,</div>
<div style="margin: 0px;">
Mohit P. Tahiliani</div>
<br />
<span class="Apple-style-span" style="font-family: Arial;"><b><span class="Apple-style-span" style="font-size: x-large;">Related Blogs:</span></b></span><b><span class="Apple-style-span" style="font-size: x-large;"> </span></b><span class="Apple-style-span" style="font-family: Arial; font-size: 13px;"><br /></span><span class="Apple-style-span" style="font-family: Arial;"><br /><a href="http://mohittahiliani.blogspot.com/2010/06/modified-dsdv-for-multiple-interface.html" target="first_window"></a></span>
<span class="Apple-style-span" style="font-family: Arial;"><a href="http://mohittahiliani.blogspot.com/2010/06/modified-dsdv-for-multiple-interface.html" target="first_window">Modified DSDV for Multiple Interface Support in NS-2</a></span><br />
<br /></div>Mohit P. Tahilianihttp://www.blogger.com/profile/12307336778318863317noreply@blogger.com32