ns2 installation procedure

Upload: prasadpsd4549

Post on 06-Apr-2018

251 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Ns2 Installation Procedure

    1/18

    Windows + Cygwin + NS2

    This document will show you how to install NS2 on Windows platform (windows2000 or windows XP). The NS2 version for this document is ns-2.27. If you want to use

    ns-2.28, it is ok. The steps are similar.

    [Cygwin]

    1. Download the software from here. Decompress the rar file. You will see a setup.exe.

    Click this file. It will be like the following figure.

    2. Because the language of operating system is Traditional Chinese. The text of button is

    shown in Chinese. But you dont need to worry about this. I think it is shown in

    English in your computer. Just click Next.

    http://140.116.72.80/~smallko/ns2/ns_setup.rarhttp://140.116.72.80/~smallko/ns2/ns_setup.rar
  • 8/3/2019 Ns2 Installation Procedure

    2/18

    3. Then choose Install from Local Directory

    4. Click Next .

  • 8/3/2019 Ns2 Installation Procedure

    3/18

    (Just keep the settings as they are.)

    5. Click Next

    6. Click Browse to choose where the software is. (Please choose ftp%3a%2f

  • 8/3/2019 Ns2 Installation Procedure

    4/18

    %2fftp.nctu.edu.tw%2fWindows%2fcygwin)

    7. Click OK .

    8. Click Next and you will see the figure shown as follows. In this window, the

    cygwin setup program let you choose what software you want to install.

  • 8/3/2019 Ns2 Installation Procedure

    5/18

    9. Click View first to make the word Category change to Full .

    10. XFree86-base, XFree86-bin, XFree86-prog, XFree86-lib, XFree86-etc,make, patch, perl, gcc, gcc-g++, gawk, gnuplot, tar and gzip must be

  • 8/3/2019 Ns2 Installation Procedure

    6/18

    chosen. For example, if I want to install XFree-86 base (upperfigure), click the Skip of New column. The Skip will bechanged to 4.3.0-1 (lower figure).

    11. Click Next.

  • 8/3/2019 Ns2 Installation Procedure

    7/18

    (Please be patient. It may take a long time to finish the installation.)

    12. When setup is done, it will be shown as following figure. Click Finish.

    13. Click OK to finish the cygwin setup program.

  • 8/3/2019 Ns2 Installation Procedure

    8/18

    [NS2 setup]1. Click the icon on the desktop.

    2. For the first time execution, it will generate some environment parameter setting files.In this example, smallko is my login name to windows system. Therefore, the cygwin

    will create a folder named smallko under home directory. (The actual path for

    smallko folder is: c:\cygwin\home\smallko) It should be noticed that the login name

    can not have any space in your name. For example, A B may cause errors whenyou install NS2. (smallko-hpds is my computer name)

    3. Please copy ns-allinone-2.27.tar.gz into your director. In this example, I copy this file

    to c:\cygwin\home\smallko. Then decompress the compressed file. Use the command

    tar xvfz ns-allinone-2.27.tar.gz.

  • 8/3/2019 Ns2 Installation Procedure

    9/18

    4. When the decompression is finished, it will be shown as follows.

  • 8/3/2019 Ns2 Installation Procedure

    10/18

  • 8/3/2019 Ns2 Installation Procedure

    11/18

  • 8/3/2019 Ns2 Installation Procedure

    12/18

    6. Please type y to continue.

  • 8/3/2019 Ns2 Installation Procedure

    13/18

    7. When it is finished, it is shown as follows.

  • 8/3/2019 Ns2 Installation Procedure

    14/18

    8. But before you start running NS2 simulation, you should set the path first. I haveprepared one file for it. Just copy the .bashrc to replace the one under your home

    directory. (In this example, I copy .bashrc to c:\cygwin\home\smallko)

    [Testing]1. To initial graphical mode. ( type startxwin.bat )

  • 8/3/2019 Ns2 Installation Procedure

    15/18

  • 8/3/2019 Ns2 Installation Procedure

    16/18

    2. Run the example tcl script. (Change to ~/ns-allinone-2.27/ns-2.27/ns-tutorial/examples.Then run the command ns example2.tcl)

  • 8/3/2019 Ns2 Installation Procedure

    17/18

    3. If you can see the following figures, congratulations. You have successfully installcygwin + ns-2.27 under windows platform.

  • 8/3/2019 Ns2 Installation Procedure

    18/18

    Last modified: 2005/06/24

    Author : Chih-Heng, Ke

    Website: http://140.116.72.80/~smallko

    Email: [email protected]

    Phd candidate, EE Department, NCKU, Taiwan

    http://140.116.72.80/~smallkomailto:[email protected]://140.116.72.80/~smallkomailto:[email protected]