Download - Valens-MUM2009USA
-
8/9/2019 Valens-MUM2009USA
1/25
HTB Implementation on
RouterOS QoS
Prepared by: Valens Riyadi
Citraweb Nusa Infomedia, Indonesia
www.mikrotik.co.id
-
8/9/2019 Valens-MUM2009USA
2/25
www.mikrotik.co.id 2
Introduction Valens Riyadi - [email protected]
Company: Citraweb Nusa Infomedia Mikrotik Distributor (2002), Training Partner (2005)
- www.mikrotik.co.id
Wireless ISP - www.citra.net.id
Web Developer - www.citra.web.id
Head of National Internet Resources ofIndonesian ISP Association / IDNIC
Founder and Volunteer of Airputih Foundation,an IT Emergency Task Force on Disaster Area
-
8/9/2019 Valens-MUM2009USA
3/25
www.mikrotik.co.id 3
Outline
Basic Concept
Simple HTB
Terms in HTB
Common Mistakes More detail information
-
8/9/2019 Valens-MUM2009USA
4/25
www.mikrotik.co.id 4
Basic Concept
QoS in RouterOS is not only about
bandwidth limitation, but how to distributethe bandwidth fairly
Things have to consider: How to mangle
Check packet flow and firewall documentation onmanual and wiki pages
Will not covered in this presentation
HTB (Hierarchical Token Bucket)
-
8/9/2019 Valens-MUM2009USA
5/25
www.mikrotik.co.id 5
Basic Concept HTB (Hierarchical Token Bucket) is part of QoS,
to make a hierarchical queue structure anddetermine relations between queues (priority,burst possibility, etc)
HTB is meant as a more understandable,intuitive and faster replacement for the CBQqdisc in Linux.
HTB assigned to any physical interface or virtualinterface (global-in, global-out, global-total)
-
8/9/2019 Valens-MUM2009USA
6/25
www.mikrotik.co.id 6
Sample of HTB
A has 2 children :
B
C
C has 2 children : D
E
A
C
EDB
-
8/9/2019 Valens-MUM2009USA
7/25
www.mikrotik.co.id 7
Type of Queues
Leaf queue
Most lower level, has nochild
Make actual trafficconsumption
All leaf queues aretreated on equal basis
All leafs located on themost bottom level of HTB
A
C
EDB
-
8/9/2019 Valens-MUM2009USA
8/25
www.mikrotik.co.id 8
Type of Queues
Inner queue
Have at least onechild
Responsible only fortraffic distribution
A
C
EDB
-
8/9/2019 Valens-MUM2009USA
9/25
www.mikrotik.co.id 9
Terms in HTB
Committed Information Rate (CIR)
Limit-at in RouterOS
In worst case scenario, flow will get thisamount of traffic no matter what (assumingwe can actually send so much data)
CIR works on both leaf and inner queue
-
8/9/2019 Valens-MUM2009USA
10/25
www.mikrotik.co.id 10
Terms in HTB
Maximal Information Rate (MIR)
Max-limit in RouterOS
Rate that flow can get up to, if there queue'sparent has spare bandwidth
-
8/9/2019 Valens-MUM2009USA
11/25
www.mikrotik.co.id 11
Terms in HTB
Priority
Work only for leaf (child) queue
1 .. Highest priority, and 8 lowest priority
Priority will work only if limits are specified
Priority calculated only after limit-at achieved
-
8/9/2019 Valens-MUM2009USA
12/25
www.mikrotik.co.id 12
Sample Configuration
We have 5 leaf queues:
20M1MC4
20M1MC5
20M1MC320M1MC2
20M10MC1
Max-limitLimit-atQueue
-
8/9/2019 Valens-MUM2009USA
13/25
www.mikrotik.co.id 13
Winbox Configuration
Router fail to give C1 limit-at (10M)
-
8/9/2019 Valens-MUM2009USA
14/25
www.mikrotik.co.id 14
With Parent
-
8/9/2019 Valens-MUM2009USA
15/25
www.mikrotik.co.id 15
More Hierarchy
A
B2
C5C4C3C2C1
B1
-
8/9/2019 Valens-MUM2009USA
16/25
www.mikrotik.co.id 16
HTB
C1 have better priority, get up to max-limit,all other capacity split for other leaf queue
-
8/9/2019 Valens-MUM2009USA
17/25
www.mikrotik.co.id 17
Limit-at on Inner Queue
-
8/9/2019 Valens-MUM2009USA
18/25
www.mikrotik.co.id 18
Priority on Leaf Queue
-
8/9/2019 Valens-MUM2009USA
19/25
www.mikrotik.co.id 19
Priority on Inner Queue
Priority works only on Leaf Queue, will not work on Inner Queue
-
8/9/2019 Valens-MUM2009USA
20/25
www.mikrotik.co.id 20
Common Mistakes Leaf queue without parent
Priority on Inner queue
-
8/9/2019 Valens-MUM2009USA
21/25
www.mikrotik.co.id 21
Test case We have 300 hosts on our network
In worst scenario, 200 hosts will online onthe same time
At least 20 hosts online at minimum. All hosts have same priority
Total bandwidth = 10 Mbps
-
8/9/2019 Valens-MUM2009USA
22/25
www.mikrotik.co.id 22
Tips For an office network that all computer
have same speed and same priority: Limit-at = Total bandwidth / max hosts
Max-limit = Total bandwidth / min hosts
-
8/9/2019 Valens-MUM2009USA
23/25
www.mikrotik.co.id 23
Max-limit = 10 mbps / 20 (min host)
= 500 kbps Limit-at = 10 mbps / 200 (max host)
= 50 kbps
-
8/9/2019 Valens-MUM2009USA
24/25
www.mikrotik.co.id 24
More Detail Information http://wiki.mikrotik.com/wiki/HTB
http://luxik.cdi.cz/~devik/qos/htb/
-
8/9/2019 Valens-MUM2009USA
25/25
www.mikrotik.co.id 25
Thank you! Q&A
Or email to: [email protected]