Contatct: Li Yuan
Home Overview Source Code Installation Sample Scripts

 

Installation

NS-2 Version and Installation

The model is based on ns-2.27.

Installation:

  1. Download source code, unzip and untar to your working directory
  2. Copy Usermodel/ns2-change/tcp-full.cc to directory ns-2.27/tcp/
  3. Copy Usermodel/ns2-change/tcpapp.cc to directory ns-2.27/webcache/
    (You may save the original two files first.)
  4. Re-configure: go to ns-2.27/ and run ./configure
  5. Re-make: run make

Files Directory

  1. UserModel/
    • main.tcl: Main program (set command line parameters, etc.)
    • header.tcl: Parameters configuration
    • lib.tcl: All lib methods called by main.tcl
    • create-topology.tcl: Create simulation topology before it starts (dumbbell)
    • Http_Client_Abort.tcl: Http/Client/AbortClient class, derived from Http/Client
    • Http_Server.tcl: Http/Server/NewServer class, derived from Http/Server
    • user_timer.tcl: Timer class

    Some auxiliary files:
    • enable-ftp.tcl: Add FTP traffic to study fairness
    • enable-udp.tcl: Add UDP traffic
    • run.tcl: Sample simulation running file

  2. UserModel/ns2-change
    • tcp-full.cc: Only comment out some Error message printing lines to speed up simulation running.
    • tcpapp.cc: Add one method to get bytes received.

    These are the modified C++ files in NS-2. You need copy them to correct directory, and re-compile.
    Please refer to Installation.


  3. UserModel/measure

    This directory contains the data files which will be used as input of our simulator. These data are measured web surfing behavior parameters from real trace, such like values of download size, think time, FTO, sleep time.

    With respect to above parameters, this simulator can be runned in two modes:

    • Mode A (MEASURE is set true): using measured parameters from real trace
    • Mode B (MEASURE is set false): using distribution model in NS2 (such like: pareto, exponential, etc. configurable)

  4. UserModel/Behavior.zip (Contributed by Tran Dinh Nguyen)
  5. Parameters generation program package. If you run the simulator in Mode A, you will need this.
    (Please refer to README in the zip package)