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 ...
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
- Page 223 and 224: set run [lindex $argv 0]}if {$run <
- Page 225 and 226: }$sizeRNG next-substream# print the
- Page 227 and 228: protected:RNG* rng_;};Classes deriv
- Page 229 and 230: ns-random is implemented in ~ns/mis
- Page 231 and 232: Chapter 26Trace and Monitoring Supp
- Page 233 and 234: The monitor-queue function is const
- Page 235 and 236: also used to accumulate packet drop
- Page 237 and 238: }name,th->size(),flags,iph->flowid(
- Page 239 and 240: PT_TORA,PT_DSR,PT_AODV,// insert ne
- Page 241 and 242: The QueueMonitor class is not deriv
- Page 243 and 244: $ns_ trace-all This is the command
- Page 245 and 246: Chapter 27Test Suite SupportThe ns
- Page 247 and 248: ... ...}$ns_ at $opt(stop).1 "$self
- Page 249 and 250: Example: To enable debugging in Que
- Page 251 and 252: Chapter 29Unicast RoutingThis secti
- Page 253 and 254: Asymmetric Routing Asymmetric routi
- Page 255 and 256: class RouteLogic This class defines
- Page 257 and 258: — The procedure init-all{} is a g
- Page 259 and 260: Global Actions Once the detailed ac
- Page 261 and 262: This dumps next hop information in
- Page 263 and 264: $ns mrtproto ST;# specify shared tr
- Page 265 and 266: Dense Mode The Dense Mode protocol
- Page 267 and 268: and unique label (id). Thus, “inc
- Page 269 and 270: add-iif{ifid link},add-oif{link if}
- Page 271 and 272: CtrMcastComp is the centralised mul
- Page 273: $ns_ mrtproto This command specifi
- Page 277 and 278: v 0.8123 link-up 3 5v 0.8123 link-u
- Page 279 and 280: The first argument is the time at w
- Page 281 and 282: $ns_ rtmodel This command defines
- Page 283 and 284: $ns set-address-format hierarchical
- Page 285 and 286: 32.4 Hierarchical Routing with Sess
- Page 287 and 288: Chapter 33UDP Agents33.1 UDP Agents
- Page 289 and 290: Chapter 34TCP AgentsThis section de
- Page 291 and 292: set ns [new Simulator]set node1 [$n
- Page 293 and 294: 34.2.1 The Base TCP SinkThe base TC
- Page 295 and 296: Agent/TCP/FullTcp set dupseg_fix_ t
- Page 297 and 298: 34.5 Tracing TCP DynamicsThe behavi
- Page 299 and 300: Chapter 35SCTP AgentsThis chapter d
- Page 301 and 302: Figure 35.1: Example of a Multihome
- Page 303 and 304: Note: the actual value of these tra
- Page 305 and 306: 1.526624 1 4 sctp 1500 -------D 0 1
- Page 307 and 308: $ns at 5.0 "finish"$ns run35.5.2 Mu
- Page 309 and 310: Chapter 36Agent/SRMThis chapter des
- Page 311 and 312: 36.1.2 Other Configuration Paramete
- Page 313 and 314: 3.6274 n 0 m r 1 type repair servi
- Page 315 and 316: 3.6029 n 3 m r 2 Q NTIMER at 3.730
- Page 317 and 318: 36.4 Loss Detection—The Class SRM
- Page 319 and 320: same packet. The repair objet does
- Page 321 and 322: }hdr_asrm* seh = (hdr_asrm*) p->acc
- Page 323 and 324: set grp [Node allocaddr]$srm set ds
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