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

nmlab.korea.ac.kr
from nmlab.korea.ac.kr More from this publisher
12.07.2015 Views

Returns the current BSR for the group.$ctrmcastcomp compute-mroutesThis recomputes multicast routes in the event of network dynamics or a change in unicast routes.Dense Mode The dense mode (DM) protocol can be run as PIM-DM (default) or DVMRP depending on the class variableCacheMissMode. There are no methods specific to this mcast protocol object. Class variables are:PruneTimeout Timeout value for prune state at nodes. defaults to 0.5sec.CacheMissMode Used to set PIM-DM or DVMRP type forwarding rules.Shared Tree There are no methods for this class. Variables are:RP_ RP_ indexed by group determines which node is the RP for a particular group.Bidirectional Shared Tree There are no methods for this class. Variable is same as that of Shared Tree described above.273

Chapter 31Network DynamicsThis chapter describes the capabilities in ns to make the simulation topologies dynamic. We start with the instance proceduresto the class Simulator that are useful to a simulation script (Section 31.1). The next section describes the internal architecture(Section 31.2), including the different classes and instance variables and procedures; the following section describes theinteraction with unicast routing (Section 31.3). This aspect of network dynamics is still somewhat experimental in ns. Thelast section of this chapter outlines some of the deficiencies in the current realization (Section 31.4) of network dynamics,some one or which may be fixed in the future.The procedures and functions described in this chapter can be found in ~ns/tcl/rtglib/dynamics.tcl and ~ns/tcl/lib/routeproto.tcl.31.1 The user level APIThe user level interface to network dynamics is a collection of instance procedures in the class Simulator, and one procedureto trace and log the dynamics activity. Reflecting a rather poor choice of names, these procedures are rtmodel,rtmodel-delete, and rtmodel-at. There is one other procedure, rtmodel-configure, that is used internally bythe class Simulator to configure the rtmodels just prior to simulation start. We describe this method later (Section 31.2).— The instance procedure rtmodel{} defines a model to be applied to the nodes and links in the topology. Someexamples of this command as it would be used in a simulation script are:$ns rtmodel Exponential 0.8 1.0 1.0 $n1$ns rtmodel Trace dynamics.trc $n2 $n3$ns rtmodel Deterministic 20.0 20.0 $node(1) $node(5)The procedure requires at least three arguments:• The first two arguments define the model that will be used, and the parameters to configure the model.The currently implemented models in ns are Exponential (On/Off), Deterministic (On/Off), Trace (driven), orManual (one-shot) models.• The number, format, and interpretation of the configuration parameters is specific to the particular model.1. The exponential on/off model takes four parameters: 〈[start time], up interval, down interval, [finish time]〉.〈start time〉 defaults to 0.5s. from the start of the simulation, 〈finish time〉 defaults to the end of the simulation.〈up interval〉 and 〈down interval〉 specify the mean of the exponential distribution defining the time that the274

Chapter 31Network DynamicsThis chapter describes the capabilities in <strong>ns</strong> to make the simul<strong>at</strong>ion topologies dynamic. We start with the i<strong>ns</strong>tance proceduresto the class Simul<strong>at</strong>or th<strong>at</strong> are useful to a simul<strong>at</strong>ion script (Section 31.1). <strong>The</strong> next section describes the internal architecture(Section 31.2), including the different classes <strong>and</strong> i<strong>ns</strong>tance variables <strong>and</strong> procedures; the following section describes theinteraction with unicast routing (Section 31.3). This aspect of network dynamics is still somewh<strong>at</strong> experimental in <strong>ns</strong>. <strong>The</strong>last section of this chapter outlines some of the deficiencies in the current realiz<strong>at</strong>ion (Section 31.4) of network dynamics,some one or which may be fixed in the future.<strong>The</strong> procedures <strong>and</strong> functio<strong>ns</strong> described in this chapter can be found in ~<strong>ns</strong>/tcl/rtglib/dynamics.tcl <strong>and</strong> ~<strong>ns</strong>/tcl/lib/routeproto.tcl.31.1 <strong>The</strong> user level API<strong>The</strong> user level interface to network dynamics is a collection of i<strong>ns</strong>tance procedures in the class Simul<strong>at</strong>or, <strong>and</strong> one procedureto trace <strong>and</strong> log the dynamics activity. Reflecting a r<strong>at</strong>her poor choice of names, these procedures are rtmodel,rtmodel-delete, <strong>and</strong> rtmodel-<strong>at</strong>. <strong>The</strong>re is one other procedure, rtmodel-configure, th<strong>at</strong> is used internally bythe class Simul<strong>at</strong>or to configure the rtmodels just prior to simul<strong>at</strong>ion start. We describe this method l<strong>at</strong>er (Section 31.2).— <strong>The</strong> i<strong>ns</strong>tance procedure rtmodel{} defines a model to be applied to the nodes <strong>and</strong> links in the topology. Someexamples of this comm<strong>and</strong> as it would be used in a simul<strong>at</strong>ion script are:$<strong>ns</strong> rtmodel Exponential 0.8 1.0 1.0 $n1$<strong>ns</strong> rtmodel Trace dynamics.trc $n2 $n3$<strong>ns</strong> rtmodel Deterministic 20.0 20.0 $node(1) $node(5)<strong>The</strong> procedure requires <strong>at</strong> least three arguments:• <strong>The</strong> first two arguments define the model th<strong>at</strong> will be used, <strong>and</strong> the parameters to configure the model.<strong>The</strong> currently implemented models in <strong>ns</strong> are Exponential (On/Off), Deterministic (On/Off), Trace (driven), or<strong>Manual</strong> (one-shot) models.• <strong>The</strong> number, form<strong>at</strong>, <strong>and</strong> interpret<strong>at</strong>ion of the configur<strong>at</strong>ion parameters is specific to the particular model.1. <strong>The</strong> exponential on/off model takes four parameters: 〈[start time], up interval, down interval, [finish time]〉.〈start time〉 defaults to 0.5s. from the start of the simul<strong>at</strong>ion, 〈finish time〉 defaults to the end of the simul<strong>at</strong>ion.〈up interval〉 <strong>and</strong> 〈down interval〉 specify the mean of the exponential distribution defining the time th<strong>at</strong> the274

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

Saved successfully!

Ooh no, something went wrong!