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 ...
Type ofTag Object Other values CommentsQDETECTQ INTERVALS C1 〈C1_〉 C2 〈C2_〉 dist 〈distance〉 i 〈backoff_〉Q NTIMER at 〈time〉 Time the request timer will fireQSENDNACKQ NACK IGNORE-BACKOFF 〈time〉 Receive NACK, ignore other NACKsuntil 〈time〉Q REPAIR IGNORES 〈time〉 Receive REPAIR, ignore NACKs until〈time〉Q DATA Agent receives data instead of repair.Possibly indicates out of order arrival ofdata.P NACK from 〈requester〉 Receive NACK, initiate repairP INTERVALS D1 〈D1_〉 D2 〈D2_〉 dist 〈distance〉P RTIMER at 〈time〉 Time the repair timer will firePSENDREPP REPAIR IGNORES 〈time〉 Receive REPAIR, ignore NACKs until〈time〉P DATA Agent receives data instead of repair. Indicatespremature request by an agent.S SESSION logs session message sentThe following illustrates a typical trace for a single loss and recovery.3.5543 n 1 m r 0 Q DETECT3.5543 n 1 m r 1 Q INTERVALS C1 2.0 C2 0.0 d 0.0105 i 13.5543 n 1 m r 1 Q NTIMER at 3.575273.5685 n 2 m r 0 Q DETECT3.5685 n 2 m r 1 Q INTERVALS C1 2.0 C2 0.0 d 0.021 i 13.5685 n 2 m r 1 Q NTIMER at 3.610533.5753 n 1 m r 1 Q SENDNACK3.5753 n 1 m r 2 Q INTERVALS C1 2.0 C2 0.0 d 0.0105 i 23.5753 n 1 m r 2 Q NTIMER at 3.617273.5753 n 1 m r 2 Q NACK IGNORE-BACKOFF 3.596273.5828 n 3 m r 0 Q DETECT3.5828 n 3 m r 1 Q INTERVALS C1 2.0 C2 0.0 d 0.032 i 13.5828 n 3 m r 1 Q NTIMER at 3.64683.5854 n 0 m r 0 P NACK from 2573.5854 n 0 m r 1 P INTERVALS D1 1.0 D2 0.0 d 0.01053.5854 n 0 m r 1 P RTIMER at 3.595863.5886 n 2 m r 2 Q INTERVALS C1 2.0 C2 0.0 d 0.021 i 23.5886 n 2 m r 2 Q NTIMER at 3.672623.5886 n 2 m r 2 Q NACK IGNORE-BACKOFF 3.630623.5959 n 0 m r 1 P SENDREP3.5959 n 0 m r 1 P REPAIR IGNORES 3.627363.5971 n 4 m r 0 Q DETECT3.5971 n 4 m r 1 Q INTERVALS C1 2.0 C2 0.0 d 0.0425 i 13.5971 n 4 m r 1 Q NTIMER at 3.682073.5971 n 5 m r 0 Q DETECT3.5971 n 5 m r 1 Q INTERVALS C1 2.0 C2 0.0 d 0.042 i 13.5971 n 5 m r 1 Q NTIMER at 3.681073.6029 n 3 m r 2 Q INTERVALS C1 2.0 C2 0.0 d 0.032 i 2313
3.6029 n 3 m r 2 Q NTIMER at 3.730893.6029 n 3 m r 2 Q NACK IGNORE-BACKOFF 3.666893.6102 n 1 m r 2 Q REPAIR IGNORES 3.641713.6172 n 4 m r 2 Q INTERVALS C1 2.0 C2 0.0 d 0.0425 i 23.6172 n 4 m r 2 Q NTIMER at 3.787153.6172 n 4 m r 2 Q NACK IGNORE-BACKOFF 3.702153.6172 n 5 m r 2 Q INTERVALS C1 2.0 C2 0.0 d 0.042 i 23.6172 n 5 m r 2 Q NTIMER at 3.785153.6172 n 5 m r 2 Q NACK IGNORE-BACKOFF 3.701153.6246 n 2 m r 2 Q REPAIR IGNORES 3.687563.6389 n 3 m r 2 Q REPAIR IGNORES 3.734923.6533 n 4 m r 2 Q REPAIR IGNORES 3.780773.6533 n 5 m r 2 Q REPAIR IGNORES 3.77927The logging of request and repair traces is done by SRM::evTrace{}. However, the routine SRM/Session::evTrace{},overrides the base class definition of srm::evTrace{}, and writes out nothing. Individual simulation scripts can overridethese methods for greater flexibility in logging options. One possible reason to override these methods might to reduce theamount of data generated; the new procedure could then generate compressed and processed output.Notice that the trace filoe contains sufficient information and details to derive most of the statistics written out in the log file,or is stored in the statistics arrays.36.2 Architecture and InternalsThe SRM agent implementation splits the protocol functions into packet handling, loss recovery, and session message activity.Packet handling consists of forwarding application data messages, sending and receipt of control messages. Theseactivities are executed by C++ methods.Error detection is done in C++ due to receipt of messages. However, the loss recovery is entirely done through instanceprocedures in OTcl.The sending and processing of messages is accomplished in C++; the policy about when these messages should be sentis decided by instance procedures in OTcl.We first describe the C++ processing due to receipt of messages (Section 36.3). Loss recovery and the sending of sessionmessages involves timer based processing. The agent uses a separate class SRM to perform the timer based functions. Foreach loss, an agent may do either request or repair processing. Each agent will instantiate a separate loss recovery object forevery loss, as is appropriate for the processing that it has to do. In the following section we describe the basic timer basedfunctions and the loss recovery mechanisms (Section 36.5). Finally, each agent uses one timer based function for sendingperiodic session messages (Section 36.6).36.3 Packet Handling: Processing received messagesThe recv() method can receive four type of messages: data, request, repair, and session messages.Data Packets The agent does not generate any data messages. The user has to specify an external agent to generate traffic.The recv() method must distinguish between locally originated data that must be sent to the multicast group, and data314
- 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 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: 3.6274 n 0 m r 1 type repair servi
- 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
- Page 355 and 356: An Http/Server object waits for inc
- Page 357 and 358: set tmp [new RandomVariable/Exponen
- Page 359 and 360: Object Type Event Type Explaination
- Page 361 and 362: Chapter 40Worm ModelIn this chapter
- Page 363 and 364: $w local-p 0.5Following are some co
3.6029 n 3 m r 2 Q NTIMER <strong>at</strong> 3.730893.6029 n 3 m r 2 Q NACK IGNORE-BACKOFF 3.666893.6102 n 1 m r 2 Q REPAIR IGNORES 3.641713.6172 n 4 m r 2 Q INTERVALS C1 2.0 C2 0.0 d 0.0425 i 23.6172 n 4 m r 2 Q NTIMER <strong>at</strong> 3.787153.6172 n 4 m r 2 Q NACK IGNORE-BACKOFF 3.702153.6172 n 5 m r 2 Q INTERVALS C1 2.0 C2 0.0 d 0.042 i 23.6172 n 5 m r 2 Q NTIMER <strong>at</strong> 3.785153.6172 n 5 m r 2 Q NACK IGNORE-BACKOFF 3.701153.6246 n 2 m r 2 Q REPAIR IGNORES 3.687563.6389 n 3 m r 2 Q REPAIR IGNORES 3.734923.6533 n 4 m r 2 Q REPAIR IGNORES 3.780773.6533 n 5 m r 2 Q REPAIR IGNORES 3.77927<strong>The</strong> logging of request <strong>and</strong> repair traces is done by SRM::evTrace{}. However, the routine SRM/Session::evTrace{},overrides the base class definition of srm::evTrace{}, <strong>and</strong> writes out nothing. Individual simul<strong>at</strong>ion scripts can overridethese methods for gre<strong>at</strong>er flexibility in logging optio<strong>ns</strong>. One possible reason to override these methods might to reduce theamount of d<strong>at</strong>a gener<strong>at</strong>ed; the new procedure could then gener<strong>at</strong>e compressed <strong>and</strong> processed output.Notice th<strong>at</strong> the trace filoe contai<strong>ns</strong> sufficient inform<strong>at</strong>ion <strong>and</strong> details to derive most of the st<strong>at</strong>istics written out in the log file,or is stored in the st<strong>at</strong>istics arrays.36.2 Architecture <strong>and</strong> Internals<strong>The</strong> SRM agent implement<strong>at</strong>ion splits the protocol functio<strong>ns</strong> into packet h<strong>and</strong>ling, loss recovery, <strong>and</strong> session message activity.Packet h<strong>and</strong>ling co<strong>ns</strong>ists of forwarding applic<strong>at</strong>ion d<strong>at</strong>a messages, sending <strong>and</strong> receipt of control messages. <strong>The</strong>seactivities are executed by C++ methods.Error detection is done in C++ due to receipt of messages. However, the loss recovery is entirely done through i<strong>ns</strong>tanceprocedures in OTcl.<strong>The</strong> sending <strong>and</strong> processing of messages is accomplished in C++; the policy about when these messages should be sentis decided by i<strong>ns</strong>tance procedures in OTcl.We first describe the C++ processing due to receipt of messages (Section 36.3). Loss recovery <strong>and</strong> the sending of sessionmessages involves timer based processing. <strong>The</strong> agent uses a separ<strong>at</strong>e class SRM to perform the timer based functio<strong>ns</strong>. Foreach loss, an agent may do either request or repair processing. Each agent will i<strong>ns</strong>tanti<strong>at</strong>e a separ<strong>at</strong>e loss recovery object forevery loss, as is appropri<strong>at</strong>e for the processing th<strong>at</strong> it has to do. In the following section we describe the basic timer basedfunctio<strong>ns</strong> <strong>and</strong> the loss recovery mechanisms (Section 36.5). Finally, each agent uses one timer based function for sendingperiodic session messages (Section 36.6).36.3 Packet H<strong>and</strong>ling: Processing received messages<strong>The</strong> recv() method can receive four type of messages: d<strong>at</strong>a, request, repair, <strong>and</strong> session messages.D<strong>at</strong>a Packets <strong>The</strong> agent does not gener<strong>at</strong>e any d<strong>at</strong>a messages. <strong>The</strong> user has to specify an external agent to gener<strong>at</strong>e traffic.<strong>The</strong> recv() method must distinguish between locally origin<strong>at</strong>ed d<strong>at</strong>a th<strong>at</strong> must be sent to the multicast group, <strong>and</strong> d<strong>at</strong>a314