User Tools

Site Tools


tdmadama

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tdmadama [2010-02-17 15:17]
pot move tdmadama-ns-2.33 from votos to here
tdmadama [2010-02-17 15:41] (current)
pot code formatting
Line 19: Line 19:
 == For NS 2.33 == == For NS 2.33 ==
  
-  - Download the package {{:​tdmadama-ns-2.33}}+  - Download the package {{:tdmadama-ns-2.33.tar.bz2|tdmadama-ns-2.33}}
   - Read the README file included in the package and follow the instructions to install the module.   - Read the README file included in the package and follow the instructions to install the module.
-  - From the '​examples'​ directory, execute the script example-tdmadama.tcl and check the outputs. The **analy** utility source codeused in the examplecan be downloded [[http://​wnet.isti.cnr.it/​software/​tdma-dama/​analy.c|here]].+  - From the '​examples'​ directory, execute the script example-tdmadama.tcl and check the outputs, ​as in the examplesusing the {{analy.c|analy}} utility source code.
  
 The script simulates a single satellite terminal connected to an Internet host via a satellite gateway. The traffic offered to the terminal is a sequence of TCP Sack connections whose starting time is scheduled according to a Poisson process. The amount of data carried by each connection is variable and it is drawn from an exponential distribution. The traffic load offered to the terminal is a function of the average number of packets of individual connections ( $data(bunch) ),  the size in bytes of a TCP segment ( $data(packets) ),  the total transponder capacity in byte/s ( $capSaT ), and the average inter-arrival time between TCP connections. It is given by the following expression: The script simulates a single satellite terminal connected to an Internet host via a satellite gateway. The traffic offered to the terminal is a sequence of TCP Sack connections whose starting time is scheduled according to a Poisson process. The amount of data carried by each connection is variable and it is drawn from an exponential distribution. The traffic load offered to the terminal is a function of the average number of packets of individual connections ( $data(bunch) ),  the size in bytes of a TCP segment ( $data(packets) ),  the total transponder capacity in byte/s ( $capSaT ), and the average inter-arrival time between TCP connections. It is given by the following expression:
  
-set data(load) ​  [expr $data(bunch)*$data(packet)*8/​($capSAT*$data(next))]+  ​set data(load) ​  [expr $data(bunch)*$data(packet)*8/​($capSAT*$data(next))]
  
 whose content is shown before the simulation is run. At the end of simulation an estimate of the average completion time of connection is provided together with its confidence interval. The script outputs four files tagged as -bod or -scpc depending on command line arguments. The file "​event"​ is the TDMA-DAMA output whose format is described in the paper. The file "​out"​ is the standard ns-2 output for queue tracing. The latter is processed at the end of simulation run to obtain the traces shown in the eps graphs. These graphs display the bandwidth allocated and the throughput of the terminal. whose content is shown before the simulation is run. At the end of simulation an estimate of the average completion time of connection is provided together with its confidence interval. The script outputs four files tagged as -bod or -scpc depending on command line arguments. The file "​event"​ is the TDMA-DAMA output whose format is described in the paper. The file "​out"​ is the standard ns-2 output for queue tracing. The latter is processed at the end of simulation run to obtain the traces shown in the eps graphs. These graphs display the bandwidth allocated and the throughput of the terminal.
Line 32: Line 32:
 == For NS 2.26, 2.28, and 2.29 (Discontinued) == == For NS 2.26, 2.28, and 2.29 (Discontinued) ==
  
-1) Download the patch [[http://​votos.isti.cnr.it/​ns-allinone-2.29-tdma.patch|ns-allinone-2.29-tdma.patch]] ​for NS-2.29 or [[http://​votos.isti.cnr.it/​ns-allinone-2.28-tdma.patch|ns-allinone-2.28-tdma.patch]] for NS-2.28+1) Download the patch {{:​ns-allinone-2.29-tdma.patch}} for NS-2.29 or {{:​ns-allinone-2.28-tdma.patch}} for NS-2.28
  
 2) Unpack ns-allinone-2.29.tar.gz and apply patch: 2) Unpack ns-allinone-2.29.tar.gz and apply patch:
  
-tar xvzf ns-allinone-2.29.tar.gz +  ​tar xvzf ns-allinone-2.29.tar.gz 
- +  patch -p0 < ns-allinone-2.29-tdma.patch
-patch -p0 < ns-allinone-2.29-tdma.patch+
  
 3) Install the package (possibly) using gcc version 3.3.6: 3) Install the package (possibly) using gcc version 3.3.6:
  
