Step-by-Step Installation
In order to perform simulation described in [
1] the following disciplines need to be added to
ns-2:
- CSFQ (Core-Stateless Fair Queueing) is an algorithm
which approximates fair queueing. The algorithm is described in [1].
- FRED (Flow Random Early Drop) is a buffer management
algorithm that provides flow protection. It is described in [2].
- FREDL - A variant of FRED optimized for large number
of flows. See Section 6 in [2].
The steps required to add CSFQ, FRED, and FREDL to ns-2 are described below:
- 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.
- 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.
- Add the following initializations
in the tcl/lib/ns-default.tcl file.
- Add the following initializations
in the tcl/lib/ns-lib.tcl file (simplex-link procedure).
- Add the following initializations
in the tcl/lib/ns-queue.tcl file (new-flow procedure).
- Add csfq, fred, and util in Makefile and
compile.
References
-
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.
-
Dynamic of Random Early Detection,
by D. Lin and R. Morris,
Proceedings of SIGCOMM'97,, pp. 127-137, Cannes, France, October
1997.