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 ...
to retransmit the TSN again. The Multiple Fast Retransmit algorithm allows the same TSN to be Fast Retransmitted severaltimes if needed. Without the Multiple Fast Retransmit algorithm, a large window of outstanding data may generate enoughSACKs to incorrectly trigger more than one Fast Retransmit of the same TSN in a single RTT. To avoid these spurious FastRetransmits, the Multiple Fast Retransmit algorithm introduces a fastRtxRecover state variable for each TSN Fast Retransmitted.This variable stores the highest outstanding TSN at the time a TSN is Fast Retransmitted. Then, only SACKs whichnewly ack TSNs beyond fastRtxRecover can increment the missing report for the Fast Retransmitted TSN. If the missingreport threshold for the Fast Retransmitted TSN is reached again, the sender has enough evidence that this TSN was lost andcan be Fast Retransmitted again [?].35.2.3 Timestamp SCTPThe Timestamp SCTP agent introduces timestamps into each packet, thus allowing a sender to disambiguate original transmissionsfrom retransmissions. By removing retransmission ambiguity, Karn’s algorithm can be eliminated, and successfulretransmissions on the alternate path can be used to update the RTT estimate and keep the RTO value more accurate. Withtimestamps, the sender has more samples for updating the RTT estimate of alternate destination(s) [?].35.2.4 MfrHbAfterRto SCTPThe MfrHbAfterRto SCTP agent combines the functionality of the HbAfterRto and MultipleFastRtx SCTP agents.35.2.5 MfrHbAfterRto SCTPThe MfrTimestamp SCTP agent combines the functionality of the Timestamp and MultipleFastRtx SCTP agents.35.3 Tracing SCTP DynamicsSCTP packets generated by one of the SCTP agents and destined for a peer SCTP agent over a traced link (see section 26)will generate a trace file with lines of the form:+ 0.5 1 4 sctp 56 -------I 0 1.0 4.0 1 -1 4 65535 65535- 0.5 1 4 sctp 56 -------I 0 1.0 4.0 1 -1 4 65535 65535r 0.700896 1 4 sctp 56 -------I 0 1.0 4.0 1 -1 4 65535 65535+ 0.700896 4 1 sctp 56 -------I 0 4.0 1.0 1 -1 5 65535 65535- 0.700896 4 1 sctp 56 -------I 0 4.0 1.0 1 -1 5 65535 65535r 0.901792 4 1 sctp 56 -------I 0 4.0 1.0 1 -1 5 65535 65535+ 0.901792 1 4 sctp 36 -------I 0 1.0 4.0 1 -1 6 65535 65535- 0.901792 1 4 sctp 36 -------I 0 1.0 4.0 1 -1 6 65535 65535r 1.102368 1 4 sctp 36 -------I 0 1.0 4.0 1 -1 6 65535 65535+ 1.102368 4 1 sctp 36 -------I 0 4.0 1.0 1 -1 7 65535 65535- 1.102368 4 1 sctp 36 -------I 0 4.0 1.0 1 -1 7 65535 65535r 1.302944 4 1 sctp 36 -------I 0 4.0 1.0 1 -1 7 65535 65535+ 1.302944 1 4 sctp 1500 -------D 0 1.0 4.0 1 1 8 0 0- 1.302944 1 4 sctp 1500 -------D 0 1.0 4.0 1 1 8 0 0+ 1.302944 1 4 sctp 1500 -------D 0 1.0 4.0 1 2 9 0 1- 1.326624 1 4 sctp 1500 -------D 0 1.0 4.0 1 2 9 0 1303
1.526624 1 4 sctp 1500 -------D 0 1.0 4.0 1 1 8 0 0r 1.550304 1 4 sctp 1500 -------D 0 1.0 4.0 1 2 9 0 1+ 1.550304 4 1 sctp 48 -------S 0 4.0 1.0 1 2 11 65535 65535- 1.550304 4 1 sctp 48 -------S 0 4.0 1.0 1 2 11 65535 65535r 1.751072 4 1 sctp 48 -------S 0 4.0 1.0 1 2 11 65535 65535...+ 19.302944 4 1 sctp 56 -------H 0 2.0 5.0 1 -1 336 65535 65535- 19.302944 4 1 sctp 56 -------H 0 2.0 5.0 1 -1 336 65535 65535r 19.303264 4 1 sctp 56 -------H 0 4.0 1.0 1 -1 322 65535 65535+ 19.303264 1 4 sctp 56 -------B 0 1.0 4.0 1 -1 337 65535 65535- 19.327584 1 4 sctp 56 -------B 0 1.0 4.0 1 -1 337 65535 65535r 19.52848 1 4 sctp 56 -------B 0 1.0 4.0 1 -1 337 65535 65535When tracing SCTP, packets of type sctp are relevant. Their packet type, chunk type, packet size, TSN (CumAck point forSACK chunks), stream ID, SSN, and arrival/depart/drop time are given by field positions 5, 7 (flag position 8), 6, 12, 14, 15,and 2, respectively. If a packet has more than one chunk, a line is printed for each chunk. A future release should include afield to indicate which chunk of the packet a line refers to (e.g., 2:3 could identify the 2nd chunk of a packet which contains 3chunks). Since control chunks do not use TSNs, stream IDs, or SSNs, the trace lines for these chunks use undefined numbers(-1 or 65535) for these fields. The + indicates a packet arrival, d a drop, and - a departure.Flag position 8 of field 7 indicate the chunk type as follows. The I flag indicates an association initiation control chunk (INIT,INIT-ACK, COOKIE-ECHO, COOKIE-ACK). A future release should use I for the INIT and INIT-ACK chunks, and C forthe COOKIE-ECHO and COOKIE-ACK chunks. The D, S, H, and B flags indicate a DATA chunk, a SACK, a HEARTBEATchunk, and a HEARTBEAT-ACK chunk.A number of scripts process this file to produce graphical output or statistical summaries (for example, see the finishprocedure in ~ns/tcl/test/test-suite-sctp.tcl).35.4 SCTP ApplicationsSCTP supports legacy ns applications, but they obviously cannot completely exploit all SCTP’s features. For these applications,the TCL-bound SCTP configuration parameters can be used to set reliability and ordering options. However, theseoptions cannot be controlled per message using these parameters. Only SCTP-aware application can be written to do so.ns applications wishing to become SCTP-aware can use the sendmsg API as follows (see ~ns/apps/sctp_app1.{cc, h} as anexample).1. Create and fill an instance of the AppData_S structure (see ~ns/sctp/sctp.h). The AppData_S structure has thefollowing fields:usNumStreams is the number of outgoing streams to setup during negotiation. Although this field is passedwith every sendmsg call, it is only used during association setup. Once the association is established, this field isignored.usNumUnreliable is the number of outgoing streams which are unreliable (now called partially reliable). Thesender simply sets the lowest outgoing stream to unreliable/partially-reliable; the remaining ones are reliable.This field is also only used during association establishment.usStreamId is the stream ID of a message.usReliability is the reliability level (k-rtx value) of a message. This field is ignored if the message is senton a reliable stream.304
- 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 and 302: Figure 35.1: Example of a Multihome
- Page 303: Note: the actual value of these tra
- 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
- Page 353 and 354: }int id_; // object IDWebTrafSessio
to retra<strong>ns</strong>mit the TSN again. <strong>The</strong> Multiple Fast Retra<strong>ns</strong>mit algorithm allows the same TSN to be Fast Retra<strong>ns</strong>mitted severaltimes if needed. Without the Multiple Fast Retra<strong>ns</strong>mit algorithm, a large window of outst<strong>and</strong>ing d<strong>at</strong>a may gener<strong>at</strong>e enoughSACKs to incorrectly trigger more than one Fast Retra<strong>ns</strong>mit of the same TSN in a single RTT. To avoid these spurious FastRetra<strong>ns</strong>mits, the Multiple Fast Retra<strong>ns</strong>mit algorithm introduces a fastRtxRecover st<strong>at</strong>e variable for each TSN Fast Retra<strong>ns</strong>mitted.This variable stores the highest outst<strong>and</strong>ing TSN <strong>at</strong> the time a TSN is Fast Retra<strong>ns</strong>mitted. <strong>The</strong>n, only SACKs whichnewly ack TSNs beyond fastRtxRecover can increment the missing report for the Fast Retra<strong>ns</strong>mitted TSN. If the missingreport threshold for the Fast Retra<strong>ns</strong>mitted TSN is reached again, the sender has enough evidence th<strong>at</strong> this TSN was lost <strong>and</strong>can be Fast Retra<strong>ns</strong>mitted again [?].35.2.3 Timestamp SCTP<strong>The</strong> Timestamp SCTP agent introduces timestamps into each packet, thus allowing a sender to disambigu<strong>at</strong>e original tra<strong>ns</strong>missio<strong>ns</strong>from retra<strong>ns</strong>missio<strong>ns</strong>. By removing retra<strong>ns</strong>mission ambiguity, Karn’s algorithm can be elimin<strong>at</strong>ed, <strong>and</strong> successfulretra<strong>ns</strong>missio<strong>ns</strong> on the altern<strong>at</strong>e p<strong>at</strong>h can be used to upd<strong>at</strong>e the RTT estim<strong>at</strong>e <strong>and</strong> keep the RTO value more accur<strong>at</strong>e. Withtimestamps, the sender has more samples for upd<strong>at</strong>ing the RTT estim<strong>at</strong>e of altern<strong>at</strong>e destin<strong>at</strong>ion(s) [?].35.2.4 MfrHbAfterRto SCTP<strong>The</strong> MfrHbAfterRto SCTP agent combines the functionality of the HbAfterRto <strong>and</strong> MultipleFastRtx SCTP agents.35.2.5 MfrHbAfterRto SCTP<strong>The</strong> MfrTimestamp SCTP agent combines the functionality of the Timestamp <strong>and</strong> MultipleFastRtx SCTP agents.35.3 Tracing SCTP DynamicsSCTP packets gener<strong>at</strong>ed by one of the SCTP agents <strong>and</strong> destined for a peer SCTP agent over a traced link (see section 26)will gener<strong>at</strong>e a trace file with lines of the form:+ 0.5 1 4 sctp 56 -------I 0 1.0 4.0 1 -1 4 65535 65535- 0.5 1 4 sctp 56 -------I 0 1.0 4.0 1 -1 4 65535 65535r 0.700896 1 4 sctp 56 -------I 0 1.0 4.0 1 -1 4 65535 65535+ 0.700896 4 1 sctp 56 -------I 0 4.0 1.0 1 -1 5 65535 65535- 0.700896 4 1 sctp 56 -------I 0 4.0 1.0 1 -1 5 65535 65535r 0.901792 4 1 sctp 56 -------I 0 4.0 1.0 1 -1 5 65535 65535+ 0.901792 1 4 sctp 36 -------I 0 1.0 4.0 1 -1 6 65535 65535- 0.901792 1 4 sctp 36 -------I 0 1.0 4.0 1 -1 6 65535 65535r 1.102368 1 4 sctp 36 -------I 0 1.0 4.0 1 -1 6 65535 65535+ 1.102368 4 1 sctp 36 -------I 0 4.0 1.0 1 -1 7 65535 65535- 1.102368 4 1 sctp 36 -------I 0 4.0 1.0 1 -1 7 65535 65535r 1.302944 4 1 sctp 36 -------I 0 4.0 1.0 1 -1 7 65535 65535+ 1.302944 1 4 sctp 1500 -------D 0 1.0 4.0 1 1 8 0 0- 1.302944 1 4 sctp 1500 -------D 0 1.0 4.0 1 1 8 0 0+ 1.302944 1 4 sctp 1500 -------D 0 1.0 4.0 1 2 9 0 1- 1.326624 1 4 sctp 1500 -------D 0 1.0 4.0 1 2 9 0 1303