2011年1月31日星期一

Ns2 Installation on Windows ZZ

http://paulson.in/?p=49

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 )

ns2

Select the root Install directory as “C\cygwin”. Don’t Change it.Then Click Next

ns2

Select the local package directory.Don’t change the default path

ns2 installation on windows

Select your network connection and click Next

ns2 installation on windows

Select any one server from the list and click Next

ns2 on windows

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

ns2

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

ns2

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

ns2 on windows

Press “y” whenever asked to proceed

ns2 on windows

After installing, copy the ns2.sh file to “/etc/profile.d” folder

cp /usr/local/ns-allinone-2.34/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” or from “C:\CYGWIN\usr\X11R6\bin\startxwin.bat”.

Press unblock button when asked by the Windows Firewall.

ns2 on windows

Now u can execute your ns2 programs from this terminal.

ns filename.tcl

NOTE : For any installation problems, read the comments for this blog.

没有评论:

发表评论