12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1. EXPOO_Traffic—gener<strong>at</strong>es traffic according to an Exponential On/Off distribution. Packets are sent <strong>at</strong> a fixed r<strong>at</strong>eduring on periods, <strong>and</strong> no packets are sent during off periods. Both on <strong>and</strong> off periods are taken from an exponentialdistribution. Packets are co<strong>ns</strong>tant size.2. POO_Traffic—gener<strong>at</strong>es traffic according to a Pareto On/Off distribution. This is identical to the ExponentialOn/Off distribution, except the on <strong>and</strong> off periods are taken from a pareto distribution. <strong>The</strong>se sources can be used togener<strong>at</strong>e aggreg<strong>at</strong>e traffic th<strong>at</strong> exhibits long range dependency.3. CBR_Traffic—gener<strong>at</strong>es traffic according to a deterministic r<strong>at</strong>e. Packets are co<strong>ns</strong>tant size. Optionally, somer<strong>and</strong>omizing dither can be enabled on the interpacket departure intervals.4. TrafficTrace—gener<strong>at</strong>es traffic according to a trace file. Each record in the trace file co<strong>ns</strong>ists of 2 32-bit fields innetwork (big-endian) byte order. <strong>The</strong> first contai<strong>ns</strong> the time in microseconds until the next packet is gener<strong>at</strong>ed. <strong>The</strong>second contai<strong>ns</strong> the length in bytes of the next packet.<strong>The</strong>se classes can be cre<strong>at</strong>ed from OTcl. <strong>The</strong> OTcl classes names <strong>and</strong> associ<strong>at</strong>ed parameters are given below:Exponential On/Off An Exponential On/Off object is embodied in the OTcl class Applic<strong>at</strong>ion/Traffic/Exponential. <strong>The</strong>member variables th<strong>at</strong> parameterize this object are:packetSize_burst_time_idle_time_r<strong>at</strong>e_the co<strong>ns</strong>tant size of the packets gener<strong>at</strong>edthe average “on” time for the gener<strong>at</strong>orthe average “off” time for the gener<strong>at</strong>orthe sending r<strong>at</strong>e during “on” timesHence a new Exponential On/Off traffic gener<strong>at</strong>or can be cre<strong>at</strong>ed <strong>and</strong> parameterized as follows:set e [new Applic<strong>at</strong>ion/Traffic/Exponential]$e set packetSize_ 210$e set burst_time_ 500ms$e set idle_time_ 500ms$e set r<strong>at</strong>e_ 100kNOTE: <strong>The</strong> Exponential On/Off gener<strong>at</strong>or can be configured to behave as a Poisson process by setting the variable burst_time_to 0 <strong>and</strong> the variable r<strong>at</strong>e_ to a very large value. <strong>The</strong> C++ code guarantees th<strong>at</strong> even if the burst time is zero, <strong>at</strong> least onepacket is sent. Additionally, the next interarrival time is the sum of the assumed packet tra<strong>ns</strong>mission time (governed by thevariable r<strong>at</strong>e_) <strong>and</strong> the r<strong>and</strong>om vari<strong>at</strong>e corresponding to idle_time_. <strong>The</strong>refore, to make the first term in the sum verysmall, make the burst r<strong>at</strong>e very large so th<strong>at</strong> the tra<strong>ns</strong>mission time is negligible compared to the typical idle times.Pareto On/Off A Pareto On/Off object is embodied in the OTcl class Applic<strong>at</strong>ion/Traffic/Pareto. <strong>The</strong> member variablesth<strong>at</strong> parameterize this object are:packetSize_burst_time_idle_time_r<strong>at</strong>e_shape_the co<strong>ns</strong>tant size of the packets gener<strong>at</strong>edthe average "on" time for the gener<strong>at</strong>orthe average "off" time for the gener<strong>at</strong>orthe sending r<strong>at</strong>e during "on" timesthe "shape" parameter used by the pareto distributionA new Pareto On/Off traffic gener<strong>at</strong>or can be cre<strong>at</strong>ed as follows:336

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!