Manual:Queue: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
Megis (talk | contribs)
No edit summary
total wikify
Line 1: Line 1:
<div class=manual>


<h2>Queues</h2>
 
<div class=properties>
==Queues==
 
Submenu level: '''/queue'''
Submenu level: '''/queue'''


Line 8: Line 8:


In RouterOS it is possible to add queue in 4 different places (HTBs):
In RouterOS it is possible to add queue in 4 different places (HTBs):
<ul>
 
<li>'''global-in''' &mdash; represents all the input interfaces in general (INGRESS queue). Queues attached to global-in apply to traffic that is received by the router before the packet filtering
* '''global-in''' &mdash; represents all the input interfaces in general (INGRESS queue). Queues attached to global-in apply to traffic that is received by the router before the packet filtering
<li>'''global-out''' &mdash; represents all the output interfaces in general (EGRESS queue).
* '''global-out''' &mdash; represents all the output interfaces in general (EGRESS queue).
<li>'''global-total''' &mdash; represents all input and output interfaces together (in other words it is aggregation of global-in and global-out). Used in case when costumers have single limit for both, upload and download.
* '''global-total''' &mdash; represents all input and output interfaces together (in other words it is aggregation of global-in and global-out). Used in case when costumers have single limit for both, upload and download.
<li>'''<interface name>''' &mdash; - represents one particular outgoing interface. Only traffic that is designated to go out via this interface will pass this HTB queue
* '''<interface name>''' &mdash; - represents one particular outgoing interface. Only traffic that is designated to go out via this interface will pass this HTB queue
</ul>
 


There are two ways how to add queues in RouterOS:
There are two ways how to add queues in RouterOS:
<ul>
<li>'''/queue simple''' menu - more user-friendly implementation of queues designed to ease configuration of simple,everyday queuing tasks (such as single client upload/download limitation, p2p traffic limitation, etc.).
<li>'''/queue tree''' menu -  simplest way to implement advanced queuing tasks (such as global prioritization policy, user group limitations) require market packet flows from '''/ip firewall mangle''' facility.
</ul>
<div class=properties>


<h2>Simple Queues</h2>
* '''/queue simple''' menu - more user-friendly implementation of queues designed to ease configuration of simple,everyday queuing tasks (such as single client upload/download limitation, p2p traffic limitation, etc.).
* '''/queue tree''' menu -  simplest way to implement advanced queuing tasks (such as global prioritization policy, user group limitations) require market packet flows from '''/ip firewall mangle''' facility.
 
 
 
==Simple Queues==


<p>Simple queues represents three queues in one. Single simple queue will create one queue in global-in, one queue in global-out and one queue in global-total. If no settings are specified for a subqueue it will not be created.  </p>
Simple queues represents three queues in one. Single simple queue will create one queue in global-in, one queue in global-out and one queue in global-total. If no settings are specified for a subqueue it will not be created.   




<h4>Flow Identifiers</h4>
===Flow Identifiers===




<p><h5><var>name</var></h5> (Text) &mdash; </p>
* '''name''' (Text) :
<p><h5><var>target-addresses</var></h5> (comma separated list of IP prefixes) &mdash; </p>
* '''target-addresses''' (comma separated list of IP prefixes) :
<p><h5><var>dst-address</var></h5> (IP prefix) &mdash; </p>
* '''dst-address''' (IP prefix) :
<p><h5><var>interface</var></h5> (Name of interface, or <i>all</i>) &mdash; </p>
* '''interface''' (Name of interface, or ''all'') :
<p><h5><var>direction</var></h5> (One of <i>both</i>, <i>upload</i>, <i>download</i> or <i>none</i>) &mdash; </p>
* '''direction''' (One of ''both'', ''upload'', ''download'' or ''none'') :
<p><h5><var>time</var></h5> () &mdash; </p>
* '''time''' () :
<p><h5><var>p2p</var></h5> () &mdash; </p>
* '''p2p''' () :
<p><h5><var>packet-marks</var></h5> (Comma separated list of) &mdash; </p>
* '''packet-marks''' (Comma separated list of) :




<h4>HTB Properties</h4>
===HTB Properties===




<p><h5><var>parent</var></h5> (Name of , or <i>none</i>) &mdash; </p>
* '''parent''' (Name of , or ''none'') :
<p><h5><var>priority</var></h5> (1..8) &mdash; </p>
* '''priority''' (1..8) :


<p><h5><var>queue</var></h5> (<i><em>SOMETHING</em>/<em>SOMETHING</em></i>) &mdash; </p>
* '''queue''' (''SOMETHING/SOMETHING'') :
<p><h5><var>limit-at</var></h5> (<i><em>NUMBER</em>/<em>NUMBER</em></i>) &mdash; </p>
* '''limit-at''' (''NUMBER/NUMBER'') :
<p><h5><var>max-limit</var></h5> (<i><em>NUMBER</em>/<em>NUMBER</em></i>) &mdash; </p>
* '''max-limit''' (''NUMBER/NUMBER'') :
<p><h5><var>burst-limit</var></h5> (<i><em>NUMBER</em>/<em>NUMBER</em></i>) &mdash; </p>
* '''burst-limit''' (''NUMBER/NUMBER'') :
<p><h5><var>burst-threshold</var></h5> (<i><em>NUMBER</em>/<em>NUMBER</em></i>) &mdash; </p>
* '''burst-threshold''' (''NUMBER/NUMBER'') :
<p><h5><var>burst-time</var></h5> (<i><em>TIME</em>/<em>TIME</em></i>) &mdash; </p>
* '''burst-time''' (''TIME/TIME'') :




