the current release is ns3.10 (January 5, 2011) and can be downloaded from DOWNLOAD NS3.10
Step 1: Download ns3.10 and save it some where , but on the same machine where you want to install (Just Kidding )
Step 2: open the terminal and go to the folder where ns3.10 tar file is.
Step 3: from the terminal run :
$tar -xvf ns-allinone-3.10.tar.bz2you can provide some options to build.py but as a newbie use the default one
$cd ns-allinone-3.10
$./build.py
When the build process get over (it will take some time), type
$cd ns-3.10and now we will validate our installation
$./test.pythe out put of this will be some thing like this:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (2.010s)
PASS: TestSuite lte-bearer
PASS: TestSuite lte-propagation-loss-model
PASS: TestSuite wimax-fragmentation
PASS: TestSuite lte-phy
…………..PASS: Example examples/tcp/tcp-nsc-lfnPASS: Example examples/wireless/wifi-ap.pyPASS: Example src/contrib/flow-monitor/examples/wifi-olsr-flowmon.py168 of 168 tests passed (168 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)
Step 4: Now our ns3 is installed and ready to run sample programs.
right now we are in directory “ns-3.10″
from terminal :
$ cp examples/tutorial/first.cc scratch/myfirst.cc
$./waf
this time waf will give some thing like this:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’‘build’ finished successfully (15.900s)
$ ./waf –run myfirstWaf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’‘build’ finished successfully (1.353s)Sent 1024 bytes to 10.1.1.2Received 1024 bytes from 10.1.1.1Received 1024 bytes from 10.1.1.2
Congratulations !! NS3 is installed and running successfully.
Lets try some other example.
Again go to the terminal and type
$cp examples/wireless/ofdm-validation.cc scratch/myofdm.cc$./waf
out put will be:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’[1330/1502] cxx: scratch/myofdm.cc -> build/debug/scratch/myofdm_2.o[1500/1502] cxx_link: build/debug/scratch/myofdm_2.o -> build/debug/scratch/myofdmWaf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’‘build’ finished successfully (5.842s)
now run the simulation:
$ ./waf –run myofdm
this time output will be:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’‘build’ finished successfully (1.448s)OfdmRate6MbpsOfdmRate9MbpsOfdmRate12MbpsOfdmRate18MbpsOfdmRate24MbpsOfdmRate36MbpsOfdmRate48MbpsOfdmRate54Mbps
So, this way you can try different examples, and get an introduction of ns3.
Note: As I am using Fedora 14 Complete Installation, I have not
feel the need to resolve the dependencies, but if you will come across
any error then please make me know, so that I will extend the post to
cover the dependencies problems, and to other distributions also like
ubuntu etc.
Enjoy Ns3 , soon, I will come back with tutorials on ns3 and
dependencies resolution for ns3 (only if some will mention the errors
unable to download: 404 page not found
ReplyDeletecan any one help me what to do???
This comment has been removed by the author.
DeleteI am getting an error of "no such option : -r" at step 5
ReplyDelete