-cd ns-allinone-2.29 +  ​cd ns-allinone-2.29 
- +  ./install
-./install+
  
 The patch ns-allinone-2.28-tdma has been compiled and tested with gcc-4.0.4 and g++-4.0.4 by applying to ns-2.28 the patch ns228-gcc402.patch that you can download from [[https://​www.ececs.uc.edu/​~cdmc/​ucbt/​|here]] from download section. The patch ns-allinone-2.28-tdma has been compiled and tested with gcc-4.0.4 and g++-4.0.4 by applying to ns-2.28 the patch ns228-gcc402.patch that you can download from [[https://​www.ececs.uc.edu/​~cdmc/​ucbt/​|here]] from download section.
Line 52: Line 50:
 Alternatively,​ the manual installation of simulator sources is also possible. Alternatively,​ the manual installation of simulator sources is also possible.
  
-1) Download the tarball sources-ns-2.29.tar.gz or sources-ns-2.28.tar.gz and unpack to local directory:​ +1) Download the tarball ​{{:sources-ns-2.29.tar.gz}} or {{:sources-ns-2.28.tar.gz}} and unpack to local directory:​ 
-wget [[http://votos.isti.cnr.it/​sources-ns-2.29.tar.gz|http:​//​votos.isti.cnr.it/​sources-ns-2.29.tar.gz]] +  wget http://ala.isti.cnr.it/​wnlab/_media/​sources-ns-2.29.tar.gz 
- +  tar xvzf sources-ns-2.29.tar.gz.
-tar xvzf sources-ns-2.29.tar.gz.+
  
 2) Copy (in case overwriting existing files) the files: "​mac-tdma.cc",​ "​mac-tdma.h"​ and "​mac-bod.cc"​ in ns-2.29/mac directory; the file "​Makefile.in"​ in ns-2.29 directory; and "​ns-default.tcl"​ and "​ns-sat.tcl"​ in ns-2.29/​tcl/​lib/​ 2) Copy (in case overwriting existing files) the files: "​mac-tdma.cc",​ "​mac-tdma.h"​ and "​mac-bod.cc"​ in ns-2.29/mac directory; the file "​Makefile.in"​ in ns-2.29 directory; and "​ns-default.tcl"​ and "​ns-sat.tcl"​ in ns-2.29/​tcl/​lib/​
Line 61: Line 58:
 3) Compile ns-2.29 following standard procedure. 3) Compile ns-2.29 following standard procedure.
  
