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 ...
maxthresh_ The maximum threshold for the average queue size in packets.mean_pktsize_ A rough estimate of the average packet size in bytes. Used in updating the calculated average queuesize after an idle period.q_weight_ The queue weight, used in the exponential-weighted moving average for calculating the average queue size.wait_ Set to true to maintain an interval between dropped packets.linterm_ As the average queue size varies between "thresh_" and "maxthresh_", the packet dropping probability variesbetween 0 and "1/linterm".setbit_ Set to "true" to mark packets by setting the congestion indication bit in packet headers rather than drop packets.drop-tail_ Set to true to use drop-tail rather than randomdrop when the queue overflows or the average queue sizeexceeds "maxthresh_". For a further explanation of these variables, see [2].None of the state variables of the RED implementation are accessible.• CBQ objects: CBQ objects are a subclass of Queue objects that implement class-based queueing.$cbq insert Insert traffic class class into the link-sharing structure associated with link object cbq.$cbq bind [$id2]Cause packets containing flow id id1 (or those in the range id1 to id2 inclusive) to be associated with the traffic classcbqclass.$cbq algorithm Select the CBQ internal algorithm. may be set to one of: "ancestor-only", "top-level", or "formal".• CBQ/WRR objects: CBQ/WRR objects are a subclass of CBQ objects that implement weighted round-robin schedulingamong classes of the same priority level. In contrast, CBQ objects implement packet-by-packet round-robin schedulingamong classes of the same priority level. Configuration Parameters are:maxpkt_ The maximum size of a packet in bytes. This is used only by CBQ/WRR objects in computing maximumbandwidth allocations for the weighted round-robin scheduler.CBQCLASS OBJECTSCBQClass objects implement the traffic classes associated with CBQ objects.$cbqclass setparams Sets several of the configuration parameters for the CBQ traffic class (see below).$cbqclass parent specify the parent of this class in the link-sharing tree. The parent may be specified as “none” to indicate this class is a root.$cbqclass newallot Change the link allocation of this class to the specified amount (in range 0.0 to 1.0). Note that only the specified class isaffected.$cbqclass install-queue Install a Queue object into the compound CBQ or CBQ/WRR link structure. When a CBQ object is initially created, itincludes no internal queue (only a packet classifier and scheduler).Configuration Parameters are:okborrow_ is a boolean indicating the class is permitted to borrow bandwidth from its parent.allot_ is the maximum fraction of link bandwidth allocated to the class expressed as a real number between 0.0 and 1.0.75
maxidle_ is the maximum amount of time a class may be required to have its packets queued before they are permitted to beforwardedpriority_ is the class’ priority level with respect to other classes. This value may range from 0 to 10, and more than one classmay exist at the same priority. Priority 0 is the highest priority.level_ is the level of this class in the link-sharing tree. Leaf nodes in the tree are considered to be at level 1; their parents areat level 2, etc.extradelay_ increase the delay experienced by a delayed class by the specified timeQUEUE-MONITOR OBJECTSQueueMonitor Objects are used to monitor a set of packet and byte arrival, departure and drop counters. It also includessupport for aggregate statistics such as average queue size, etc.$queuemonitorreset all the cumulative counters described below (arrivals, departures, and drops) to zero. Also, reset the integrators anddelay sampler, if defined.$queuemonitor set-delay-samples Set up the Samples object delaySamp_ to record statistics about queue delays. delaySamp_ is a handle to a Samples objecti.e the Samples object should have already been created.$queuemonitor get-bytes-integratorReturns an Integrator object that can be used to find the integral of the queue size in bytes.$queuemonitor get-pkts-integratorReturns an Integrator object that can be used to find the integral of the queue size in packets.$queuemonitor get-delay-samplesReturns a Samples object delaySamp_ to record statistics about queue delays.There are no configuration parameters specific to this object.State Variables are:size_ Instantaneous queue size in bytes.pkts_ Instantaneous queue size in packets.parrivals_ Running total of packets that have arrived.barrivals_ Running total of bytes contained in packets that have arrived.pdepartures_ Running total of packets that have departed (not dropped).bdepartures_ Running total of bytes contained in packets that have departed (not dropped).pdrops_ Total number of packets dropped.bdrops_ Total number of bytes dropped.bytesInt_ Integrator object that computes the integral of the queue size in bytes. The sum_ variable of this object has therunning sum (integral) of the queue size in bytes.pktsInt_ Integrator object that computes the integral of the queue size in packets. The sum_ variable of this object has therunning sum (integral) of the queue size in packets.76
- Page 25 and 26: By convention in ns, the class Agen
- Page 27 and 28: $object set bwvar 1500kb$object set
- Page 29 and 30: For a C++ variable to be traceable,
- Page 31 and 32: 3.5 Class TclClassThis compiled cla
- 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: 7.3 Different types of Queue object
- Page 79 and 80: dst_ The destination address of pac
- Page 81 and 82: 7.5.2 ConfigurationRunning a JoBS s
- Page 83 and 84: mean_pkt_size_ Used to set the expe
- Page 85 and 86: Demarker objects$q trace-file This
- 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
maxidle_ is the maximum amount of time a class may be required to have its packets queued before they are permitted to beforwardedpriority_ is the class’ priority level with respect to other classes. This value may range from 0 to 10, <strong>and</strong> more than one classmay exist <strong>at</strong> the same priority. Priority 0 is the highest priority.level_ is the level of this class in the link-sharing tree. Leaf nodes in the tree are co<strong>ns</strong>idered to be <strong>at</strong> level 1; their parents are<strong>at</strong> level 2, etc.extradelay_ increase the delay experienced by a delayed class by the specified timeQUEUE-MONITOR OBJECTSQueueMonitor Objects are used to monitor a set of packet <strong>and</strong> byte arrival, departure <strong>and</strong> drop counters. It also includessupport for aggreg<strong>at</strong>e st<strong>at</strong>istics such as average queue size, etc.$queuemonitorreset all the cumul<strong>at</strong>ive counters described below (arrivals, departures, <strong>and</strong> drops) to zero. Also, reset the integr<strong>at</strong>ors <strong>and</strong>delay sampler, if defined.$queuemonitor set-delay-samples Set up the Samples object delaySamp_ to record st<strong>at</strong>istics about queue delays. delaySamp_ is a h<strong>and</strong>le to a Samples objecti.e the Samples object should have already been cre<strong>at</strong>ed.$queuemonitor get-bytes-integr<strong>at</strong>orRetur<strong>ns</strong> an Integr<strong>at</strong>or object th<strong>at</strong> can be used to find the integral of the queue size in bytes.$queuemonitor get-pkts-integr<strong>at</strong>orRetur<strong>ns</strong> an Integr<strong>at</strong>or object th<strong>at</strong> can be used to find the integral of the queue size in packets.$queuemonitor get-delay-samplesRetur<strong>ns</strong> a Samples object delaySamp_ to record st<strong>at</strong>istics about queue delays.<strong>The</strong>re are no configur<strong>at</strong>ion parameters specific to this object.St<strong>at</strong>e Variables are:size_ I<strong>ns</strong>tantaneous queue size in bytes.pkts_ I<strong>ns</strong>tantaneous queue size in packets.parrivals_ Running total of packets th<strong>at</strong> have arrived.barrivals_ Running total of bytes contained in packets th<strong>at</strong> have arrived.pdepartures_ Running total of packets th<strong>at</strong> have departed (not dropped).bdepartures_ Running total of bytes contained in packets th<strong>at</strong> have departed (not dropped).pdrops_ Total number of packets dropped.bdrops_ Total number of bytes dropped.bytesInt_ Integr<strong>at</strong>or object th<strong>at</strong> computes the integral of the queue size in bytes. <strong>The</strong> sum_ variable of this object has therunning sum (integral) of the queue size in bytes.pktsInt_ Integr<strong>at</strong>or object th<strong>at</strong> computes the integral of the queue size in packets. <strong>The</strong> sum_ variable of this object has therunning sum (integral) of the queue size in packets.76