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 ...
6.2 Acknowledgment on Reception of DATA Chunks6.3 Management Retransmission Timer6.4 Multihomed SCTP Endpoints6.5 Stream Identifier and Stream Sequence Number6.6 Ordered and Unordered Delivery6.7 Report Gaps in Received DATA TSNs7.2 SCTP Slow-Start and Congestion Avoidance8.1 Endpoint Failure Detection8.2 Path Failure Detection8.3 Path Heartbeat (without upper layer control)This agent also supports the Partial Reliability extension as of draft-ietf-tsvwg-usctp-01.txt.Association Establishment The SCTP agent establishes an association using a four-way handshake, but the handshake iskept simple and does not strictly conform to RFC2960. The handshake does not exchange tags, and the INIT and COOKIE-ECHO chunks are not used to update the RTT. Instead, RTT estimation begin with the first DATA chunk.Association Shutdown Currently, the SCTP agent does not perform a proper shutdown. The association is abruptly terminatedwhen the simulated connection ends. A shutdown procedure may be added in a future release.Multihoming The underlying infrastructure of ns-2 does not support multiple interfaces for a single node. To get aroundthis limitation, our approach allows the general support for logically multihoming nodes that have a multihomed transportlayer, such as SCTP. Each multihomed node is actually made up of more than one node. As shown in Figure 35.1, a logicallymultihomed node is made up of a single "core node" and multiple "interface nodes", one for each simulated interface. Thecore node is connected to each interface node via a uni-directional link towards the interface node, but traffic never traversesthese links. These links are only in place for the core node to make routing decisions. An SCTP agent simultaneously resideson all these nodes (i.e., the core and interface nodes), but actual traffic only goes to/from the interface nodes. Whenever theSCTP agent needs to send data to a destination and does not know which outgoing interface to use, the agent firsts consultswith the core node for a route lookup. Then, the SCTP agent performs the send from the appropriate interface node. Incomingdata is received at one of the interface nodes directly and passed up to the SCTP agent. This solution is applicable to anytransport protocol that requires multihoming functionality in ns-2. Note: the user must configure multihomed nodes usingcommands in Section 35.1.2 (an example is shown in Section 35.5.2).Packet Number vs TSN Numbering While ns starts numbering packets at 0, the SCTP module starts numbering DATAchunk TSNs at 1 and assigns undefined TSN values (-1) to control chunks (ie, INIT, SACK, HEARTBEAT, etc). The fourpackets exchanged during the association establishment are counted in the packet enumeration, but do not show up in graphs.This information is important when doing things like specifying a drop list for the ErrorModel object. For example, packet2 actually refers to the first SCTP packet with DATA chunk(s).35.1.1 Configuration ParametersSCTP supports several configuration variables which are TCL bindable. Each of the variables described in this subsection isboth a class variable and an instance variable. Changing the class variable changes the default value for all agents that are299
Figure 35.1: Example of a Multihomed Nodecreated subsequently. Changing the instance variable of a particular agent only affects the values used by that agent. Forexample,Agent/SCTP set pathMaxRetrans_ 5$sctp set pathMaxRetrans_ 5;# Changes the class variable;# Changes pathMaxRetrans_ for the $sctp object onlyThe default parameters for each SCTP agent are:Agent/SCTP set debugMask_ 0 ;# 32-bit mask for modular toggle debugging control (see explanation)Agent/SCTP set debugFileIndex_ -1;# specifies debugging output file (see explanation)Agent/SCTP set associationMaxRetrans_ 10;# RFC2960’s Association.Max.RetransAgent/SCTP set pathMaxRetrans_ 5;# RFC2960’s Path.Max.RetransAgent/SCTP set changePrimaryThresh_ -1 ;# change primary if error count exeeds thresh (default infinite)Agent/SCTP set maxInitRetransmits_ 8;# RFC2960’s Max.Init.RetransmitsAgent/SCTP set oneHeartbeatTimer_ 1;# toggle HB timer for each dest vs one for all destsAgent/SCTP set heartbeatInterval_ 30;# RFC2960’s HB.interval in secondsAgent/SCTP set mtu_ 1500;# MTU in bytes including IP headerAgent/SCTP set initialRwnd_ 65536;# initial receiver window in bytes (set on receiver side)Agent/SCTP set initialSsthresh_ 65536;# initial ssthresh value in bytesAgent/SCTP set initialCwnd_ 2;# initial cwnd in multiple of (MTU - SCTP/IP headers)Agent/SCTP set initialRto_ 3.0;# default initial RTO = 3 secsAgent/SCTP set minRto_ 1.0;# default min RTO = 1 secAgent/SCTP set maxRto_ 60.0;# default max RTO = 60 secsAgent/SCTP set fastRtxTrigger_ 4;# 4 missing reports trigger fast rtxAgent/SCTP set numOutStreams_ 1;# number of outgoing streamsAgent/SCTP set numUnrelStreams_ 0 ;# number of partially reliable streams (all grouped starting at stream 0)Agent/SCTP set reliability_ 0;# k-rtx value of all partially reliable streamsAgent/SCTP set unordered_ 0;# toggle all chunks are ordered/unorderedAgent/SCTP set ipHeaderSize_ 20;# IP header sizeAgent/SCTP set dataChunkSize_ 1468 ;# includes data chunk header and restricted to 4 byte boundaries300
- 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 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: Chapter 35SCTP AgentsThis chapter d
- 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
- 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
Figure 35.1: Example of a Multihomed Nodecre<strong>at</strong>ed subsequently. Changing the i<strong>ns</strong>tance variable of a particular agent only affects the values used by th<strong>at</strong> agent. Forexample,Agent/SCTP set p<strong>at</strong>hMaxRetra<strong>ns</strong>_ 5$sctp set p<strong>at</strong>hMaxRetra<strong>ns</strong>_ 5;# Changes the class variable;# Changes p<strong>at</strong>hMaxRetra<strong>ns</strong>_ for the $sctp object only<strong>The</strong> default parameters for each SCTP agent are:Agent/SCTP set debugMask_ 0 ;# 32-bit mask for modular toggle debugging control (see explan<strong>at</strong>ion)Agent/SCTP set debugFileIndex_ -1;# specifies debugging output file (see explan<strong>at</strong>ion)Agent/SCTP set associ<strong>at</strong>ionMaxRetra<strong>ns</strong>_ 10;# RFC2960’s Associ<strong>at</strong>ion.Max.Retra<strong>ns</strong>Agent/SCTP set p<strong>at</strong>hMaxRetra<strong>ns</strong>_ 5;# RFC2960’s P<strong>at</strong>h.Max.Retra<strong>ns</strong>Agent/SCTP set changePrimaryThresh_ -1 ;# change primary if error count exeeds thresh (default infinite)Agent/SCTP set maxInitRetra<strong>ns</strong>mits_ 8;# RFC2960’s Max.Init.Retra<strong>ns</strong>mitsAgent/SCTP set oneHeartbe<strong>at</strong>Timer_ 1;# toggle HB timer for each dest vs one for all destsAgent/SCTP set heartbe<strong>at</strong>Interval_ 30;# RFC2960’s HB.interval in secondsAgent/SCTP set mtu_ 1500;# MTU in bytes including IP headerAgent/SCTP set initialRwnd_ 65536;# initial receiver window in bytes (set on receiver side)Agent/SCTP set initialSsthresh_ 65536;# initial ssthresh value in bytesAgent/SCTP set initialCwnd_ 2;# initial cwnd in multiple of (MTU - SCTP/IP headers)Agent/SCTP set initialRto_ 3.0;# default initial RTO = 3 secsAgent/SCTP set minRto_ 1.0;# default min RTO = 1 secAgent/SCTP set maxRto_ 60.0;# default max RTO = 60 secsAgent/SCTP set fastRtxTrigger_ 4;# 4 missing reports trigger fast rtxAgent/SCTP set numOutStreams_ 1;# number of outgoing streamsAgent/SCTP set numUnrelStreams_ 0 ;# number of partially reliable streams (all grouped starting <strong>at</strong> stream 0)Agent/SCTP set reliability_ 0;# k-rtx value of all partially reliable streamsAgent/SCTP set unordered_ 0;# toggle all chunks are ordered/unorderedAgent/SCTP set ipHeaderSize_ 20;# IP header sizeAgent/SCTP set d<strong>at</strong>aChunkSize_ 1468 ;# includes d<strong>at</strong>a chunk header <strong>and</strong> restricted to 4 byte boundaries300