complete guide for installation of cygwin and ns2
DESCRIPTION
install ns2.35 without taking further help from any other sourceTRANSCRIPT
![Page 1: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/1.jpg)
04/11/2023
Complete guide for installation of cygwin and ns2.35 on windows 7 with problems solution
1
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
![Page 2: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/2.jpg)
04/11/2023
goto the link http://www.cygwin.com/ Run the file “setup.exe” you will get this, follow the same wizard with
Installing Cygwin 1.7.1
2
Keep hitting next and provide
directory information
![Page 3: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/3.jpg)
04/11/20233
1. click next in the wizard , click install from the internet and next,
2. choose the dirctory where you want to install the cygwin, click for all users, click next
3. select local package directory, place where you have stored the setup
4. select your network connection, click on direct connection and then next
5. select mirror site which is near to your area choose the mirror country wise click this link http://cygwin.com/mirrors.html
6. wait for launching till the package directory open then select the following packeges to download
![Page 4: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/4.jpg)
04/11/20234
Windows Use cygwin 1. Required package: 2. gcc4, gcc4-g++, gawk, tar, gzip, make,
patch, perl, w32api3. Graphic package: 4. xorg-server, xinit, libX11-devel, libXmu-devel 5. For editor use following packages. I found
these best6. Nano, vim
![Page 5: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/5.jpg)
04/11/2023
When you hit this page, choose the required (e.g., gcc4) and optional packages
(Repeat the process
For each package
Separately)
Installing Cygwin 1.7.1
5
Search the package
name here
When you are done, hit ‘next’
Click here it will
change to install
![Page 6: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/6.jpg)
04/11/20236
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.
![Page 7: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/7.jpg)
04/11/2023
Installing NS2.35
7
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/download1.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 desktop3.Now write “pwd” without inverted commas it will show your present working directory. ( I have got like /home/lenovo).
![Page 8: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/8.jpg)
04/11/20238
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 ns-allinone-2.35, bz I have coppied this name in cygwin)
![Page 9: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/9.jpg)
04/11/20239
A. $cd ns-allinone-2.35 ;(press enter)B. $./installB. Wait for installation to complete.C. Now if you have at the end of the window
the same like below then it’s ok you have done it.
![Page 10: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/10.jpg)
04/11/202310
![Page 11: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/11.jpg)
04/11/202311
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 ~/.bashrcNow simply copy the page # 13 text and past
it in the terminal. Only change the path (don’t 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.)
Once you made it you can copy Or manually store the bashrc file in ‘etc’ folder in cygwin through mouse.
![Page 12: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/12.jpg)
04/11/202312
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
commandCd /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.
![Page 13: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/13.jpg)
04/11/202313
# 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:$USR_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-allinone-2.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
![Page 14: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/14.jpg)
04/11/202314
After pasting press ctrl+o to save the .bashrc file. Now press enter and then ctrl+x to exit
Now write the command$source ~/.bashrcNow 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
![Page 15: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/15.jpg)
04/11/202315
Now enter to home then to ns-allinone-2.35 then 2.35 using the command
$cd /home/ns-allinone-2.35/ns2.35$./validateIt will take much time than installationIf you have this you are succesful
![Page 16: Complete Guide for Installation of Cygwin and Ns2](https://reader036.vdocument.in/reader036/viewer/2022082318/5535d96555034650678b47ad/html5/thumbnails/16.jpg)
04/11/202316
restart the system.To check whether ns is installed successfully
or not, test it by entering $nsIf 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-allinone-2.35.
Press exit to go back from %.