Line 57: Line 57:




<p><h5><var>total-queue</var></h5> () &mdash; corresponds to <var>queue</var> only for global-total queue </p>
* '''total-queue''' () &mdash; corresponds to <var>queue</var> only for global-total queue  
<p><h5><var>total-limit-at</var></h5> () &mdash; corresponds to <var>limit-at</var> only for global-total queue  </p>
* '''total-limit-at''' () &mdash; corresponds to <var>limit-at</var> only for global-total queue   
<p><h5><var>total-max-limit</var></h5> () &mdash; corresponds to <var>max-limit</var> only for global-total queue </p>
* '''total-max-limit''' () &mdash; corresponds to <var>max-limit</var> only for global-total queue  
<p><h5><var>total-burst-limit</var></h5> () &mdash; corresponds to <var>burst-limit</var> only for global-total queue </p>
* '''total-burst-limit''' () &mdash; corresponds to <var>burst-limit</var> only for global-total queue  
<p><h5><var>total-burst-threshold</var></h5> () &mdash; corresponds to <var>burst-threshold</var> only for global-total queue </p>
* '''total-burst-threshold''' () &mdash; corresponds to <var>burst-threshold</var> only for global-total queue  
<p><h5><var>total-burst-time</var></h5> () &mdash; corresponds to <var>burst-time</var> only for global-total queue </p>
* '''total-burst-time''' () &mdash; corresponds to <var>burst-time</var> only for global-total queue  


<h4>Statistics</h4>
===Statistics===


<p><h5><var>bytes</var></h5> (<i><em>NUMBER</em>/<em>NUMBER</em></i>; read-only) &mdash; </p>
* '''bytes''' (''NUMBER/NUMBER''; read-only) :
<p><h5><var>packets</var></h5> (read-only) &mdash; </p>
* '''packets''' (read-only) :
<p><h5><var>dropped</var></h5> (read-only) &mdash; </p>
* '''dropped''' (read-only) :
<p><h5><var>overlimits</var></h5> (read-only) &mdash; </p>
* '''overlimits''' (read-only) :
<p><h5><var>rate</var></h5> (read-only) &mdash; </p>
* '''rate''' (read-only) :
<p><h5><var>packet-rate</var></h5> (read-only) &mdash; </p>
* '''packet-rate''' (read-only) :
<p><h5><var>queued-packets</var></h5> (read-only) &mdash; </p>
* '''queued-packets''' (read-only) :
<p><h5><var>queued-bytes</var></h5> (read-only) &mdash; </p>
* '''queued-bytes''' (read-only) :
<p><h5><var>lends</var></h5> (read-only) &mdash; </p>
* '''lends''' (read-only) :
<p><h5><var>borrows</var></h5> (read-only) &mdash; </p>
* '''borrows''' (read-only) :
<p><h5><var>pcq-queues</var></h5> () &mdash; </p>
* '''pcq-queues''' () :




Line 82: Line 82:




<p><h5><var>total-bytes</var></h5> (read-only) &mdash; corresponds to <var>bytes</var> only for global-total queue </p>
* '''total-bytes''' (read-only) &mdash; corresponds to <var>bytes</var> only for global-total queue  
<p><h5><var>total-packets</var></h5> (read-only) &mdash; corresponds to <var>packets</var> only for global-total queue </p>
* '''total-packets''' (read-only) &mdash; corresponds to <var>packets</var> only for global-total queue  
<p><h5><var>total-dropped</var></h5> (read-only) &mdash; corresponds to <var>dropped</var> only for global-total queue </p>
* '''total-dropped''' (read-only) &mdash; corresponds to <var>dropped</var> only for global-total queue  
<p><h5><var>total-overlimits</var></h5> (read-only) &mdash; corresponds to <var>overlimits</var> only for global-total queue </p>
* '''total-overlimits''' (read-only) &mdash; corresponds to <var>overlimits</var> only for global-total queue  
<p><h5><var>total-rate</var></h5> (read-only) &mdash; corresponds to <var>rate</var> only for global-total queue </p>
* '''total-rate''' (read-only) &mdash; corresponds to <var>rate</var> only for global-total queue  
<p><h5><var>total-packet-rate</var></h5> (read-only) &mdash; corresponds to <var>packet-rate</var> only for global-total queue </p>
* '''total-packet-rate''' (read-only) &mdash; corresponds to <var>packet-rate</var> only for global-total queue  
<p><h5><var>total-queued-packets</var></h5> (read-only) &mdash; corresponds to <var>queued-packets</var> only for global-total queue </p>
* '''total-queued-packets''' (read-only) &mdash; corresponds to <var>queued-packets</var> only for global-total queue  
<p><h5><var>total-queued-bytes</var></h5> (read-only) &mdash; corresponds to <var>queued-bytes</var> only for global-total queue </p>
* '''total-queued-bytes''' (read-only) &mdash; corresponds to <var>queued-bytes</var> only for global-total queue  
<p><h5><var>total-lends</var></h5> (read-only) &mdash; corresponds to <var>lends</var> only for global-total queue </p>
* '''total-lends''' (read-only) &mdash; corresponds to <var>lends</var> only for global-total queue  
<p><h5><var>total-borrows</var></h5> (read-only) &mdash; corresponds to <var>borrows</var> only for global-total queue </p>
* '''total-borrows''' (read-only) &mdash; corresponds to <var>borrows</var> only for global-total queue  
<p><h5><var>total-pcq-queues</var></h5> (read-only) &mdash; corresponds to <var>pcq-queues</var> only for global-total queue </p>
* '''total-pcq-queues''' (read-only) &mdash; corresponds to <var>pcq-queues</var> only for global-total queue
 
