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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 13Error ModelThis chapter describes the implement<strong>at</strong>ion <strong>and</strong> configur<strong>at</strong>ion of error models, which introduces packet losses into a simul<strong>at</strong>ion.In addition to the basic class ErrorModel described in details below, there are several other types of error modules not beingcompletely documented yet, which include:• SRMErrorModel, PGMErrorModel: error model for SRM <strong>and</strong> PGM.• ErrorModel/Trace: error model th<strong>at</strong> reads a loss trace (i<strong>ns</strong>tead of a m<strong>at</strong>h/computed model)• MrouteErrorModel: error model for multicast routing, now inherits from trace.• ErrorModel/Periodic: models periodic packet drops (drop every nth packet we see). This model can be convenientlycombined with a flow-based classifier to achieve drops in particular flows• SelectErrorModel: for Selective packet drop.• ErrorModel/TwoSt<strong>at</strong>e: Two-St<strong>at</strong>e: error-free <strong>and</strong> error• ErrorModel/TwoSt<strong>at</strong>eMarkov, ErrorModel/Expo, ErrorModel/Empirical: inerit from ErrorModel/TwoSt<strong>at</strong>e.• ErrorModel/List: specify a list of packets/bytes to drop, which could be in any order.<strong>The</strong>ir definitio<strong>ns</strong> can be found in ~<strong>ns</strong>/queue/errmodel.{cc, h} <strong>and</strong> ~<strong>ns</strong>/tcl/lib/<strong>ns</strong>-errmodel.tcl, <strong>ns</strong>-default.tcl.13.1 Implement<strong>at</strong>ion<strong>The</strong> procedures <strong>and</strong> functio<strong>ns</strong> described in this section can be found in ~<strong>ns</strong>/errmodel.{cc, h}.Error model simul<strong>at</strong>es link-level errors or loss by either marking the packet’s error flag or dumping the packet to a droptarget. In simul<strong>at</strong>io<strong>ns</strong>, errors can be gener<strong>at</strong>ed from a simple model such as the packet error r<strong>at</strong>e, or from more complic<strong>at</strong>edst<strong>at</strong>istical <strong>and</strong> empirical models. To support a wide variety of models, the unit of error can be specified in term of packet, bits,or time-based.<strong>The</strong> ErrorModel class is derived from the Connector base class. As the result, it inherits some methods for hooking upobjects such as target <strong>and</strong> drop-target. If the drop target exists, it will received corrupted packets from ErrorModel.126

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

Saved successfully!

Ooh no, something went wrong!