Wednesday, October 19, 2011

Installing Network Simulator (NS2) For Windows


"Network Simulator (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". You may find more info about NS at Information Science Institue's homepage.Here you could find concise notes about how to use NS on Windows. Downloading, Installing, and Compiling NS has been described and some useful related tools has been introduced.

Downloads Needed

If you want to just install and run NS on windows without having to compile the source code the following list includes the minimum things to download:
  • NS Binary For Windows (32-bit)
  • ActiveTCL
  • Cygwin
  • NAM (Newtoek Animator)

Download Links For Ns2 installation on Windows


NAM is a Tcl/TK based animation tool for viewing network simulation traces and real world packet traces. ActiveTCL is binary build of Tcl for Windows from ActiveState. Cygwin is a UNIX environment, developed by Red Hat, for Windows. If you want to install, compile and run NS on windows the following list includes the minimum things to download:
  • NS Source Code For Windows
  • Cygwin
  • NAM (Newtoek Animator)
Installing NS2 in windows with Cygwin

You may follow these steps to install NS on Windows:

Make a new folder on hard disk (Let's call it D:\NsProjects)
Copy downloaded NS binary for windows (e.g. ns-2.1b9a-win32.exe) to D:\NsProjects and rename it as ns.exe
Copy downloaded NS binary for windows (e.g. nam-1.0a11a-win32.exe) to D:\NsProjects and rename it as nam.exe
Go to downloaded Cyqwin directory and install it. (Run setup.exe and select "Install from local directory")
Go to downloaded ActiveTCL directory and install it (e.g. run ActiveTcl8.3.4.2-1-win32-ix86.exe)
Restart computer after installing ActiveTCL. It may not ask for restarting but you have to do this for initializing some of the system environment variables.
Create a sample TCL script for NS. You may find many sample TCL scripts in NS manuals. For example get this one (example2.tcl). Copy the tcl script to D:\NsProjects.

Now you have all of the required files. Follow these steps for running NS:

Run Cygwin
In Cygwin window use "cd" commands and go to D:\NsProjects (You may use "mount" command without any parameter to have the list of the mounted file systems. e.g. you may go to /cygdrive/D/NsProjects)
In Cygwin window run "ns example2.tcl"

How to compile

For compiling with VC6 read This
For compiling with VC7 read This




No comments:

Post a Comment

Counter

blogger analytics