Here I will show you how to install NS2 on Windows 7 (32-bit | 64-bit):
-------------------------------------------------------------------------------------------------------------------------
Important:Your User Name Shouldn't Contain any SPACE(e.g: ram sahu).If contain then change it.
Step 1:








-------------------------------------------------------------------------------------------------------------------------
Important:Your User Name Shouldn't Contain any SPACE(e.g: ram sahu).If contain then change it.
Step 1:
- Go to these link and download the three .rar files and place them in a single folder.
- Link for part 1(100Mb):NS 2.35-Part1
- Link for part 2(100Mb):NS 2.35-Part2
- Link for part 3(19.49Mb):NS 2.35-Part3
- Now Extract the NS 2.35.part1 only.It will extract the part2 an part3 automatically.
- Note:
- Extract after complete download
- Don't Extract the part2 and part3
- After extraction you'll get a folder named NS 2.35
- Inside this folder you get cygwin setup , .bashrc etc..
- Now install the setup. Choose install from local directory
- Press Next
- Don't change the default Root Directory
- In Local Package Rpository field browse to: NS 2.35/nslocal/release
- Click Next
- Click on the Circle
- After clicking the circle the default turn to install
- After this press Next it will install the necessary packages for NS2
- check create a desktop shortcut and start menu shortcut
- Then installation finished.:)p
- Now you are halfway done !!!
- Now You'll get a screen like this:
- Now create a folder Named Noureddine in C:\cygwin\home
- Now copy the ns-allinone-2.35-RC7avecxgraph.rar and Extract there. You'll get ns-allinone-2.35-RC7 folder.
- Now cpoy the .bashrc file from the downloaded Extract folder
- Now go to the "C:\cygwin\home\prittam" here "prittam" indicate my user name in your case it will be your user name.And replace(i.e paste) the .bashrc file that you copied.
- Now open the Cygwin command window which is on your desktop and type source .bashrc
- Now type ns "$" change to "%"
- Now type ns-version it will show like:
- Now press exit.
- Now type startxwin you'll get a window like this:
- Now type nam you'll get a screen:
- Now go to file and quit the nam window
- Now hold the main tab and drag your mouse to quit from Cygwin window(the white window)
- And exit from 'cygwin command' window (type exit)
- Important:
- go to Taskmanager(Alt+Ctrl+Del) and goto process tab and search for XWin.exe
- End process
- If you not do this when you press startxwin in Cygwin command window for the second time then you get this:
- Now open the cygwin command window startxwin and type ns yourfilename.tcl then nam file is generated and type nam yournamfile.nam
- For my case:
- Write your code in notepad++ and save with .tcl extension
----------------------------!!!!!!!!!!!!!!!!!!!!!!!!Congragulation!!!!!!!!!!!!!!!!!!!-------------------------------
Any query please do write as comment or send mail "prittam.nanda@gmail.com"
Thank u
Any query please do write as comment or send mail "prittam.nanda@gmail.com"
Thank u
After type and press and when I type it shows command not found.
ReplyDeleteplz share your system spec
DeleteHi,
ReplyDeleteI stuck while installing ns2. Plz solve it.
According to you, from the line
Now type ns "$" change to "%"
I am unable to go further. It shows
ns: command not found.
Plz suggest what should I do.
I think it 64-bit ,some problem are there in 64-bit i will find it soon
Deletesir aftr installation where to save ours program. file ? how to run that ?
ReplyDeleteuse ns command to run and save anywhere do you face any problem doing that if any share snapshot
ReplyDeletethank you
ReplyDeleteHi,
ReplyDeleteAfter typing startxwin, it says,
"startxwin: Connection refused (errno. 111): Unable to connect to X server
startxwin: No such process (errno. 3): Server error".
check in your Task Manager whether startxwin is already running if running then end that process and again try. And please share your system specification
Deletehello i am having trouble with startxwin whenever i type this command it says like:
ReplyDeletegiving up.
startxwin: no such file or directory (errno 2): unable to connect to X server
startxwin : no such process (errno 3): server error.
and my system specifications are 64bit-operating system window 8.1. please help...
Really trouble with 64 bit system please try on 32 bit , i will figure it out soon.
Deletefound any solution?
DeletePlease, share if found any solution on this.
Deletens: command not found for Now type ns "$" change to "%"
ReplyDeleteplease solve this prittam nanda
go to local c . than pest file in cygwin/home/your file than it work
Deletecan you explain more ,i don't get it
DeleteCan you please give us more details, i have the same problem in windows 7 32 bits.
Deletens: command not found for Now type ns "$" change to "%"
Thnx, it worked :)
ReplyDeleteThank you.. :) :) :)
Deleteafter executing ns program.tcl the nam file is not generating
ReplyDeleteHave you changed the path i have mentioned here if so then verify and again go through the installation process and please do not change the path your USER NAME should't contain any space.
Deletewhen i write "startxwin " it doen't work please help me......
ReplyDeletehello i am having trouble with startxwin whenever i type this command it says like:
ReplyDeletegiving up.
startxwin: no such file or directory (errno 2): unable to connect to X server
startxwin : no such process (errno 3): server error.
and my system specifications are 64bit-operating system window 8.1. please help...
do it in 32-bit windows 7
ReplyDeletehi guys
ReplyDeletei have some problem and i used win 7 64 bit
please help me to solve this proplem soon if anyone solve it
i have also same problem with windows 7 64 bit. XWindows is not started , so try in windows 7 32 bit i will find out a solution soon. May be its .DLL files are not properly configured to run in 64 bit environment.
Deletethanks prittam!! it really helped.. But i have a problem with the xgraph.
ReplyDeleteits not generated using awk file. could you help??
Have you tried in windows 7 32 bit
ReplyDeletesir i have a problem when i ns it says bash: ns:command not found
ReplyDeleteTry it in win 32bit and follow the steps as it's
Deletetype source .bashrc before it
DeleteThis is vivek
ReplyDeleteI tried to execute .tcl and it executed but when tried for nam it shows
no display name and no $DISPLAY environment variable
Is .nam file generate when u execute the .tcl file refer the instructions carefully bcoz nam command works for .nam files only
Deletewhere should i save my tcl text file, i almost tried everything and i always get could not read file: "first.tcl": no such file of directory
ReplyDeleteplease answer ASAP
thank you in advance
hello..
ReplyDeletei went some help
now i install NS2
but last 2 steps i can not do it ..
when i write it tell me couldn't read file "yournamefile.tcl" no such file or directory
can u help me and tell me what is the problem ??
this is the steps
Now open the cygwin command window startxwin and type ns yourfilename.tcl then nam file is generated and type nam yournamfile.nam
Thank u
The $ sign dsnt change and shows cannot execute binary file error. Can u please help me as I cannot proceed further
ReplyDeleteafter opening cygwin window and typing ns "$" chnge to "&" , it displys "ns command not found"
ReplyDeletebash:ns:command not found
ReplyDeleteplease resolve my problem sir,
my system configuration is windows 7 starter,6.1.7601 service pack one build
after writing ns command to swithc $ to %
ReplyDeletegetting "/cygdrive/c/Windows/system32/ns.exe": error while loading share libraries: tcl83.dll cannot open shared object file
Dear prittam.....thank you for sharing this valuable information. I would appreciate so much if you could help me with one more problem i encountered.....i am using windows 7 32 bit but i still hv the same problem. after i typed the source .bashrc and ns.....it showed that bash: ns: command not found.
ReplyDeletei have followed all your steps...but still teh same problem
ho can help us the problem still exist where using windows 7 32 bit, bash: ns: command not found.
Deletei am trying to install NS2 in window7 according to your instructions and i am successfully installed. First of all thanks for such a nice guidelines but i have a problem while running wireless sensor network sample example.
ReplyDeletewhile i compile the program with .tcl extension it creates a .nam file that is of 0KB. So when i execute .nam file it shows a message "cannot open nam instance please create a new instance".
now i don't know why .nam file is 0KB what is exact problem...plz give a solution
i shall be highly thankful to you.
is there any way to install in 64 bit???
ReplyDeleteDid you find any way?? if its possible tel me soon....
Try installing in 64 bit let's see what error it gives then post on this blog
Deleteplease can any one help me
ReplyDeletehow i have to type the last instruction
Now open the cygwin command window startxwin and type ns yourfilename.tcl then nam file is generated and type nam yournamfile.nam
if possible provde screeshots
this idea didnt worked. after downloading and extracting it says cygwin file is broken....
ReplyDeleteWhen i type startxwin am getting an error
ReplyDeleteResource temporarily unavailable (error 11): Another x server instance is running on DISPLAY :0
Hi I am dinesh
ReplyDeleteI have installed the cygwin but I am not able to use ns command..
If I type "ns" in the cygwin window...it shoes the error like command not found...i am having 32bit OS only...
I am trying to work on ns2 in windows 7 32bit.
ReplyDeleteafter installation when i tried for ns command, there is no conversion from "$" to "%" symbol.
I have also set the path as specified.
But no change. Please reply.
follow the step as shown.Don't perform any step without understanding... Tell me where you got stuck share system spec and screenshots.
ReplyDeleteI didn't remove a single step but
ReplyDeleteNow open the Cygwin command window which is on your desktop and type source .bashrc
Now type ns "$" change to "%"
this step is not working for me, even if i copy paste the .bashrc file
Very nice explanation.
ReplyDeleteThank you.
hello
ReplyDeletei got error when type startxwin
giving up.
startxwin: Connection refused (errno 111): unable to connect to X server
startxwin: No such process (errno 3): Server error.
i dont get cygwin command mode..so next step onward I cannot carry on.
ReplyDeleteWhen I type "startxwin" and press enter
ReplyDeleteI get this message" unable to load any useable font"
WinX will shutdown.
Whenever i type 'nam' the error bolow appears:
ReplyDeletenam: no display name and no $DISPLAY environment variable
Could anyone help please kindly. i'd highly appreciate
ReplyDelete