ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Installation of ns-allinone-2.28 in cygwin

Updated on September 30, 2011

Steps for cygwin and ns-allinone-2.28 in Windows XP

installation of NS-allinone-2.28 with cygwin in windows XP

Steps for installation:

You need windows XP installed first.

Download cygwin from this link

http://www.ziddu.com/download/9566817/cygwin234.rar.html

And extract this files to c drive.

Then go in to C:\cygwin234

And double click on cgwin and click on Next button.

select install from Local Directory radio button, then click Next button.

After that in Root directory click Next button.

Then in Local Package Directory select C:\cygwin\ftp%3a%........

and click Next button.

Here is the important one select category as +All @ Install

Follow the pictures. Dont think about language click Next in the cygwin setup.

After sometime ok button will seen, just click on it. That's it you have installed cygwin in your windows XP.

Then double click on your desktop cygwin picture.Because this will create a home directory in your cygwin directory, this is the important one.



Installation of NS-allinone-2.28 in cygwin:

Just download this file from this link

http://www.ziddu.com/download/9566895/ns-allinone-2.28.tar.gz.html

And extract this file to your to your C:\cygwin\home\Administrator

here Administrator --> your name on your system ( XP)

And go to cygwin terminal, that means click on desktop cygwin button.

And type ls you will see ns-allinone-2.28 file.

And then type in yur terminal

--> $cd ns-allinone-2.28

--> ./install

And after installation of ns-allinone-2.28 here you need to save this commands in your bashrc file. Which is location --> C:\cygwin\home\Administrator go to that location and double click on "bashrc" file. open it in word pad format.

And add this command to that file. just copy paste it inside bashrc file.

--> $export NS_HOME=/home/Administrator/ns-allinone-2.28/


--> export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH


--> export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:\


--> $NS_HOME/otcl-1.9:$NS_HOME/lib:$LD_LIBRARY_PATH


--> export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library

And after that open cygwin terminal file from your desktop.

And type the above command in that terminal once again. one by one command should be typed.

Then type ns in your terminal it will show like this

%

then exit it.

you have successfully installed ns-allinone-2.28.



