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 ...
theoretically bounds Classes 4 and 5, and Class 5 does not exist). As explained above, it is imperative to specify a valuedifferent from 0 and -1 to k’4 if Class 4 is to be concerned by RLCs.$q init-alcs This assigns the absolute loss guarantees (ALCs) to all four classes. L1 to L4 are given in fraction of 1. For instance, settingL1 to 0.05 means that Class-1 loss rate will be guarantees to be less than 5%. A value of -1 indicates that the correspondingclass is not subject to an ALC.$q init-adcs This assigns the absolute loss guarantees (ADCs) to all four classes. D1 to D4 are given in milliseconds. A value of -1indicates that the corresponding class is not subject to an ADC.$q trace-file This specifies the trace file for all per-hop metrics. JoBS uses an internal module to trace loss and delays, service rates, andper-class queue lengths in packets. If filename is set to null, no trace will be provided.$q link [ link]This command is required to bind a link to a JoBS queue. Note that JoBS needs to know the capacity of the link. Thus, thiscommand has to be issued before the simulation is started.$q sampling-period This command specifies the sampling interval (in packets) at which the service rate adjustments for proportionaldifferentiation will be performed. The default is a sampling interval of 1 packet, meaning that the rate allocation isreevaluated upon each packet arrival. Larger sampling intervals speed up the simulations, but typically result in poorerproportional differentiation.$q id This command affects a numerical ID to the JoBS queue.$q initializeThis command is required, and should be run after all configuration operations have been performed. This command willperform the final checks and configuration of the JoBS queue.$q copyright-infoDisplays authors and copyright information.A simple example script (with nam output), fully annotated and commented can be found in ns/tcl/ex/jobs-lossdel.tcl. Amore realistic example of a simulation with JoBS queues can be found in ns/tcl/ex/jobs-cn2002.tcl. This script is verysimilar to what was used in a simulation presented in [21]. Associated tracefiles and gnuplot scripts for visualization (in caseyou favor gnuplot over xgraph can be found in ns/tcl/ex/jobs-lossdel, and ns/tcl/ex/jobs-cn2002.Marker objects$q marker_type Selects the type of marker. 1 is DETERMINISTIC, 2 is STATISTICAL.$q marker_class For a deterministic marker, selects which class packets should be marked with.$q marker_frc For a statistical marker, gives the fraction of packets that should be marked from each class. For instance, using 0.1 for f1means that 10 percent of the traffic coming to the Marker link will be marked as Class 1.83
Demarker objects$q trace-file This command specifies the trace file used for the demarker object. filename.1 will contain the end-to-end delays of eachClass-1 packet to have reached the Demarker link, filename.2 will contain the end-to-end delays of each Class-2 packet tohave reached the Demarker link, and so forth. (There will of course be 4 trace files, one for each class.)84
- Page 33 and 34: class Packet {......static int hdrl
- Page 35 and 36: The actual arguments passed by the
- Page 37 and 38: class TclClass (Section 3.5) define
- Page 39 and 40: Chapter 4The Class SimulatorThe ove
- Page 41 and 42: 4.2.2 the heap schedulerThe heap sc
- Page 43 and 44: 4.4 Commands at a glanceSynopsis:ns
- Page 45 and 46: $ns_ dumpqCommand for dumping event
- Page 47 and 48: NODEPortClassifierAgentAgentAddrCla
- Page 49 and 50: The Node instance variable, entry_,
- Page 51 and 52: The default values for all the abov
- Page 53 and 54: The classify() method is pure virtu
- Page 55 and 56: };The class imposes no direct seman
- Page 57 and 58: flow-specific queuing disciplines a
- Page 59 and 60: 5.5 Routing Module and Classifier O
- Page 61 and 62: Module NameRtModule/BaseRtModule/Mc
- Page 63 and 64: $node neighborsThis returns the lis
- Page 65 and 66: Linkhead_enqT_queue_ deqT_ link_ tt
- Page 67 and 68: 6.2 ConnectorsConnectors, unlink cl
- Page 69 and 70: $ns_ link-lossmodel This function
- Page 71 and 72: Chapter 7Queue Management and Packe
- Page 73 and 74: }}}void Queue::resume(){Packet* p =
- Page 75 and 76: 7.3 Different types of Queue object
- Page 77 and 78: maxidle_ is the maximum amount of t
- Page 79 and 80: dst_ The destination address of pac
- Page 81 and 82: 7.5.2 ConfigurationRunning a JoBS s
- Page 83: mean_pkt_size_ Used to set the expe
- Page 87 and 88: The recv() method overrides the bas
- Page 89 and 90: 9.2 ImplementationThe procedures an
- Page 91 and 92: Average sending rateTSW window leng
- Page 93 and 94: The following command adds an entry
- Page 95 and 96: $qCE configQ 0 1 10 20 0.10Note tha
- Page 97 and 98: Chapter 10AgentsAgents represent en
- Page 99 and 100: CtrMcast/EncapCtrMcast/DecapMessage
- Page 101 and 102: }bind("windowOption_", &wnd_option_
- Page 103 and 104: hdr_flags* nf = (hdr_flags*)npkt->a
- Page 105 and 106: public:ECHO_Timer(ECHO_Agent *a) :
- Page 107 and 108: 10.6.4 Using the agent through OTcl
- Page 109 and 110: State Variables are:dupacks_ Number
- Page 111 and 112: $agent attach-tbf Attaches a token
- Page 113 and 114: (void)Scheduler::instance().schedul
- Page 115 and 116: * outstanding, cancel it.*/void Tcp
- Page 117 and 118: Chapter 12Packet Headers and Format
- Page 119 and 120: method is now obsolete; its usage i
- Page 121 and 122: Packethdrsize_next_bits()points to
- Page 123 and 124: the system’s memory allocator. In
- Page 125 and 126: }incr hdrlen_ $incrreturn $baseFrom
- Page 127 and 128: Chapter 13Error ModelThis chapter d
- Page 129 and 130: SimpleLink::errormodule argsSimulat
- Page 131 and 132: This is a simple example of how to
- Page 133 and 134: Higher LayersNode 1Node 2. . .Node
theoretically bounds Classes 4 <strong>and</strong> 5, <strong>and</strong> Class 5 does not exist). As explained above, it is imper<strong>at</strong>ive to specify a valuedifferent from 0 <strong>and</strong> -1 to k’4 if Class 4 is to be concerned by RLCs.$q init-alcs This assig<strong>ns</strong> the absolute loss guarantees (ALCs) to all four classes. L1 to L4 are given in fraction of 1. For i<strong>ns</strong>tance, settingL1 to 0.05 mea<strong>ns</strong> th<strong>at</strong> Class-1 loss r<strong>at</strong>e will be guarantees to be less than 5%. A value of -1 indic<strong>at</strong>es th<strong>at</strong> the correspondingclass is not subject to an ALC.$q init-adcs This assig<strong>ns</strong> the absolute loss guarantees (ADCs) to all four classes. D1 to D4 are given in milliseconds. A value of -1indic<strong>at</strong>es th<strong>at</strong> the corresponding class is not subject to an ADC.$q trace-file This specifies the trace file for all per-hop metrics. JoBS uses an internal module to trace loss <strong>and</strong> delays, service r<strong>at</strong>es, <strong>and</strong>per-class queue lengths in packets. If filename is set to null, no trace will be provided.$q link [ link]This comm<strong>and</strong> is required to bind a link to a JoBS queue. Note th<strong>at</strong> JoBS needs to know the capacity of the link. Thus, thiscomm<strong>and</strong> has to be issued before the simul<strong>at</strong>ion is started.$q sampling-period This comm<strong>and</strong> specifies the sampling interval (in packets) <strong>at</strong> which the service r<strong>at</strong>e adjustments for proportionaldifferenti<strong>at</strong>ion will be performed. <strong>The</strong> default is a sampling interval of 1 packet, meaning th<strong>at</strong> the r<strong>at</strong>e alloc<strong>at</strong>ion isreevalu<strong>at</strong>ed upon each packet arrival. Larger sampling intervals speed up the simul<strong>at</strong>io<strong>ns</strong>, but typically result in poorerproportional differenti<strong>at</strong>ion.$q id This comm<strong>and</strong> affects a numerical ID to the JoBS queue.$q initializeThis comm<strong>and</strong> is required, <strong>and</strong> should be run after all configur<strong>at</strong>ion oper<strong>at</strong>io<strong>ns</strong> have been performed. This comm<strong>and</strong> willperform the final checks <strong>and</strong> configur<strong>at</strong>ion of the JoBS queue.$q copyright-infoDisplays authors <strong>and</strong> copyright inform<strong>at</strong>ion.A simple example script (with nam output), fully annot<strong>at</strong>ed <strong>and</strong> commented can be found in <strong>ns</strong>/tcl/ex/jobs-lossdel.tcl. Amore realistic example of a simul<strong>at</strong>ion with JoBS queues can be found in <strong>ns</strong>/tcl/ex/jobs-cn2002.tcl. This script is verysimilar to wh<strong>at</strong> was used in a simul<strong>at</strong>ion presented in [21]. Associ<strong>at</strong>ed tracefiles <strong>and</strong> gnuplot scripts for visualiz<strong>at</strong>ion (in caseyou favor gnuplot over xgraph can be found in <strong>ns</strong>/tcl/ex/jobs-lossdel, <strong>and</strong> <strong>ns</strong>/tcl/ex/jobs-cn2002.Marker objects$q marker_type Selects the type of marker. 1 is DETERMINISTIC, 2 is STATISTICAL.$q marker_class For a deterministic marker, selects which class packets should be marked with.$q marker_frc For a st<strong>at</strong>istical marker, gives the fraction of packets th<strong>at</strong> should be marked from each class. For i<strong>ns</strong>tance, using 0.1 for f1mea<strong>ns</strong> th<strong>at</strong> 10 percent of the traffic coming to the Marker link will be marked as Class 1.83