![MikroTik RouterOS v2.9 Reference Manual Download Page 431](http://html1.mh-extra.com/html/mikrotik/routeros-v2-9/routeros-v2-9_reference-manual_1794644431.webp)
disciplines are set under /queue interface for each physical interface (there is no default queuing
discipline for virtual interfaces). Once we add a queue (in /queue tree) to a physical interface, the
interface default queue, defined in /queue interface, for that particular interface gets ignored. It
means - when a packet does not match any filter, it is sent through the interface with the highest
priority.
Scheduler and Shaper qdiscs
We can classify queuing disciplines by their influence to packet flow:
• schedulers - queuing disciplines only reschedule packets regarding their algorithm and drop
packets which 'do not fit in the queue'. Scheduler queuing disciplines are: PFIFO, BFIFO, SFQ,
PCQ, RED
• shapers - queuing disciplines that also perform the limitation. Shapers are PCQ and HTB
Virtual Interfaces
There are 3 virtual interfaces in RouterOS, in addition to real interfaces:
• global-in - represents all the input interfaces in general (INGRESS queue). Please note that
queues attached to global-in apply to traffic that is received by the router, before the packet
filtering. global-in queueing is executed just after mangle and dst-nat
• global-out - represents all the output interfaces in general. Queues attached to it apply before
the ones attached to a specific interface
• global-total - represents a virtual interface through which all the data, going through the router,
is passing. When attaching a qdisc to global-total, the limitation is done in both directions. For
example, if we set a total-max-limit to 256000, we will get download=256kbps
(maximum)
Introduction to HTB
HTB (Hierarchical Token Bucket) is a classful queuing discipline that is useful for applying
different handling for different kinds of traffic. Generally, we can set only one queue for an
interface, but in RouterOS queues are attached to the main Hierarchical Token Bucket (HTB) and
thus have some properties derived from that parent queue. For example, we can set a maximum data
rate for a workgroup and then distribute that amount of traffic between the members of that
workgroup.
HTB qdisc in detail:
Page 417 of 695
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.