The Network Simulator ns-2: Building Ns version 2 The Network Simulator: Building Ns This page describes ns version 2. What hardware is needed? To build ns you need a computer and a C compiler. We develop ns on several kinds of Unix (FreeBSD, Linux, SunOS, Solaris), so it installs smoothest there, but it should run on an Posix-like computer, possibly with some tweaking. Ns also builds and runs under Windows, see the dedicated. Simple scenarios should run on any reasonable machine, but very large scenarios benefit from large amounts of memory.
Ns is a discrete event simulator targeted at networking research. Ns provides substantial support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks. Guide to Ns2 Installation Procedure,explaining in step by step for better understanding. Software & OS.
Ns is fairly large. The allinone package requires about 320MB of disk space to build. Building ns from pieces can save some disk space. (If multiple people want to share files in the ns build tree to save space, you may download a, then follow the instruction in its README. There is from CS599b class of USC. You may also find discussions in the ns-users mailing list archive useful.) How do I get the software? There are two ways to build ns:.
If you just want to try it out quickly, you might try. If you want to do C-level developement, or save download time or disk space, or have trouble with all-in-one you should build it As of November, 2005, ns is available at.
Important: Please check the after you finish installation! Ns depends on several externally available components. Below is a summary of where to get them and where they may already be (if you're a VINT developer). Since the components depend on each other, you should build them in the listed order. Tcl/Tk Download source:. A modestly up to date Tcl/Tk version.
web page:. Note that while more up to date versions of Tcl/Tk are available and may work, we have only tested up through version 8.5.10. Otcl Download source:.
(package 'otcl'). web page:. TclCL (the package formerly known as libTcl) Download source:. The latest version.
(package 'tclcl'). web page:. Ns-2 Download source:. (ns-2.35 released Nov 4 2011).,. (module 'ns-2').
There may be known problems with the current version of ns; please check the for patches. Nam-1 (optional) Download source:.
(nam-1.15 released Nov 4 2011).,. (module 'nam-1'). web page: You can find pre-built binary of nam-1.11 for Linux/freeBSD from the. Xgraph (optional, but needed for test suites) Download source:, or by (module 'xgraph'). (This version is maintained by the ns maintainers and includes portability fixes over the.) perl (optional, but needed for test suites) Download source:; web page: Note that version 5.003 or later is required. Tcl-debug (optional, available for Tcl debugging help) Download source:; web page:. This version will work with Tcl/Tk 8.0 release.
Dmalloc (optional, available for memory debugging) Download source:. Web page:; specify -with-dmalloc during configure to include.
Sgb2ns conversion program (optional, needed to convert GT-ITM output to ns-2 format) Download source:. For more info on GT-ITM topology generators see. Tiers2ns conversion program (optional, needed to convert Tiers output to ns-2 format) Download source:. For more info on Tiers topology generators see.
Cweb and sgb source code (optional, required to create sgb-library that is used by gt-itm and sgb2ns programs) Download cweb source from Download sgb source code from VINT developers at ISI can find all of these packages in /nfs/filb2/public/pkgs. Building it From Sources These instructions are for Unix only. For Windows, the is recommended. Go for Windows instructions. Fetch the source code as described above. Unpack OTcl, TclCL and ns source into the same top level directory.
build OTcl, TclCL and ns. cd into the OTcl directory. run./configure. run make.
cd into the TclCL directory. run./configure. run make.
cd into the ns directory. run./configure. run make For Unix, a simple./configure will try to auto-detect the packages ns needs to build. Auto-detection searchs sensible places (like /usr/local) and the directory above current direcory.
If you have packages installed elsewhere you can explicitly tell ns where something is with options like -with-tcl=/your/path/to/tcl. Run./configure -help for a complete list of options.
Code. Verify that it built correctly and runs:./validate Ns-allinone is a package which contains equired components and some optional components used in running ns. The package contains an 'install' script to automatically configure, compile and install these components. After downloading, run the install script. If you haven't installed ns before and want to quickly try ns out, ns-allinone may be easier than getting all the pieces by hand.