PHP Error Message

    Warning: Invalid argument supplied for foreach() in /home/a4298565/public_html/templates/siteground101/menu.php on line 11

Freakydot contains tutorials, free download, tips, tricks and everything you wanted to know from Information Technology. All operating system like as Windows XP, Windows 2000, Windows Vista and linux distro like as RedHat, Debian, Slackware, Mikrotik etc would an objects of contents. In the future, I may include some of the other technology like VoIP for Next Generation Network (NGN).  Many of the contains in freakydot was copy from another site which we didn’t mention. So please forgive us .... We just want to educate people with Information Technology.

Related Articles

Support us in making a small donation:


Freaky Feeds
Freakydot Feed
Configuring Mikrotik Queue Trees PDF
User Rating: / 0
PoorBest 
Saturday, 18 July 2009 04:37

The queue trees should be used when you want to use sophisticated bandwidth allocation based on protocols, ports, groups of IP addresses, etc. If you have added a simple queue, it is listed as dynamic one under the /queue tree print, e.g.:

 

[admin@MikroTik] queue simple> print
Flags: X - disabled, I - invalid
0 name="A_Simple" src-address=0.0.0.0/0 dst-address=192.168.0.0/24
interface=ether1 limit-at=128000 queue=default priority=8 bounded=yes


[admin@MikroTik] queue simple> .. tree
[admin@MikroTik] queue tree> print
Flags: X - disabled, I - invalid, D - dynamic
0 D name="A_Simple" parent=ether1 flow="" limit-at=128000 max-burst=20
queue=default priority=8 weight=1 allot=1514 bounded=yes


[admin@MikroTik] queue tree>

Argument description:

 

name - descriptive name for the queue
parent - name of the parent queue. The top-level parents are the available interfaces (actually, main CBQ). Lower level parents can be other queues. Dynamic queues (created with the simple queue tool) cannot be used as parents.
flow - flow mark of the packets to be queued. Flow marks can be assigned to the packets under /ip firewall mangle when the packets enter the router through the incoming interface
limit-at - Maximum stream bandwidth (bits/s). 0 means no limit (default for the interface).
max-burst - Maximal number of packets allowed for bursts of packets when there are no packets in the queue. Set to 0 for no burst.
queue - queue type. See the /queue type for available types.
priority - Flow priority (1..8), 1 is the highest.
weight - Flow weight in the Weighted Round Robin process
allot - Number of bytes allocated for the bandwidth. Should not be less than the MTU for the interface.
bounded - Queue is bounded.

To apply queues on flows, the mangle feature should be used first to mark incomming packets:

 

[admin@MikroTik] ip firewall mangle> add action=passthrough mark-flow=abc-http \
\... protocol=tcp src-port=80
[admin@MikroTik] ip firewall mangle> print
Flags: X - disabled, I - invalid
0 src-address=0.0.0.0/0:80 in-interface=all dst-address=0.0.0.0/0:0-65535
protocol=tcp tcp-options=any icmp-options=any:any flow=""
src-mac-address=00:00:00:00:00:00 limit-count=0 limit-burst=0
limit-time=0s action=passthrough mark-flow=abc-http tcp-mss=dont-change

[admin@MikroTik] ip firewall mangle>

See the Firewall Filters and Network Address Translation (NAT) Manual for details on how to mark the packets.

You can add queue using the /queue tree add command:

 

[admin@MikroTik] queue tree> add name=HTTP parent=ether1 flow=abc-http \
limit-at=128000 max-burst=0 bounded=yes
[admin@MikroTik] queue tree> print
Flags: X - disabled, I - invalid, D - dynamic
0 D name="A_Simple" parent=ether1 flow="" limit-at=128000 max-burst=20
queue=default priority=8 weight=1 allot=1514 bounded=yes

1 name="HTTP" parent=ether1 flow=abc-http limit-at=128000 max-burst=0
queue=default priority=8 weight=1 allot=1514 bounded=yes


[admin@MikroTik] queue tree> print brief
Flags: X - disabled, I - invalid, D - dynamic
# NAME PARENT FLOW LIMIT-AT PACKETS BYTES
1 D A_Simple ether1 128000 0 0
0 HTTP ether1 abc-http 128000 0 0
[admin@MikroTik] queue tree>