FreeDomain

Thursday, September 25, 2014

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:
  •  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 
Step 2: 
  • 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 
Step 3:
  •  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 

57 comments:

  1. After type and press and when I type it shows command not found.

    ReplyDelete
  2. Hi,
    I 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.

    ReplyDelete
    Replies
    1. I think it 64-bit ,some problem are there in 64-bit i will find it soon

      Delete
  3. sir aftr installation where to save ours program. file ? how to run that ?

    ReplyDelete
  4. use ns command to run and save anywhere do you face any problem doing that if any share snapshot

    ReplyDelete
  5. Hi,
    After typing startxwin, it says,
    "startxwin: Connection refused (errno. 111): Unable to connect to X server
    startxwin: No such process (errno. 3): Server error".

    ReplyDelete
    Replies
    1. 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

      Delete
  6. hello i am having trouble with startxwin whenever i type this command it says like:
    giving 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...

    ReplyDelete
    Replies
    1. Really trouble with 64 bit system please try on 32 bit , i will figure it out soon.

      Delete
    2. Please, share if found any solution on this.

      Delete
  7. ns: command not found for Now type ns "$" change to "%"
    please solve this prittam nanda

    ReplyDelete
    Replies
    1. go to local c . than pest file in cygwin/home/your file than it work

      Delete
    2. can you explain more ,i don't get it

      Delete
    3. Can you please give us more details, i have the same problem in windows 7 32 bits.
      ns: command not found for Now type ns "$" change to "%"

      Delete
  8. after executing ns program.tcl the nam file is not generating

    ReplyDelete
    Replies
    1. Have 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.

      Delete
  9. when i write "startxwin " it doen't work please help me......

    ReplyDelete
  10. hello i am having trouble with startxwin whenever i type this command it says like:
    giving 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...

    ReplyDelete
  11. hi guys
    i have some problem and i used win 7 64 bit
    please help me to solve this proplem soon if anyone solve it

    ReplyDelete
    Replies
    1. 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.

      Delete
  12. thanks prittam!! it really helped.. But i have a problem with the xgraph.
    its not generated using awk file. could you help??

    ReplyDelete
  13. Have you tried in windows 7 32 bit

    ReplyDelete
  14. sir i have a problem when i ns it says bash: ns:command not found

    ReplyDelete
  15. This is vivek
    I tried to execute .tcl and it executed but when tried for nam it shows
    no display name and no $DISPLAY environment variable

    ReplyDelete
    Replies
    1. Is .nam file generate when u execute the .tcl file refer the instructions carefully bcoz nam command works for .nam files only

      Delete
  16. where 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

    please answer ASAP
    thank you in advance

    ReplyDelete
  17. hello..
    i 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

    ReplyDelete
  18. The $ sign dsnt change and shows cannot execute binary file error. Can u please help me as I cannot proceed further

    ReplyDelete
  19. after opening cygwin window and typing ns "$" chnge to "&" , it displys "ns command not found"

    ReplyDelete
  20. bash:ns:command not found

    please resolve my problem sir,
    my system configuration is windows 7 starter,6.1.7601 service pack one build

    ReplyDelete
  21. after writing ns command to swithc $ to %
    getting "/cygdrive/c/Windows/system32/ns.exe": error while loading share libraries: tcl83.dll cannot open shared object file

    ReplyDelete
  22. 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.
    i have followed all your steps...but still teh same problem

    ReplyDelete
    Replies
    1. ho can help us the problem still exist where using windows 7 32 bit, bash: ns: command not found.

      Delete
  23. i 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.

    while 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.

    ReplyDelete
  24. is there any way to install in 64 bit???
    Did you find any way?? if its possible tel me soon....

    ReplyDelete
    Replies
    1. Try installing in 64 bit let's see what error it gives then post on this blog

      Delete
  25. please can any one help me

    how 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

    ReplyDelete
  26. this idea didnt worked. after downloading and extracting it says cygwin file is broken....

    ReplyDelete
  27. When i type startxwin am getting an error
    Resource temporarily unavailable (error 11): Another x server instance is running on DISPLAY :0

    ReplyDelete
  28. Hi I am dinesh
    I 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...

    ReplyDelete
  29. I am trying to work on ns2 in windows 7 32bit.
    after 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.

    ReplyDelete
  30. follow the step as shown.Don't perform any step without understanding... Tell me where you got stuck share system spec and screenshots.

    ReplyDelete
  31. I didn't remove a single step but
    Now 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

    ReplyDelete
  32. Very nice explanation.
    Thank you.

    ReplyDelete
  33. hello
    i 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.

    ReplyDelete
  34. i dont get cygwin command mode..so next step onward I cannot carry on.

    ReplyDelete
  35. When I type "startxwin" and press enter
    I get this message" unable to load any useable font"
    WinX will shutdown.

    ReplyDelete
  36. Whenever i type 'nam' the error bolow appears:

    nam: no display name and no $DISPLAY environment variable

    ReplyDelete
  37. Could anyone help please kindly. i'd highly appreciate

    ReplyDelete