You are on page 1of 40

MUM-EU-2013

@Zagreb, Croa8a

QoS

RouterOS v6
Valens Riyadi (Citraweb)
info@mikro8k.co.id

About Me
Valens Riyadi, Citraweb (ID)
MikroTik Cer8ed Engineer
(MTCNA, MTCWE, MTCRE, MTCTCE, MTCUME, MTCINE)

MikroTik Cer8ed Trainer & Consultant


MikroTik Academy Coordinator
Citra.net.id WISP CEO
Manager for IDNIC (Indonesia Na8onal
Internet Registry)
IT Expert on Disaster Relief
Qos pada RouterOS v6

www.mikro8k.co.id

distributor

Qos pada RouterOS v6

Qos pada RouterOS v6

MikroTik Training Center


The rst MikroTik Training Center in Asia
Pasic, has taught at least 1600 par8cipants
(94 classes).
Mikro8k Academy Coordinator.

Qos pada RouterOS v6

RouterOS v6 Full Release


almost ready!

now v6rc11/12

Qos pada RouterOS v6

QoS


Some fundamental change
on RoS v6
Qos pada RouterOS v6

QoS di v5
Simple Queue
queue will be done in global-in, global-out or
global-total

Queue Tree
queue on interface, or
in global-in, global-out or global-total

Qos pada RouterOS v6

Packet Flow!
CHAIN
PREROUTING

CHAIN
FORWARD

CHAIN
INPUT

INPUT
INTERFACE

CHAIN
POSTROUTING

CHAIN
OUTPUT

LOCAL PROCESS

Qos pada RouterOS v6

OUTPUT
INTERFACE

Packet Flow and QoS v5


global in

CHAIN
PREROUTING

CHAIN
FORWARD

CHAIN
INPUT

INPUT
INTERFACE

global out

CHAIN
POSTROUTING

CHAIN
OUTPUT

LOCAL PROCESS

Qos pada RouterOS v6

HTB
interface

OUTPUT
INTERFACE

10

QoS Problem in RoS v5


No specic queue for trac to the
router, global-in will process the trac
into the router and the trac through
the router
Two 8mes queue processing (Global in
and global out) for trac through the
router.
Qos pada RouterOS v6

11

QoS Problem in RoS v5


Queue tree PCQ on parent interface - naged
network, queue for uplink trac does not
work perfectly, because PCQ done aher src-
nat
src-address already changed to router ip address
in src-nat.
pcq see only one src-address

Qos pada RouterOS v6

12

QoS RoS v6
No more global-in and global-out,
replaced by a "global" located aher
the "input" and at global-out posi8on.

Simple queue is a specic process,
located aher global.
Qos pada RouterOS v6

13

Packet Flow and QoS v6


CHAIN
PREROUTING

CHAIN
FORWARD

CHAIN
POSTROUTING
global HTB

global HTB

INPUT
INTERFACE

CHAIN
INPUT

CHAIN
OUTPUT

simple
queue
HTB
interface

simple
queue

LOCAL PROCESS

Qos pada RouterOS v6

OUTPUT
INTERFACE

14

Queue Tree v5 dan v6

RoS v6

RoS v5
Qos pada RouterOS v6

15




FORWARD


MANGLE
FILTER
FORWARD
FORWARD

POST

ROUTING
OUTPUT



ROUTING
MANGLE


ADJUSMENT
POSTROUTING





FILTER
QUEUE


OUTPUT
GLOBAL-OUT




MANGLE

SRC-NAT

OUTPUT



CONNECTION
HTB

Simple Packet Flow v5


PRE
ROUTING

ROUTING
DECISION

QUEUE

GLOBAL-IN




DST-NAT


MANGLE

PREROUTING


CONNECTION

TRACKING

INPUT
INTERFACE


INPUT

MANGLE

INPUT


FILTER

INPUT



LOCAL

PROCESS

TRACKING

INTERFACE

ROUTING
DECISION

OUTPUT
INTERFACE

Qos pada RouterOS v6

16




FORWARD


MANGLE
FILTER
FORWARD
FORWARD
POST

ROUTING

OUTPUT


MANGLE

ROUTING

POSTROUTING

ADJUSMENT



SRC-NAT


FILTER

OUTPUT


GLOBAL
HTB


MANGLE

QUEUE
OUTPUT
SIMPLE



CONNECTION

HTB

Simple Packet Flow v6


ROUTING
DECISION
INPUT
PRE
ROUTING



DST-NAT



MANGLE
PREROUTING



CONNECTION

TRACKING

INPUT
INTERFACE

MANGLE

INPUT

FILTER

INPUT



GLOBAL HTB



SIMPLE QUEUE

LOCAL
PROCESS

TRACKING
ROUTING
DECISION

Qos pada RouterOS v6

INTERFACE
OUTPUT
INTERFACE

17

Mangle Queue RoSv6


Trac to the router
we can do mangle (packet-mark) specically on
chain=input
queue tree with parent=global and packet mark

Contoh
/ip rewall mangle add src-address=10.1.1.1
chain=input ac8on=mark-packet mark-packet=p1
/queue tree add packet-mark=p1 parent=global
max-limit=1m
Qos pada RouterOS v6

18




FORWARD


MANGLE
FILTER
FORWARD
FORWARD
POST

ROUTING

OUTPUT


MANGLE

ROUTING

POSTROUTING

ADJUSMENT



SRC-NAT


FILTER

OUTPUT


