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

      Pinakini 

      3 years ago

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

    • profile image

      shobana 

      5 years ago

      sir i need your help please...

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

    • profile image

      sri 

      5 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 

      5 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

      Sanchita Gupta 

      5 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

      billel_bgl1@yahoo.fr 

      5 years ago

      Hi

      thanks you so match :))

    • robotarm4 profile imageAUTHOR

      robotarm4 

      5 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

      vinoth 

      5 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 imageAUTHOR

      robotarm4 

      5 years ago

      Hi preetie,

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

    • profile image

      preetie 

      5 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

      Sirwan 

      5 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

      mayank 

      6 years ago

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

    • robotarm4 profile imageAUTHOR

      robotarm4 

      6 years ago

      Hi Mohanty,

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

      thanks

    • profile image

      Priyadarshini Mohanty 

      6 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?

    • profile image

      Swap 

      6 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

      WAA 

      6 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

      WAA 

      6 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

      amjedns2 

      6 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

    • robotarm4 profile imageAUTHOR

      robotarm4 

      6 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

      shorman 

      6 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

    • profile image

      jojo 

      6 years ago

      can i do it in ubuntu 9.04 or ubuntu 10.10

      install ns-2.28?

    • robotarm4 profile imageAUTHOR

      robotarm4 

      6 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

      Knives 

      7 years ago

      bash: .bash_profile: command not found

    • profile image

      Knives 

      7 years ago

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

    • robotarm4 profile imageAUTHOR

      robotarm4 

      7 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

      comsian 

      7 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 imageAUTHOR

      robotarm4 

      7 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

      shanthi 

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

    • profile image

      VAMSHI 

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

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://hubpages.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)