Accelerate NS-2 scheduler
Download: Scheduler-patch
This is a patch that can speed up the NS-2 scheduler by improving the Calendar Queue data structure in the scheduler. Especially, it can help to speed up many simulations with high speed long distance network. Some simulations that need one day with the original NS2 scheduler can now be finished in an hour.
- Copy the patch to ns-allinone-2.28/ns-2.28 (or ns-2.29)
- In the directory of ns-allinone-2.28/ns-2.28 (or ns-2.29) , run: make clean
- In the directory of ns-allinone-2.28/ns-2.28 (or ns-2.29), run: patch -p1 <>
- (Optional) delete the patch file by rm ns-scheduler.patch
- recompile the ns2 by make and make install
Many thanks to the author: David X. Wei
Read More......
Posted by elly | Permalink | | 2 comments
Error: nam: command not found
Solution:Read More......
In nam directory (inside the ns-allinone)use the following command:
./configure and make
When compiling, you would encounter a series of errors. Erase for example, "abc::" from file and
in the line with error could solve the problem.
By solving all the errors, you could execute nam with the command:
nam
Posted by elly | Permalink | | 0 comments
Installing NS-MIRACLE to NS-2.33
Download: NS-MIRACLE-1.2.2
Download: Paper on NS-MIRACLE-1.2.2
NS-MIRACLE: Multi-InteRfAce Cross-Layer Extension library for the Network Simulator
Installation of NS-MIRACLE:
1. Unpack the nsmiracle package at /home/username and cd into the newly created directory:
Command:
tar xzf nsmiracle-1.2.2.tar.gz
cd nsmiracle-1.2.2
2. In the /nsmiracle-1.2.2, do the following:
Command:
./configure --with-ns-allinone=/home/username/ns-allinone-2.33 --prefix=/home/username --disable-static --with-dei80211mr=/home/username/ns-allinone-2.33/dei80211mr-1.1.4
3. After that, execute as following:
Command:
make
make install
4. Lastly, check that your installed NS-MIRACLE is working by running the example found in /home/username/nsmiracle-1.2.2/samples
Command:
cd samples
ns link_with_errors_cbr.tcl
You should get the result as shown if NS-MIRACLE is installed successfully:
Simulating........................................done!
Packet Error Ratio : 0.050000
Throughput : 68360.897567
Tracefile : /tmp/link_with_errors_cbr.tcl.tr
NOTE:
- remember to adapt all paths to your needs, unless you're using /home/username.
- make sure that the tests run by ./configure have been successful, in particular the tests for ns-allinone
- after running make install, make sure that the path in which library have been installed is in your LD_LIBRARY_PATH environment variable.
Posted by elly | Permalink | | 5 comments
Labels: ns-2 | ns-miracle
Installing NS-2 in Fedora 10
Download: ns-allinone-2.33
I have used VMWARE with Fedora 10 to install NS-2 for my convenience. The steps are as below:
Pre-installation NS-2:
1. Make sure FEDORA 10 is updated completely at the autoupdate.
2. Have the following install at TERMINAL. You must be the "root" to do this:
yum install autoconf
yum install automake
yum install gcc-c++
yum install libX11-devel
yum install xorg-x11-proto-devel
yum install libXt-devel
yum install libXmu-devel
yum install tk
yum install tcl
yum install make
yum install perl
yum install gnuplot
Installation for NS-2 in FEDORA 10:
1. Unzipped NS-2.33 file:
tar -xvzf ns-allinone-2.33.tar.gz
2. Go into ns-2.33 directory:
cd ns-allinone-2.33
3. Install ns-2.33
./install
4. Set environment:
gedit ~/.bashrc
Replace the following to your .bashrc file, double check your own installation path and version. Set the environment at "cd /home/username" as a user and not the "root":
# .bashrc5. If your environment is set properly, you should be able to run the command "ns" and get the result "%".
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
# LD_LIBRARY_PATH
OTCL_LIB=/home/ellysoo/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/ellysoo/ns-allinone-2.33/lib
X11_LIB=/ellysoo/X11R6/lib
USR_LOCAL_LIB=/home/ellysoo/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/ellysoo/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/ellysoo/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/ellysoo/ns-allinone-2.33/bin:/home/ellysoo/ns-allinone-2.33/tcl8.4.18/unix:/home/ellysoo/ns-allinone-2.33/tk8.4.18/unix
NS=/home/ellysoo/ns-allinone-2.33/ns-2.33/
NAM=/home/ellysoo/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM
6. Validate your ns as followed:
./validate Read More......
Posted by elly | Permalink | | 0 comments
Installing Tracegraph in Fedora 10 with NS-2
As referred to: http://ns-2.blogspot.com
I have followed the steps below for Tracegraph installation:
Download Tracegraph for linux: Tracegraph202
Download Matlab for tracegraph: Matlab
Download my .bashrc file: .bashrc
Installation instructions on Linux:
1)Download tracegraph and mglinstaller from the webpage
Check Trace graph download page: http://www.tracegraph.com/download.html
Choose Linux version and download mglinstaller.
2) At the directory where you save the tracegraph and mglinstaller.
Command: tar -xvzf tracegraph202.linux.tar.gz
3) Command: gunzip mglinstaller.gz
4) Command: sh mglinstaller
5) When asking for location folder, set /home/user1/mgl as the location
6) set the environment path variable by
Command: gedit ~/.bashrc
In .bashrc file, add in the following:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user1/mgl/bin/glnx86
7) Check the environment,
Command: printenv LD_LIBRARY_PATH
8) Go to directory /home/user1/Tracegraph202 and run trgraph.
Command: ./trgraph
Errors encounter when installing:
1) ./trgraph: error while loading shared libraries: libmwcl.so: cannot open shared object file: No such file or directory
Solution: LD_LIBRARY_PATH is not defined properly. Check with printenv and set the environment again.
2) ./trgraph: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
solution: yum install libXp.so.6
Installation instructions on Windows:
1)Download tracegraph and mglinstaller from the page make sure it is windows version http://www.tracegraph.com/download.html
2)unzip tracegraph202.zip to say, D:\
3)execute mglinstaller.exe, when it asks for directory name, enter D:\tracegraph202
4) add D:\tracegraph202\bin\win32 to your environment PATH
5)how to add to environment PATH??
right click on Mycomputer and select properties
From properties select Advanced tab
Select environment path variables
Select PATH and add your path to it
Thats it tracegraph is now ready!!
This is the procedure i followed while installing tracegraph on both windows and linux (if you dont have matlab installed on your machine.)
Posted by elly | Permalink | | 7 comments
Labels: ns-2 | Tracegraph
Refresh my mind on NAM error in FEDORA 10
Download: Patch
Error when executing nam in Fedora 10 terminal:
nam:
[code omitted because of length]
: no event type or button # or keysym
while executing
"bind Listbox
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
invoked from within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
bind Listbox
%W yview scroll [expr {- (%D)}] units
}
bind Li..."
After installing Fedora 10 with NS-2 two months back, the solution seems to have been faded from my mind. Totally cannot recall. Now my friend is having this error, yet I have forgotten how to solve it. Should have record all the solution here for reference last time but I have started this blog kinda late. Hope will soon find the solution and definitely will update in here this time!
Solution:
PS: For my case, I have to be the "root" so that ./install will compile my ns-2 completely.
OR
Posted by elly | Permalink | | 2 comments
First touch on NS-2
Download: NS-2.33
After done some literature review, since like NS-2 would be the best network simulation tool in my research. As most people have used it all this time. Therefore, I have tried to install the latest NS-2.33 in cygwin because my operating system is in Windows XP (in Virtual PC).
Here are the steps to install NS-2 in virtual pc with cygwin:
Download virtual PC here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=04d26402-3199-48a3-afa2-2dc0b40a73b6&displaylang=en
Download Window XP OS for virtual PC here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&DisplayLang=en
Download Cygwin here:
http://www.cygwin.com/
Download latest NS-2 here:
http://sourceforge.net/projects/nsnam/
With all these downloaded, you are all set to go to install NS-2 in your virtual pc.
If the link is broken, you may just search for the file with google search.
Posted by elly | Permalink | | 2 comments
Labels: cygwin | ns-2 | virtual pc
I should have blog this earlier...
I should have blog this earlier about every obstacles and steps that have been taken upon my NS-2 experience. I hope now is still not too late yet. I hope to give this blog updated with every problems that I have faced when installing NS-2, running NS-2 and progressing with my research throughout my postgraduate studies.
Besides having this blog as a note to myself, hopefully the contents of the blog can serve as an aid to others who faced the similar problem as me. I have found blog is the most informative way for me to learn the way to start NS-2 and has helped me to solve some of my problem. Therefore, I have decided to write in my blog too to share with people and gained valuable advice from my reader.
Happy reading! That all for a short opening post. ^ ^
Posted by elly | Permalink | | 4 comments
Labels: ns-2