</div>
</div>

Revision as of 09:48, 26 September 2008


Queues

Submenu level: /queue

Queue implementation in MikroTik RouterOS is based on Hierarchical Token Bucket (HTB). HTB allows to create hierarchical queue structure and determine relations between queues(parent-child, child priority).

In RouterOS it is possible to add queue in 4 different places (HTBs):

  • global-in — represents all the input interfaces in general (INGRESS queue). Queues attached to global-in apply to traffic that is received by the router before the packet filtering
  • global-out — represents all the output interfaces in general (EGRESS queue).
  • global-total — represents all input and output interfaces together (in other words it is aggregation of global-in and global-out). Used in case when costumers have single limit for both, upload and download.
  • <interface name> — - represents one particular outgoing interface. Only traffic that is designated to go out via this interface will pass this HTB queue


There are two ways how to add queues in RouterOS:

  • /queue simple menu - more user-friendly implementation of queues designed to ease configuration of simple,everyday queuing tasks (such as single client upload/download limitation, p2p traffic limitation, etc.).
  • /queue tree menu - simplest way to implement advanced queuing tasks (such as global prioritization policy, user group limitations) require market packet flows from /ip firewall mangle facility.


Simple Queues

Simple queues represents three queues in one. Single simple queue will create one queue in global-in, one queue in global-out and one queue in global-total. If no settings are specified for a subqueue it will not be created.


Flow Identifiers

  • name (Text) :
  • target-addresses (comma separated list of IP prefixes) :
  • dst-address (IP prefix) :
  • interface (Name of interface, or all) :
  • direction (One of both, upload, download or none) :
  • time () :
  • p2p () :
  • packet-marks (Comma separated list of) :


HTB Properties

  • parent (Name of , or none) :
  • priority (1..8) :
  • queue (SOMETHING/SOMETHING) :
  • limit-at (NUMBER/NUMBER) :
  • max-limit (NUMBER/NUMBER) :
  • burst-limit (NUMBER/NUMBER) :
  • burst-threshold (NUMBER/NUMBER) :
  • burst-time (TIME/TIME) :


And corresponding options for global-total HTB queue:


  • total-queue () — corresponds to queue only for global-total queue
  • total-limit-at () — corresponds to limit-at only for global-total queue
  • total-max-limit () — corresponds to max-limit only for global-total queue
  • total-burst-limit () — corresponds to burst-limit only for global-total queue
  • total-burst-threshold () — corresponds to burst-threshold only for global-total queue
  • total-burst-time () — corresponds to burst-time only for global-total queue

Statistics

  • bytes (NUMBER/NUMBER; read-only) :
  • packets (read-only) :
  • dropped (read-only) :
  • overlimits (read-only) :
  • rate (read-only) :
  • packet-rate (read-only) :
  • queued-packets (read-only) :
  • queued-bytes (read-only) :
  • lends (read-only) :
  • borrows (read-only) :
  • pcq-queues () :


And corresponding options for global-total HTB queue:


  • total-bytes (read-only) — corresponds to bytes only for global-total queue
  • total-packets (read-only) — corresponds to packets only for global-total queue
  • total-dropped (read-only) — corresponds to dropped only for global-total queue
  • total-overlimits (read-only) — corresponds to overlimits only for global-total queue
  • total-rate (read-only) — corresponds to rate only for global-total queue
  • total-packet-rate (read-only) — corresponds to packet-rate only for global-total queue
  • total-queued-packets (read-only) — corresponds to queued-packets only for global-total queue
  • total-queued-bytes (read-only) — corresponds to queued-bytes only for global-total queue
  • total-lends (read-only) — corresponds to lends only for global-total queue
  • total-borrows (read-only) — corresponds to borrows only for global-total queue
  • total-pcq-queues (read-only) — corresponds to pcq-queues only for global-total queue