Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Complete guide for installation of cygwin and

ns2.35 on windows 7 with problems solution


With the name of allah who is almighty, I m first of
all thankful to engr gul zameen khan(my teacher)
by introducing me to ns2 and give me the task to
install ns2. I am thankful to GOD who help and
give strenght to me for accomplishing this task.
Hope it will help alot.

Nasirahmad B.S Telecom 7th sem


1

12/28/2014

Installing Cygwin 1.7.1


goto the link
http://www.cygwin.com/
Run the file setup.exe
you will get this, follow the same wizard
with
Keep hitting
next and
provide
directory
information

12/28/2014

1.
2.
3.
4.
5.

6.

click next in the wizard , click install from the


internet and next,
choose the dirctory where you want to install the
cygwin, click for all users, click next
select local package directory, place where you
have stored the setup
select your network connection, click on direct
connection and then next
select mirror site which is near to your area choose
the mirror country wise click this link
http://cygwin.com/mirrors.html
wait for launching till the package directory open
then select the following packeges to download
12/28/2014

1.
2.
3.
4.
5.
6.

Windows Use cygwin


Required package:
gcc4, gcc4-g++, gawk, tar, gzip, make, patch, perl,
w32api
Graphic package:
xorg-server, xinit, libX11-devel, libXmu-devel
For editor use following packages. I found these
best
Nano, vim

12/28/2014

Installing Cygwin 1.7.1


When you hit this page, choose the
required (e.g., gcc4) and optional
packages
Search the
package
name here

Click here it
will change
to install

(Repeat the process


For each package
Separately)
When you are done, hit next
5

12/28/2014

After packages downloads and installation (both are

automatically complete) you will se the cygwin icon


on the disktop
Hope you will get no problem when you follow the
same.

Congrates you have done successfully.

12/28/2014

Installing NS2.35
1.To download the new version follow this link
http://sourceforge.net/projects/nsnam/files/allinone/
ns-allinone-2.35/ns-allinone-2.35.tar.gz/download
1.Copy the downloded ns 2.35 file in cygwin/home.
(I have copy it in C:/cygwin/home through mouse)
2. Open Cygwin by clicking the icon on the desktop
3.Now write pwd without inverted commas it will
show your present working directory. ( I have got
like /home/lenovo).

12/28/2014

To enter into any directory simply write


$cd /home
;press enter home is the
directory name
$ls
; it will show the list of
containing files in yours directory
4.Now goto that directory in which you have
copied the ns2.35. (I have done so cd
..,now I am in /home directory.).
5. Extract the package by writing this.
tar -xvf ns-allinone-2.35-RC3.tar
(be careful write the same name of ns file
what you have coppied) (I have write nsallinone-2.35, bz I have coppied this name
in cygwin)
8

12/28/2014

A. $cd ns-allinone-2.35

;(press enter)

B.

$./install
A. Wait for installation to complete.
B. Now if you have at the end of the window the same
like below then its ok you have done it.

12/28/2014

10

12/28/2014

Now the most difficult thing is to set your bashrc file.

Be careful I have wasted much of my time on this.


But hope you will not.
Cd ~/
nano ~/.bashrc
Now simply copy the page # 13 text and past it in the
terminal. Only change the path (dont confuse with
this is so simple put your place where you have
install the ns-allinone-2.35, I have install it in
home/ns-allinone-2.35/ you have to write your own.)

Or manually store
the bashrc file in etc folder in cygwin through
mouse.

Once you made it you can copy

11

12/28/2014

Be careful to write otcl8.5.10,tk1.14,ns2.35, e.tc file

names, because it changes with change of ns


version.
Important to note:
When you entering a directory by this command
Cd /home
.when you enter in terminal you
can check it also in your computer by openning C,
then cygwin, then home, then ns-allinone-2.35
through mouse.

12

12/28/2014

# LD_LIBRARY_PATH
OTCL_LIB=/home/ns-allinone-2.35/otcl-1.14
NS2_LIB=/home/ns-allinone-2.35/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$US
R_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/ns-allinone-2.35/bin:/home/ns-allinone2.345/tcl8.5.10/unix:/home/$
NS=/home/ns-allinone-2.35/ns-2.35/
NAM=/home/ns-allinone-2.35/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM
13

12/28/2014

After pasting press ctrl+o to save the .bashrc file.

14

Now press enter and then ctrl+x to exit


Now write the command
$source ~/.bashrc
Now your terminal can get hang close it it will say
for lossing donot worry click ok
Now try again open the terminal and type
$ns
%
you will get this congratullation you
have install successfully

12/28/2014

Now enter to home then to ns-allinone-2.35 then

15

2.35 using the command


$cd /home/ns-allinone-2.35/ns2.35
$./validate
It will take much time than installation
If you have this you are succesful

12/28/2014

restart the system.


To check whether ns is installed successfully or not,

test it by entering $ns


If you are prompted with %, it means your installation
is successful otherwise check your environment
variables, specifically compare the versions of otcl,
nam etc in ./bashrc with those in your ns-allinone2.35.
Press exit to go back from %.

16

12/28/2014

You might also like