[go: up one dir, main page]

0% found this document useful (0 votes)
125 views3 pages

Install Ns 3

This document provides steps to install NS3 on Unix systems and describes three ways to enable or disable NS3 examples and tests: 1) Using the build.py script when initially building NS3, 2) Using the waf script after NS3 is built, or 3) Editing the .ns3rc configuration file after NS3 is built. The .ns3rc file allows persistent enabling of examples and tests.

Uploaded by

nayanazope24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views3 pages

Install Ns 3

This document provides steps to install NS3 on Unix systems and describes three ways to enable or disable NS3 examples and tests: 1) Using the build.py script when initially building NS3, 2) Using the waf script after NS3 is built, or 3) Editing the .ns3rc configuration file after NS3 is built. The .ns3rc file allows persistent enabling of examples and tests.

Uploaded by

nayanazope24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

STEPS TO INSTALL NS3 ON UNIX

1) Download ns3.19 version of ns3 from link http://www.cberendt.de/2014/01/ns-3.19on-fedora-20


The list of packages should be accurate for recent fedora 19/cent OS 6.4 release.
2) minimal requirements for C++
yum install gccgcc-c++ python
3) Minimal requirements for python
Yum install gccgcc-c++ python
Python-devel
Yum install mercurial
Yum install bzr
4) Am optional but recommended package(For improving some wireless model fidelity)
is GNU scientific library:
Yum install gslgsl-devel
5) A GTK-based configuration system
Yum install gtk2 gtk2-devel
6) Debugging
Yum install gdbvalgrind
7) Doxygen and related inline documentation
Yum install doxygengraphvizimageMagick
8) The ns-3 manual and tutorial are written in restructured text for sphinx(doc/tutorial,
doc/manual) and figures typically in dia :
Yum install python-spinxdiatexlivetexlive-latex
9) The ns cradle requires the flex lexical analyzer and bision parser generator
Yum install flex bison
10) To read pcap packet traces
Yum install tcpdump
11) Database setup for task
Yum install sqlitesqlite-devel
12) Xml-based version of the config store
Yum install libxml2-devel
13) Support for utils/check-style.py style check-program
Yum install uncrusitify
14) Support for MPI distributed simulation

Yum install openmpiopenmpi-devel


15) Support for openflowswitch
Yum install boost-devel
16) Support for ns3-pyviz visualizer
Sudo apt-get install graphvizgraphviz-devel
pygoocanvassudo easy-install pygraphviz

python-setuptool-devel

python-kiwi

17) Support for generating modified python bindings


Yum install cmake glibc-devel.i686 glibc-dlevel.x86-64
After installation We have used following commands for enabling/disabling ns3 Tests and
Examples,
There are 3 ways to enable/disable examples and tests in ns-3:
1. Using build.py when ns-3 is built for the first time
2. Using waf once ns-3 has been built
3. Using the ns-3 configuration file once ns-3 has been built
1.Enable/disable examples and tests using build.py
We can use build.py to enable/disable examples and tests when ns-3 is built for the first time.
By default, examples and tests are not built in ns-3.
From the ns-3-allinone directory, you can build ns-3 without any examples or tests simply by
doing:
$ ./build.py
If we would like build ns-3 with examples and tests, then do the following from the ns-3allinone directory:
$ ./build.py --enable-examples --enable-tests

2.Enable/disable examples and tests using waf


You can use waf to enable/disable examples and tests once ns-3 has been built.
By default, examples and tests are not built in ns-3.
From the top level ns-3 directory, you can build ns-3 without any examples or tests simply by
doing:
$ ./waf configure
$ ./waf build

If we would like build ns-3 with examples and tests, then do the following from the top level
ns-3 directory:
$ ./waf configure --enable-examples --enable-tests
$ ./waf build
Enable/disable examples and tests using the ns-3 configuration file
A configuration file, .ns3rc, has been added to ns-3 that allows users to specify whether
examples and tests should be built or not. You can use this file to enable/disable examples
and tests once ns-3 has been built.
When enabling disabling examples and tests, the precedence rules are as follows:
1. the enable-examples/disable-examples configure strings override any .ns3rc file
2. the enable-tests/disable-tests configure strings override any .ns3rc file
3. the .ns3rc file in the top level ns-3 directory is next consulted, if present
4. the system searches for ~/.ns3rc if the .ns3rc file was not found in the previous step
If none of the above exists, then examples and tests will not be built.
The maintained version of the .ns3rc file in the ns-3 source code repository resides in the utils
directory. The reason for this is if it were in the top-level directory of the repository, it would
be prone to accidental checkins from maintainers that enable the modules they want to use.
Therefore, users need to manually copy the .ns3rc from the utils directory to their preferred
place (top level directory or their home directory) to enable persistent enabling of examples
and tests.
Assuming that you are in the top level ns-3 directory, you can get a copy of the .ns3rc file
that is in the utils directory as follows:
$ cputils/.ns3rc .

You might also like