-In order to validate the compiled simulator download and run the script file [[http://​votos.isti.cnr.it/​test-tdma.tcl|test-tdma.tcl]]. This script file generate a scenario with two satellite terminals (ter(0) and ter(1)) and a geostationary bent pipe satellitar node. It then schedule a TCP Sack connection with source on ter(0) and receiver on ter(1). The simulation outputs two trace files: __event.tr__ and __out.tr__. While the out.tr is the trace of terminal queues in ns-2 format, the event.tr dumps all the events that occur in MAC layer, such as marking the beginning of a frame or the complete delivery of a packet from the terminal.+In order to validate the compiled simulator download and run the script file {{test-tdma.tcl}}. This script file generate a scenario with two satellite terminals (ter(0) and ter(1)) and a geostationary bent pipe satellitar node. It then schedule a TCP Sack connection with source on ter(0) and receiver on ter(1). The simulation outputs two trace files: __event.tr__ and __out.tr__. While the out.tr is the trace of terminal queues in ns-2 format, the event.tr dumps all the events that occur in MAC layer, such as marking the beginning of a frame or the complete delivery of a packet from the terminal.
  
 ==== Simulator Interface & Configuration ==== ==== Simulator Interface & Configuration ====
Line 67: Line 64:
 The TDMA simulator is provided with a TCL interface that allows the configuration of TDMA frame and the definition of the allocation mechanism. The following table reports the TDMA parameters together with their meaning: The TDMA simulator is provided with a TCL interface that allows the configuration of TDMA frame and the definition of the allocation mechanism. The following table reports the TDMA parameters together with their meaning:
  
-== max_slot_num_ ==  +  * ''​max_slot_num'':​ number ​of slots per frame (excluded preamble) 
-Number ​of slots per frame (excluded preamble) +  * ''​slot_packet_len'':​ size of a slot (bytes) 
- +  * ''​num_frame_'':​ number ​of frames between successive bandwidth requests 
-== slot_packet_len_ ==  +  * ''​bandwidth_'':​ overall ​satellite link capacity
-Size of a slot (bytes) +
- +
-== num_frame_ ​==  +
-Number ​of frames between successive bandwidth requests +
- +
-== bandwidth_ ​==  +
-Overall ​satellite link capacity +
  
 Thus, we could introduce the following positions at the beginning of simulation script in order to correctly configure the terminals and satellite objects Thus, we could introduce the following positions at the beginning of simulation script in order to correctly configure the terminals and satellite objects
  
-Mac/Tdma set max_slot_num_ 47 +  ​Mac/Tdma set max_slot_num_ 47 
- +  Mac/Tdma set slot_packet_len_ 1504 
-Mac/Tdma set slot_packet_len_ 1504 +  Mac/Tdma set num_frame_ 3 
- +  Mac/Tdma set bandwidth_ 2112Kb 
-Mac/Tdma set num_frame_ 3 +  global opt 
- +  set opt(chan) Channel/​Sat 
-Mac/Tdma set bandwidth_ 2112Kb +  set opt(bw_up) 2.112Mb ;# uplink bandwidth 
- +  set opt(bw_down) 38.016Mb ;# downlink bandwidth 
-global opt +  set opt(phy) Phy/Sat 
- +  set opt(mac) Mac/Tdma 
-set opt(chan) Channel/​Sat +  set opt(ifq) Queue/​DropTail 
- +  set opt(qlim) 1500 ;# queue size (pkts) 
-set opt(bw_up) 2.112Mb ;# uplink bandwidth +  set opt(ll) LL/Sat 
- +  set opt(wiredRouting) OFF
-set opt(bw_down) 38.016Mb ;# downlink bandwidth +
- +
-set opt(phy) Phy/Sat +
- +
-set opt(mac) Mac/Tdma +
- +
-set opt(ifq) Queue/​DropTail +
- +
-set opt(qlim) 1500 ;# queue size (pkts) +
- +
-set opt(ll) LL/Sat +
- +
-set opt(wiredRouting) OFF +
  
 Specifically,​ the array opt defines the type of the objects that make up a terminal node and configure their attributes. Then, satellite object and terminals are instatiated using the following procedure: Specifically,​ the array opt defines the type of the objects that make up a terminal node and configure their attributes. Then, satellite object and terminals are instatiated using the following procedure:
  
-;# configure and create the satellite node "​sat"​+  ​;# configure and create the satellite node "​sat"​ 
 +  node-config -satNodeType geo-repeater \ 
 +  -phyType Phy/​Repeater \ 
 +  -channelType $opt(chan) \ 
 +  -downlinkBW $opt(bw_down) \ 
 +  -wiredRouting $opt(wiredRouting) 
 +  set sat [$ns node] 
 +   
 +  ;# configure and create the terminal node "​ter"​ 
 +  $ns node-config -satNodeType terminal \ 
 +  -llType $opt(ll) \ 
 +  -ifqType $opt(ifq) \ 
 +  -ifqLen $opt(qlim) \ 
 +  -macType $opt(mac) \ 
 +  -phyType $opt(phy) \ 
 +  -channelType $opt(chan) \ 
 +  -downlinkBW $opt(bw_down) \ 
 +  -wiredRouting $opt(wiredRouting) 
 +   
 +  set ter [$ns node] 
 +  $ter add-gsl geo $opt(ll) $opt(ifq) $opt(qlim) $opt(mac) \ 
 +  $opt(bw_up) $opt(phy) [$sat set downlink_] [$sat set uplink_]
  
-node-config -satNodeType geo-repeater \ 
- 
--phyType Phy/​Repeater \ 
- 
--channelType $opt(chan) \ 
- 
--downlinkBW $opt(bw_down) \ 
- 
--wiredRouting $opt(wiredRouting) 
- 
-set sat [$ns node] 
- 
- 
-;# configure and create the terminal node "​ter"​ 
- 
-$ns node-config -satNodeType terminal \ 
- 
--llType $opt(ll) \ 
- 
--ifqType $opt(ifq) \ 
- 
--ifqLen $opt(qlim) \ 
- 
--macType $opt(mac) \ 
- 
--phyType $opt(phy) \ 
- 
--channelType $opt(chan) \ 
- 
--downlinkBW $opt(bw_down) \ 
- 
--wiredRouting $opt(wiredRouting) 
-  
- 
-set ter [$ns node] 
- 
-$ter add-gsl geo $opt(ll) $opt(ifq) $opt(qlim) $opt(mac) \ 
- 
-$opt(bw_up) $opt(phy) [$sat set downlink_] [$sat set uplink_] 
-  
  
 The last command setups a bidirectional connection between satellite node and the terminal node using parameters previously indicated opt. Once that the sat and ter objects have been created and connected, the Allocator and Requester objects must be installed into terminals. Note that a Requester object is needed for each terminal, but only one Allocator object for the whole satellite network is needed. The last command setups a bidirectional connection between satellite node and the terminal node using parameters previously indicated opt. Once that the sat and ter objects have been created and connected, the Allocator and Requester objects must be installed into terminals. Note that a Requester object is needed for each terminal, but only one Allocator object for the whole satellite network is needed.
  
-set alc [$ter install-requester Allocator/​Proportional] +  ​set alc [$ter install-requester Allocator/​Proportional] 
- +  set req [$ter install-requester Requester/​Constant]
-set req [$ter install-requester Requester/​Constant]+
  
  
 The definition of Requester and Allocator must specify the subclass of the objects. The object name can be used during simulation run-time to dynamically change the properties of Allocator and Requester. In particular, the request_ internal variable of Requester object gives the possibility to dinamically modify the request submitted by terminal to allocator and and to define a customized allocation algorithm via TCL. The simulator is endowed with a tracing support, which can be enabled through the following commands: The definition of Requester and Allocator must specify the subclass of the objects. The object name can be used during simulation run-time to dynamically change the properties of Allocator and Requester. In particular, the request_ internal variable of Requester object gives the possibility to dinamically modify the request submitted by terminal to allocator and and to define a customized allocation algorithm via TCL. The simulator is endowed with a tracing support, which can be enabled through the following commands:
  
-set ev_file [open event.tr w] +  ​set ev_file [open event.tr w] 
- +  $ter trace-event $ev_file
-$ter trace-event $ev_file+
  
 Packets coming from upper layers are first processed by a link layer (LL) agent, which is responsible for packet filtering and collision detection, then enqueued into IFq queue. Packets coming from upper layers are first processed by a link layer (LL) agent, which is responsible for packet filtering and collision detection, then enqueued into IFq queue.
tdmadama.1266416255.txt.gz · Last modified: 2010-02-17 15:17 by pot