You are on page 1of 9

Ns2 Installation on Windows

I had heard from my friends that installing ns2 on windows is like a nightmare.Actually it is not so difficult to install NS2 on windows.In this article I will show you how to install NS2.34 (latest version as for today)on Windows Vista SP1.You can install it on Windows XP also. Follow the below steps for an easy installation of NS2 on Windows Download the Cygwin setup from here Double Click the setup file.Click on the Next button and select Install from Internet.Then Click Next. ( NOTE : If you had already downloaded all the packages, select Install from Local Directory and specify the Local Package Directory path )

Select the root Install directory as C\cygwin. Dont Change it.Then Click Next

Select the local package directory.Dont change the default path

Select your network connection and click Next

Select any one server from the list and click Next

Click on the circled arrow between All and Install to change the Default value to Install. By doing we are going to install all packages in the Cygwin repository.ClickNext

It will take time n space to install all these packages.After the installation, Click Next

It will create a Cygwin shortcut on your Desktop. Now copy the NS2.34 setup from here Copy the ns-allinone-withpath-2.34.tbz file to C:\cygwin\usr\local Now click on the Cygwin shortcut on the Desktop.You will get a terminal window as in linux.Type the following command cd /usr/local/ tar -jxvf ns-allinone-withpath-2.34.tbz cd ns-allinone-2.34 Now install the NS2 package ./install

Press y whenever asked to proceed

After installing, copy the ns2.sh file to /etc/profile.d folder cp /usr/local/ns-allinone-2.29/paulson/.set/ns2.sh /etc/profile.d/. Then type the following command in the terminal source /etc/profile.d/ns2.sh Close the terminal Click the Start menu >All programs>Cygwin-X>Xwin-Server.It will open an xwin terminal.You can also drag n drop this to Desktop.Alternatively you can start the Xwin server from C:\cygwin\bin\startxwin.bat. Press unblock button when asked by the Windows Firewall.

Now u can execute your ns2 programs from this terminal. ns filename.tcl

You might also like