GLOBAL
HTB


MANGLE

QUEUE
OUTPUT
SIMPLE



CONNECTION

HTB

Trac to the router


ROUTING
DECISION
INPUT
PRE
ROUTING



DST-NAT



MANGLE
PREROUTING



CONNECTION

TRACKING

INPUT
INTERFACE

MANGLE

INPUT

FILTER

INPUT



GLOBAL HTB



SIMPLE QUEUE

LOCAL
PROCESS

TRACKING
ROUTING
DECISION

Qos pada RouterOS v6

INTERFACE
OUTPUT
INTERFACE

19

Mangle - Queue
Trac from the router
same as previous version

Trac through the router


mangle can be done specically at chain=forward

Qos pada RouterOS v6

20




FORWARD


MANGLE
FILTER
FORWARD
FORWARD
POST

ROUTING

OUTPUT


MANGLE

ROUTING

POSTROUTING

ADJUSMENT



SRC-NAT


FILTER

OUTPUT


GLOBAL
HTB


MANGLE

QUEUE
OUTPUT
SIMPLE



CONNECTION

HTB

Trac through the router


ROUTING
DECISION
INPUT
PRE
ROUTING



DST-NAT



MANGLE
PREROUTING



CONNECTION

TRACKING

INPUT
INTERFACE

MANGLE

INPUT

FILTER

INPUT



GLOBAL HTB



SIMPLE QUEUE

LOCAL
PROCESS

TRACKING
ROUTING
DECISION

Qos pada RouterOS v6

INTERFACE
OUTPUT
INTERFACE

21

Simple Queue di RoSv5

Qos pada RouterOS v6

22

Simple Queue RoSv5


There are 2 type of target: target address and
interface
Des8na8on use only IP address (not interface)
Same priority parameter for downlink and
uplink

Qos pada RouterOS v6

23

Simple Queue at RoSv6

Qos pada RouterOS v6

24

Simple Queue v6
Target address and interface combined to
target
dst-address changed to dst, can take IP
address and also interface

Qos pada RouterOS v6

25

Simple Queue in ROSv6


Completely new algorithm, build in kernel,
faster
S8ll in sequen8al processing
Target parameter is mandatory
If target=0/0 in the rst rule, no trac for
others queue

Qos pada RouterOS v6

26

0 simple queue, 100 mbps, RB750G


v5.21

Qos pada RouterOS v6

27

1000 simple queue, 100 mbps, RB750G


v5.21

Qos pada RouterOS v6

28

1000 simple queue, 100 mbps, RB750G


v6rc2

Qos pada RouterOS v6

29

Faster at ROS 6.0rc12


Simple queue on mul8ple
processors router will 9 8mes
faster if there are at least 32
simple queue parents.

Qos pada RouterOS v6

30

Upgrade from RoSv5

Queue tree with global-in, global-out,


and global-total as parent at RoS v5.
Qos pada RouterOS v6

31

Upgrade from RoSv5

Queue tree with global-in, global-out,


and global-total as parent at RoS v5
become invalid at Rosv6.
Qos pada RouterOS v6

32

Simple queue upgrade

Qos pada RouterOS v6

33

Simple queue upgrade

(Rosv5) Means: trac for src-address


192.168.0.1 AND on interface bridge-
local
Qos pada RouterOS v6

34

Simple queue upgrade

(Rosv6) Means: trac for src-address


192.168.0.1 OR on interface bridge-
local
Qos pada RouterOS v6

35

PCQ
PCQ was introduced to op8mize massive QoS
systems, where most of the queues are
exactly the same for dierent sub-streams.

Qos pada RouterOS v6

36

PCQ
pcq-clasifier
src-address

sub-queue

Algoritma
Round
Robin

SRC-ADDRESS=10.0.0.1

SRC-ADDRESS=10.0.0.2

Flow 1
Flow 2
Flow 3

SRC-ADDRESS=10.0.0.3

SRC-ADDRESS=10.0.0.4

to
interface

SRC-ADDRESS=10.0.0.5

Flow 4
SRC-ADDRESS=10.0.0.6

SRC-ADDRESS=10.0.0.7

MTCTCE
Qos
- Spys-DataCom
ada RouterOS
- Cvitraweb
6

37

PCQ in ROS v6
Take sub-stream parameter from Connec8on
Tracking data.
It is strongly advised to enable Connec8on
Tracking.
If connec8on tracking disabled, PCQ will
calculate sub-stream in old way

Qos pada RouterOS v6

38

Double QoS
Is QoS method to do priori8za8on and
client limita8on in 1 ROS
hgp://mum.mikro8k.com/presenta8ons/CZ09/QoS_Megis.pdf
On RoS v6, we can not do double QoS
with (both) queue tree any more.
But, we s8ll can do:

priori8za8on : queue tree & mangle forward


client limita8on : simple queue with target
ip address

Qos pada RouterOS v6

39

Thank you
Comments and sugges8ons:
Valens Riyadi (valens@mikro8k.co.id)

This presenta8on was developed and sourced from RouterOSv6
Presenta8on by Janis Megis (MUM-USA-2012).

This license lets others remix, tweak, and build upon your work even for commercial purposes, as long
as they credit you and license their new crea8ons under the iden8cal terms. This license is ohen
compared to copyleh free and open source sohware licenses. All new works based on yours will carry
the same license, so any deriva8ves will also allow commercial use.
Qos pada RouterOS v6

40

You might also like