If you have any questions, just comment me. I will help you.




Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      VAMSHI 7 years ago

      Thank You Pradeep

      I have Successfully installed NS2.28 in Cygwin, thanks for this.

      Can U please do me a favour by giving some information about installing NS2.34 in Ubuntu9.10 without any otcl errors Please.

      Thank You.

    • profile image

      shanthi 6 years ago

      I installed ns2.28

      i got % symbol also

      then i use startx command

      In that i compile the ns programs. but still i got command not found.

      please help me sir.

    • robotarm4 profile image
      Author

      robotarm4 6 years ago

      hi shanthi

      now I have give a link below has a tcl script which u can use for running a program by this u can get some graphical display.

      save below file and u can open with 'notepad' but u need to copy tcl script from that file save in other notepad, i.e, open new notepad and paste tcl script in notepad save it as 'first.tcl'

      .tcl format is important .

      And running this tcl script u need type

      'ns first.tcl aodv' in ns complier.

      And by this tcl script u can run with other routing protocols like dsr,dsdv,aomdv, etc. Just replace in ('ns first.tcl aodv') aodv with dsr, etc

      http://www.ziddu.com/download/12972768/first.txt.h

      In cygwin command u need to type "startxwin.bat"

      It will show other screen in that u can run u r program.

      For example i have given a program to run that program u need to type ns first.tcl aodv

    • profile image

      comsian 6 years ago

      while installing ns2.28, after copy past of this command

      --> $export NS_HOME=/home/Administrator/ns-allinone-2.28/

      --> export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH

      --> export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:\

      --> $NS_HOME/otcl-1.9:$NS_HOME/lib:$LD_LIBRARY_PATH

      --> export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library

      in "bashrc" file when i open the cygwin terminal i got this error

      bash: $export ambiguous redirect

      bash: --: command not found

      bash: --:command not found

      bash: /otcl-1.9:/lib ::No such file or directory

      bash: --:command not found

      Please help me Sir

    • robotarm4 profile image
      Author

      robotarm4 6 years ago

      Hi comsian,

      can please remove " --> " this symbol from all the command lines and copy paste the command it will work.

      sorry for late reply.

    • profile image

      Knives 5 years ago

      Brake on the last stage...when I type ns in tarminal it shows me

    • profile image

      Knives 5 years ago

      bash: .bash_profile: command not found

    • robotarm4 profile image
      Author

      robotarm4 5 years ago

      Hi knives,

      u need to copy past below command lines in bashrc file.

      $export NS_HOME=/home/Administrator/ns-allinone-2.28/

      export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH

      export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:\

      $NS_HOME/otcl-1.9:$NS_HOME/lib:$LD_LIBRARY_PATH

      export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library

    • profile image

      jojo 5 years ago

      can i do it in ubuntu 9.04 or ubuntu 10.10

      install ns-2.28?

    • profile image

      shorman 5 years ago

      I traing to install this program from 5 days

      I install cygwin and install ns -allinone2.28

      after that

      in the last step when Type ns

      not give me %

      but give me

      bash: ns:command not found

    • robotarm4 profile image
      Author

      robotarm4 5 years ago

      Hi Shorman,

      Can you check the bashrc file command that should be perfect otherwise you will get that error. otherwise the file should be below command lines.

      you need to copy past below command lines in bashrc file.

      $export NS_HOME=/home/Administrator/ns-allinone-2.28/

      export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH

      export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:\

      $NS_HOME/otcl-1.9:$NS_HOME/lib:$LD_LIBRARY_PATH

      export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library

    • profile image

      amjedns2 5 years ago

      if bash: ns command not found take place the simple solution is to copy the ns.exe nam.exe from folder bin in ns-allinone-2.x/bin

      then copy to cygwin bin folder that contain linux commnads

    • profile image

      WAA 5 years ago

      Dear,

      Thanks for this information.

      i HAVE TWO QUESTIONS ONE HOW CAN run XWIN because i used command startxwin . It tell that xwin run on other server and display:0

      Other think i need to run any example from ns-toturial

      Sincerely,

    • profile image

      WAA 5 years ago

      Dear,

      When i used startxwin command . it gave me this error

      0 [main] xterm 5920 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0x600, errno 11

      xterm: Error 29, errno 11: Resource temporarily unavailable

      Reason: spawn: fork() failed

      please answer me

    • profile image

      Swap 5 years ago

      I did exactly what you told but still get the message--

      ns command not found

      I also copy the lines in .bashrc file

    • profile image

      Priyadarshini Mohanty 5 years ago

      Hi,

      I was trying to download cygwin from the above link, for Windows 7. While extracting cygwin to C: drive it gave me the below error:

      ! C:\Users\xyz\Desktop\cygwin234.rar: CRC failed in cygwin234\ftp%3a%2f%2fftp.nctu.edu.tw%2fWindows%2fcygwin\release\gnugo\gnugo-3.4-1.tar.bz2. The file is corrupt

      ! C:\Users\xyz\Desktop\cygwin234.rar: Unexpected end of archive

      Can you plz suggest me the cygwin file compatible with Win7?

    • robotarm4 profile image
      Author

      robotarm4 5 years ago

      Hi Mohanty,

      can u please try in google. I got only this file.

      thanks

    • profile image

      mayank 4 years ago

      while installing ns it is giving error gcc package is not present

    • profile image

      Sirwan 4 years ago

      Dear sir , when i want install ns after two stet i got problem .(Please install it using Cygwin's setup.exe

      before trying to install the ns-2 distribution.

      )

      can you tell me what's problem in my pc??

      this is my email kindly can help me and send to my email

      engsirwan80@yahoo.com

    • profile image

      preetie 4 years ago

      sir please tell me notepad is really required to create tcl file in ns 2.29

      or tell me the steps to open orignal .tcl fiel without notepad in cygwin

    • profile image

      preetie 4 years ago

      sir please tell me notepad is really required to create tcl file in ns 2.29

      or tell me the steps to open orignal .tcl fiel without notepad in cygwin

    • robotarm4 profile image
      Author

      robotarm4 4 years ago

      Hi preetie,

      Yes you need "text document" file to create a file.

    • profile image

      vinoth 4 years ago

      hello sir....i sucessfully installed ns2.27, but while run the program am getting error in "bash::ns::command not found". Pls help me sir

    • robotarm4 profile image
      Author

      robotarm4 4 years ago

      Hi Vinoth make sure read above document again i think u missed this statement

      --And add this command to that file. just copy paste it inside bashrc file

      save that file in bashrc file as ns2.27.

    • profile image

      billel_bgl1@yahoo.fr 4 years ago

      Hi

      thanks you so match :))

    • profile image

      Sanchita Gupta 4 years ago

      Hello sir,

      i have installed cygwin and ns-2.28 allinone on WINDOWS7.

      i have entered the path and environment variables.

      i opened xwin and got the corresponding screen.

      after this to check if the installation has been fine ,i ran an example tcl script and got the following error

      $ ns example1a.tcl

      ns: finish:couldn't execute "nam":no such file or directory

      while executing

      "exec nam out.nam &"

      (procedure "finish" line 7)

      invoked from within

      "finish"

      i got the same error in others examples too......

      what do i do now.....???//

    • profile image

      shobana 4 years ago

      sir i want to install ns-2.28 in windows 7.

      As per your procedure i started to install.But i can't download cygwin from the link u specified. but i downloaded from another link.The required packages are there. but when installing ns-2.28 lot of error appeared.

      "tcl8.3.2 configuration failed existing..... tcl is not part of the ns project"

      please help me.

      sir i also tried using cygwin1.7 latest. in this when installing ,error appeared like this and also for tcl

      checking for x......... none

      so please help me..

    • profile image

      sri 4 years ago

      i am working with cygwin i compile my file like ns node.tcl but no output file is open just the coding as it is come in the screen please help

    • profile image

      shobana 4 years ago

      sir i need your help please...

      give solution to solve ns-2.28 installation error in cygwin...

    • profile image

      Pinakini 2 years ago

      I can't open the nam...how to declare in path?

    Click to Rate This Article