Step-by-Step Installation

In order to perform simulation described in [1] the following disciplines need to be added to ns-2: The steps required to add CSFQ, FRED, and FREDL to ns-2 are described below:
  1. Download disciplines-ns2.1b7a.tar.gz file for ns version 2.1b7a and higher, and disciplines.tar.gz for prior versions. Gunzip and untar this file in the ns-2 directory. You should get the following files:
    • csfq.cc - which implements CSFQ.
    • fred.{h,cc} - which implement FRED, FREDL; switching between FRED and FREDL is accomplished by setting "many-flows_" variable to either 0 (for FRED) or 1 (for FREDL)
    • util.{h,cc} - which implement several probability distribution functions used in csfq.cc

    Note: fred.{h,cc} are heavily based on red.{h,cc} files which come with the original distribution of ns version 2.0.

    Automatic Installation: For an automatic installation you can download and run disciplines.install. This will perform automatically steps 2-6. This script is courtesy of Sergey Balandin (Sergey.Balandin@nokia.com). The script was tested on ns-2.1b5 and ns-2.1b6 under Linux RedHat 6.0.

  2. Add a new field (i.e., label_) and two associated methods (i.e., label() and setlabel) in the hdr_cmn structure in the packet.h file. Here is the modified structure for ns version 2.1b2.

  3. Add the following initializations in the tcl/lib/ns-default.tcl file.

  4. Add the following initializations in the tcl/lib/ns-lib.tcl file (simplex-link procedure).

  5. Add the following initializations in the tcl/lib/ns-queue.tcl file (new-flow procedure).

  6. Add csfq, fred, and util in Makefile and compile.

References

  1. Core-Stateless Fair Queueing: Achieving Approximately Fair Bandwidth Allocations in High Speed Networks,
    by I. Stoica, S. Shenker and H. Zhang, Proceedings of SIGCOMM'98.
  2. Dynamic of Random Early Detection,
    by D. Lin and R. Morris, Proceedings of SIGCOMM'97,, pp. 127-137, Cannes, France, October 1997.