📄 queue_mgmt.tex
字号:
hashing each of the flows. \item[blimit\_] Indicates the shared buffer size in bytes. \item[quantum\_] Indicates (in bytes) how much each flow can send duringits turn. \item[mask\_] mask\_, when set to 1, means that a particular flow consistsof packets having the same node id (and possibly different port ids),otherwise a flow consists of packets having the same node and port ids. \end{description}\item RED objects:RED objects are a subclass of Queue objects that implement randomearly-detection gateways. The object can be configured to either drop or``mark'' packets. There are no methods that are specific to RED objects. Configuration Parameters are:\begin{description}\item[bytes\_] Set to "true" to enable ``byte-mode'' RED, where the sizeof arriving packets affect the likelihood of marking (dropping) packets. \item[queue-in-bytes\_]Set to "true" to measure the average queue size in bytes rather thanpackets. Enabling this option also causes thresh\_ and maxthresh\_ to beautomatically scaled by mean\_pktsize\_ (see below). \item[thresh\_]The minimum threshold for the average queue size in packets. \item[maxthresh\_]The maximum threshold for the average queue size in packets. \item[mean\_pktsize\_]A rough estimate of the average packet size in bytes. Used in updating thecalculated average queue size after an idle period. \item[q\_weight\_]The queue weight, used in the exponential-weighted moving average forcalculating the average queue size. \item[wait\_]Set to true to maintain an interval between dropped packets. \item[linterm\_]As the average queue size varies between "thresh\_" and "maxthresh\_", thepacket dropping probability varies between 0 and "1/linterm". \item[setbit\_]Set to "true" to mark packets by setting the congestion indication bit inpacket headers rather than drop packets. \item[drop-tail\_]Set to true to use drop-tail rather than randomdrop when the queueoverflows or the average queue size exceeds "maxthresh\_". For a furtherexplanation of these variables, see [2]. \end{description}None of the state variables of the RED implementation are accessible. \item CBQ objects:CBQ objects are a subclass of Queue objects that implement class-basedqueueing. \code{$cbq insert <class>}\\Insert traffic class class into the link-sharing structure associated withlink object cbq. \code{$cbq bind <cbqclass> <id1> [$id2]}\\Cause packets containing flow id id1 (or those in the range id1 toid2 inclusive) to be associated with the traffic class cbqclass. \code{$cbq algorithm <alg>}\\Select the CBQ internal algorithm. <alg> may be set to one of:"ancestor-only", "top-level", or "formal". \item CBQ/WRR objects:CBQ/WRR objects are a subclass of CBQ objects that implement weightedround-robin scheduling among classes of the same priority level. Incontrast, CBQ objects implement packet-by-packet round-robin schedulingamong classes of the same priority level. Configuration Parameters are:\begin{description}\item[maxpkt\_] The maximum size of a packet in bytes. This is used onlyby CBQ/WRR objects in computing maximum bandwidth allocations for theweighted round-robin scheduler. \end{description}\end{itemize}\textsc{CBQclass Objects}\\CBQClass objects implement the traffic classes associated with CBQobjects. \code{$cbqclass setparams <parent> <okborrow> <allot> <maxidle> <prio> <level>}\\Sets several of the configuration parameters for the CBQ traffic class(see below). \code{$cbqclass parent <cbqcl|none>}\\specify the parent of this class in the link-sharing tree. The parent maybe specified as ``none'' to indicate this class is a root. \code{$cbqclass newallot <a>}\\Change the link allocation of this class to the specified amount (in range0.0 to 1.0). Note that only the specified class is affected. \code{$cbqclass install-queue <q>}\\Install a Queue object into the compound CBQ or CBQ/WRR link structure.When a CBQ object is initially created, it includes no internal queue(only a packet classifier and scheduler).Configuration Parameters are:\begin{description}\item[okborrow\_] is a boolean indicating the class is permitted to borrowbandwidth from its parent. \item[allot\_] is the maximum fraction of link bandwidth allocated to theclass expressed as a real number between 0.0 and 1.0. \item[maxidle\_] is the maximum amount of time a class may be required tohave its packets queued before they are permitted to be forwarded \item[priority\_]is the class' priority level with respect to other classes. This value mayrange from 0 to 10, and more than one class may exist at the samepriority. Priority 0 is the highest priority. \item[level\_]is the level of this class in the link-sharing tree. Leaf nodes in thetree are considered to be at level 1; their parents are at level 2, etc. \item[extradelay\_]increase the delay experienced by a delayed class by the specified time \end{description}\textsc{Queue-monitor objects}\\QueueMonitor Objects are used to monitor a set of packet and byte arrival,departure and drop counters. It also includes support for aggregatestatistics such as average queue size, etc.\code{$queuemonitor}\\reset all the cumulative counters described below (arrivals, departures,and drops) to zero. Also, reset the integrators and delay sampler, ifdefined. \code{$queuemonitor set-delay-samples <delaySamp_>}\\Set up the Samples object delaySamp\_ to record statistics about queuedelays. delaySamp\_ is a handle to a Samples object i.e the Samples objectshould have already been created. \code{$queuemonitor get-bytes-integrator}\\Returns an Integrator object that can be used to find the integral of thequeue size in bytes. \code{$queuemonitor get-pkts-integrator}\\Returns an Integrator object that can be used to find the integral of thequeue size in packets.\code{$queuemonitor get-delay-samples}\\Returns a Samples object delaySamp\_ to record statistics about queuedelays.\\There are no configuration parameters specific to this object. \\State Variables are:\begin{description}\item[size\_] Instantaneous queue size in bytes. \item[pkts\_] Instantaneous queue size in packets. \item[parrivals\_] Running total of packets that have arrived. \item[barrivals\_] Running total of bytes contained in packets that havearrived. \item[pdepartures\_] Running total of packets that have departed (notdropped). \item[bdepartures\_] Running total of bytes contained in packets that havedeparted (not dropped). \item[pdrops\_] Total number of packets dropped. \item[bdrops\_] Total number of bytes dropped. \item[bytesInt\_] Integrator object that computes the integral of thequeue size in bytes. The sum\_ variable of this object has the running sum(integral) of the queue size in bytes. \item[pktsInt\_] Integrator object that computes the integral of the queuesize in packets. The sum\_ variable of this object has the running sum(integral) of the queue size in packets. \end{description}\textsc{QUEUEMONITOR/ED Objects}\\This derived object is capable of differentiating regular packet dropsfrom early drops. Some queues distinguish regular drops (e.g. drops due tobuffer exhaustion) from other drops (e.g. random drops in RED queues).Under some circumstances, it is useful to distinguish these two types ofdrops. \\State Variables are:\begin{description}\item[epdrops\_] The number of packets that have been dropped ``early''. \item[ebdrops\_] The number of bytes comprising packets that have beendropped ``early''. \end{description}Note: because this class is a subclass of QueueMonitor, objects of thistype also have fields such as pdrops\_ and bdrops\_. These fields describethe total number of dropped packets and bytes, including both early andnon-early drops. \textsc{QueueMonitor/ED/Flowmon Objects}\\These objects may be used in the place of a conventional QueueMonitorobject when wishing to collect per-flow counts and statistics in additionto the aggregate counts and statistics provided by the basic QueueMonitor. \code{$fmon classifier <cl>}\\This inserts (read) the specified classifier into (from) the flow monitorobject. This is used to map incoming packets to which flows they areassociated with. \code{$fmon dump}\\Dump the current per-flow counters and statistics to the I/O channelspecified in a previous attach operation. \code{$fmon flows}\\Return a character string containing the names of all flow objects knownby this flow monitor. Each of these objects are of typeQueueMonitor/ED/Flow. \code{$fmon attach <chan>}\\Attach a tcl I/O channel to the flow monitor. Flow statistics are writtento the channel when the dump operation is executed. Configuration Parameters are:\begin{description}\item[enable\_in\_] Set to true by default, indicates that per-flowarrival state should be kept by the flow monitor. If set to false, onlythe aggregate arrival information is kept. \item[enable\_out\_]Set to true by default, indicates that per-flow departure state should bekept by the flow monitor. If set to false, only the aggregate departureinformation is kept. \item[enable\_drop\_]Set to true by default, indicates that per-flow drop state should be keptby the flow monitor. If set to false, only the aggregate drop informationis kept. \item[enable\_edrop\_]Set to true by default, indicates that per-flow early drop state should bekept by the flow monitor. If set to false, only the aggregate early dropinformation is kept. \end{description}\textsc{QueueMonitor/ED/Flow Objects}\\These objects contain per-flow counts and statistics managed by aQueueMonitor/ED/Flowmon object. They are generally created in an OTclcallback procedure when a flow monitor is given a packet it cannot map onto a known flow. Note that the flow monitor's classifier is responsiblefor mapping packets to flows in some arbitrary way. Thus, depending on thetype of classifier used, not all of the state variables may be relevant(e.g. one may classify packets based only on flow id, in which case thesource and destination addresses may not be significant). State Variables are:\begin{description}\item[src\_] The source address of packets belonging to this flow. \item[dst\_] The destination address of packets belonging to this flow. \item[flowid\_] The flow id of packets belonging to this flow. \end{description}\section{Commands at a glance}\label{sec:queuecommand}Following is a list of queue commands used in simulation scripts:\begin{flushleft}\code{$ns_ queue-limit <n1> <n2> <limit>}\\This sets a limit on the maximum buffer size of the queue in the link betweennodes <n1> and <n2>.\code{$ns_ trace-queue <n1> <n2> <optional:file>}\\This sets up trace objects to log events in the queue. If tracefile is notpassed, it uses \code{traceAllFile_} to write the events.\code{$ns_ namtrace-queue <n1> <n2> <optional:file>}\\Similar to trace-queue above, this sets up nam-tracing in the queue.\code{$ns_ monitor-queue <n1> <n2> <optional:qtrace> <optional:sampleinterval>}\\This command inserts objects that allows us to monitor the queue size. Thisreturns a handle to the object that may be queried to determine the averagequeue size. The default value for sampleinterval is 0.1.\end{flushleft}\endinput
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -