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 ...
Agent/SCTP set useDelayedSacks_ 1 ;# toggle on/off delayed sack algorithm (set on receiver side)Agent/SCTP set sackDelay_ 0.200;# rfc2960 recommends 200 msAgent/SCTP set useMaxBurst_ 1;# toggle on/off max burstAgent/SCTP set rtxToAlt_ 1 ;# rtxs to which dest? 0 = same, 1 = alt, 2 = fast rtx to same + timeouts to altAgent/SCTP set dormantAction_ 0 ;# 0 = change dest, 1 = use primary, 2 = use last dest before dormantAgent/SCTP set routeCalcDelay_ 0;# time to calculate a route (see explanation)Agent/SCTP set routeCacheLifetime_ 1.2 ;# how long a route remains cached (see explanation)Agent/SCTP set trace_all_ 0;# toggle on/off print all variables on a trace eventThe debugMask_ parameter is a 32-bit mask to turn on/off debugging for particular functions. See ~ns/sctp/sctpDebug.hfor the mappings of the bitmask. A -1 may be used to clear all bits, and 0 is used to turn off all debugging. If debug_ (thestandard ns debug flag) is set to 1, then all the bits in debugMask_ are set. Note: ns must be compiled with -DDEBUG forthis option to work.The debugFileIndex_ parameter is an integer to specify the file used for debugging output by an SCTP agent. Eachinstance of an SCTP agent can independently output debugging info to a separate file. For example, the data sender can logdebugging output to one file, while the receiver logs to another file. If debugFileIndex_ is set to 0, the file used will benamed debug.SctpAgent.0. If -1 is used, the debug output is sent to stderr. To avoid confusion, two SCTP agents should notsend debug output to the same file. The default is -1. Note: ns must be compiled with -DDEBUG for this option to work.The configuration parameters that deal with ordering and reliability options may be overridden by an SCTP-aware application(see Section 35.4).The routeCalcDelay_ and routeCacheLifetime_ parameters are only used to optionally simulate overheads ofreactive routing protocols in MANETs without actually simulating a MANET. (Do not use this feature if you are actuallysimulating a MANET!) The default setting for routeCalcDelay_ is 0 seconds, which means that this feature is turnedoff. The default setting for routeCacheLifetime_ is 1.2 seconds (ignored if this feature is turned off), which is purposelyset slightly larger than the default min RTO to avoid a “cache miss” after a single timeout event.35.1.2 CommandsSCTP provides certain commands that can be used within TCL scripts:trace Tracks given variables. The variable (and associated information) is printed every time the value changes. Takes 1argument:cwnd_ Used to trace the cwnds of all paths.rto_ Used to trace the RTOs of all paths.errorCount_ Used to trace the error counters of all paths.frCount_ Used to trace the number of times a fast retransmit is invoked.mfrCount_ Used to trace the number of times the multiple fast retransmit algorithm is invoked. This trace variablecan only be used with the MultipleFastRtx extension agent. (See Section 35.2.2)timeoutCount_ Used to trace the total number of times a timeout has occurred on all paths.rcdCount_ Used to trace the total number of times a route calculation delay (see Section 35.1.1) has occurred on allpaths.301
Note: the actual value of these trace variables have no meaning. They are simply used to trace corresponding variables forpotentially multihomed endpoints. For example, if a sender’s peer endpoint has two destinations, the sender will maintaintwo cwnds. The cwnd_ trace variable will trace both of these cwnds together.print Provides the sampling method of tracing. This command simply prints a given variable (and associated information)per call. Takes 1 argument: one of the trace variables presented above.set-multihome-core Sets the core node for multihomed endpoints. Takes 1 argument of type node. Mandatory for multihomedendpoints and must not be set more than once per endpoint.multihome-add-interface Adds an interface to a multihomed endpoint. Takes 2 arguments of type node. Argument 1 is thecore node of the multihomed endpoint. Argument 2 is the interface node to be added. Mandatory for multihomed endpoints.All interfaces must be added after set-multihome-core is called and before multihome-attach-agent is called.multihome-attach-agent Attaches an SCTP agent to a multihomed endpoint. Takes 2 arguments. Argument 1 is the corenode. Argument 2 is the SCTP agent. Mandatory for multihomed endpoints.set-primary-destination Sets the interface node of the peer endpoint as the primary destination. Takes 1 argument of typenode. Optional and may be set more than once per endpoint. If not used, a primary destination is chosen automatically.force-source Sets the interface node that packets will be sent from. Takes 1 argument of type node. Optional and may beset more than once per endpoint. If not used, routing will automatically choose the source on a per packet basis.35.2 Extensions35.2.1 HbAfterRto SCTPThe HbAfterRto SCTP agent extends the current retransmission policy. In addition to SCTP’s current policy of retransmittingto an alternate destination on a timeout, a heartbeat is sent immediately to the destination on which a timeout occurred. Extraheartbeats provide a mechanism for a sender to update an alternate destination’s RTT estimate more frequently, thus resultingin a better RTT estimate on which to base the RTO value.For example, suppose a packet is lost in transit to the primary destination, and later gets retransmitted to an alternate destination.Also suppose that the retransmission times out. The lost packet is retransmitted again to yet another alternate destination(if one exists; otherwise, the primary). More importantly, a heartbeat is also sent to the alternate destination which timed out.If the heartbeat is successfully acked, that destination acquires an additional RTT measurement to help reduce its recentlydoubled RTO [?].35.2.2 MultipleFastRtx SCTPThe MultipleFastRtx SCTP agent attempts to minimize the number of timeouts which occur. Without the Multiple Fast Retransmitalgorithm, SCTP may only Fast Retransmit a TSN once. If a Fast Retransmitted TSN is lost, a timeout is necessary302
- 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 and 274: $ns_ mrtproto This command specifi
- Page 275 and 276: Chapter 31Network DynamicsThis chap
- 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: Figure 35.1: Example of a Multihome
- 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
- Page 325 and 326: #set up the multicast routingDM set
- Page 327 and 328: 37.3 Architecture of the PLM Protoc
- Page 329 and 330: We add in void PLMLossMonitor::recv
- Page 331 and 332: Part VIApplication330
- Page 333 and 334: Traffic generatorsApplication/Traff
- Page 335 and 336: • recv(int nbytes)—Announces th
- Page 337 and 338: 1. EXPOO_Traffic—generates traffi
- Page 339 and 340: set src [new Agent/UDP]set sink [ne
- Page 341 and 342: Application FTP FTP objects produce
- Page 343 and 344: send_data(ADU)Application(HttpApp,
- Page 345 and 346: 39.1.4 Transmitting user data over
- Page 347 and 348: and teardown of connections. Only O
- Page 349 and 350: TclObjectPagePoolPagePool/CompMathP
- Page 351 and 352: PagePool/ProxyTrace takes these two
Agent/SCTP set useDelayedSacks_ 1 ;# toggle on/off delayed sack algorithm (set on receiver side)Agent/SCTP set sackDelay_ 0.200;# rfc2960 recommends 200 msAgent/SCTP set useMaxBurst_ 1;# toggle on/off max burstAgent/SCTP set rtxToAlt_ 1 ;# rtxs to which dest? 0 = same, 1 = alt, 2 = fast rtx to same + timeouts to altAgent/SCTP set dormantAction_ 0 ;# 0 = change dest, 1 = use primary, 2 = use last dest before dormantAgent/SCTP set routeCalcDelay_ 0;# time to calcul<strong>at</strong>e a route (see explan<strong>at</strong>ion)Agent/SCTP set routeCacheLifetime_ 1.2 ;# how long a route remai<strong>ns</strong> cached (see explan<strong>at</strong>ion)Agent/SCTP set trace_all_ 0;# toggle on/off print all variables on a trace event<strong>The</strong> debugMask_ parameter is a 32-bit mask to turn on/off debugging for particular functio<strong>ns</strong>. See ~<strong>ns</strong>/sctp/sctpDebug.hfor the mappings of the bitmask. A -1 may be used to clear all bits, <strong>and</strong> 0 is used to turn off all debugging. If debug_ (thest<strong>and</strong>ard <strong>ns</strong> debug flag) is set to 1, then all the bits in debugMask_ are set. Note: <strong>ns</strong> must be compiled with -DDEBUG forthis option to work.<strong>The</strong> debugFileIndex_ parameter is an integer to specify the file used for debugging output by an SCTP agent. Eachi<strong>ns</strong>tance of an SCTP agent can independently output debugging info to a separ<strong>at</strong>e file. For example, the d<strong>at</strong>a sender can logdebugging output to one file, while the receiver logs to another file. If debugFileIndex_ is set to 0, the file used will benamed debug.SctpAgent.0. If -1 is used, the debug output is sent to stderr. To avoid confusion, two SCTP agents should notsend debug output to the same file. <strong>The</strong> default is -1. Note: <strong>ns</strong> must be compiled with -DDEBUG for this option to work.<strong>The</strong> configur<strong>at</strong>ion parameters th<strong>at</strong> deal with ordering <strong>and</strong> reliability optio<strong>ns</strong> may be overridden by an SCTP-aware applic<strong>at</strong>ion(see Section 35.4).<strong>The</strong> routeCalcDelay_ <strong>and</strong> routeCacheLifetime_ parameters are only used to optionally simul<strong>at</strong>e overheads ofreactive routing protocols in MANETs without actually simul<strong>at</strong>ing a MANET. (Do not use this fe<strong>at</strong>ure if you are actuallysimul<strong>at</strong>ing a MANET!) <strong>The</strong> default setting for routeCalcDelay_ is 0 seconds, which mea<strong>ns</strong> th<strong>at</strong> this fe<strong>at</strong>ure is turnedoff. <strong>The</strong> default setting for routeCacheLifetime_ is 1.2 seconds (ignored if this fe<strong>at</strong>ure is turned off), which is purposelyset slightly larger than the default min RTO to avoid a “cache miss” after a single timeout event.35.1.2 Comm<strong>and</strong>sSCTP provides certain comm<strong>and</strong>s th<strong>at</strong> can be used within TCL scripts:trace Tracks given variables. <strong>The</strong> variable (<strong>and</strong> associ<strong>at</strong>ed inform<strong>at</strong>ion) is printed every time the value changes. Takes 1argument:cwnd_ Used to trace the cwnds of all p<strong>at</strong>hs.rto_ Used to trace the RTOs of all p<strong>at</strong>hs.errorCount_ Used to trace the error counters of all p<strong>at</strong>hs.frCount_ Used to trace the number of times a fast retra<strong>ns</strong>mit is invoked.mfrCount_ Used to trace the number of times the multiple fast retra<strong>ns</strong>mit algorithm is invoked. This trace variablecan only be used with the MultipleFastRtx exte<strong>ns</strong>ion agent. (See Section 35.2.2)timeoutCount_ Used to trace the total number of times a timeout has occurred on all p<strong>at</strong>hs.rcdCount_ Used to trace the total number of times a route calcul<strong>at</strong>ion delay (see Section 35.1.1) has occurred on allp<strong>at</strong>hs.301