QoS in RouterOs v6

Embed Size (px)

Citation preview

  • 8/18/2019 QoS in RouterOs v6

    1/30

    QoS in RouterOS v6.xby Alfredo Giordano

    9:00 AM

    MUM ITA! "0#$

  • 8/18/2019 QoS in RouterOs v6

    2/30

    About Me

    • Graduate in ele%troni% en&ineerin&

    • Mi'rtoti' %ertified and %on(ultant and trainer

    • )or'in& tele%o**uni%ation (in%e "00#

    • RI+, *e*ber• IS+ -,O and de(i&ner

    Se%iali/ed in Routin& QoS )A1 a%%e((2irele((

    "

  • 8/18/2019 QoS in RouterOs v6

    3/30

    3or an IS+ 24at i( QoS about5

    • QoS i( about and2idt4 *ana&e*ent

    • QoS i( about enablin& %ertain tye of (ervi%e(

    • QoS i( about &uarantee %ertain level of

    (ervi%e(• QoS i( about 2ell *ana&e 24at 2e 4ave

    • QoS i( about 'eein& %u(to*er( 4ay7

    8

  • 8/18/2019 QoS in RouterOs v6

    4/30

    Identifyin& t4e roble*(

    $

  • 8/18/2019 QoS in RouterOs v6

    5/30

    Identifyin& t4e roble*(

    • a(i%ally 2e %an (lit t4e roble* in t2o

    art(: –  i*it t4e available band2idt4 er u(er or er

    tye of %ontra%t (ub(%ribed

     –  Ma'e (ure t4at %ertain tye( of (ervi%e( 2ill be

    rovided 2it4 riority re(e%t to ot4er(

    ;

  • 8/18/2019 QoS in RouterOs v6

    6/30

  • 8/18/2019 QoS in RouterOs v6

    7/30

    3unda*ental(• Traffi% %ontrol i( done on t4e outbound interfa%e

    2e 4ave no %ontrol on 4o2 *u%4 traffi% i( bein&(ent to u(

    • Rate li*it i( done by droin& (o*e lo2 rioritya%'et( (o 2e 4ave %aa%ity for 4i&4er riority

    a%'et(• )e need to 'no2 4o2 *u%4 band2idt4 i(

    available

    • ), AR, 1OT R,OR=,RI1G +A-

  • 8/18/2019 QoS in RouterOs v6

    8/30

    3unda*ental(

    Traffic Shaping

    • i*it( t4e tran(*it rate oftraffi% to a %ertain value by

    te*orary bufferin&

    ex%eedin& a%'et(:

    Traffic Priority

    • -la((ify traffi% ba(ed onali%ation.

    @

  • 8/18/2019 QoS in RouterOs v6

    9/30

    Identifyin& t4e (olution

    9

  • 8/18/2019 QoS in RouterOs v6

    10/30

    Identifyin& t4e (olution• )e need two QoS fa%ilitie(:

     –  3ir(t to %la((ify t4e traffi%:

    • et flo2 t4e 4i&4 riority a%'et(

    • =ro lo2 riority a%'et( if t4ey are %o*in& too fa(t

     –  Se%ond to (4ae t4e traffi%:

    • Avoid one u(er to *onooli/e t4e available band2idt4

    • Sell different (ervi%e( 2it4 different band2idt4 rate(

    #0

  • 8/18/2019 QoS in RouterOs v6

    11/30

    Identifyin& t4e (olution2e %an eit4er:

    • U(e t2o RouterO(

    boxe( –  e(( ard2are

    re>uire*ent(

     – 

    Bery (i*le (etu

    • Setu double QoS on a

    (in&le RouterO( box –  +o2er bud&et (olar

    anel et%..

     – 

    T4er*al bud&et –  Money bud&et

     –  Avoid a oint of failure

     – 

    Cu(t be%au(e 2e %an7

    ##

  • 8/18/2019 QoS in RouterOs v6

    12/30

    o2 to do it

    =i(%lai*er: T4i( i( one 2ay of doin& it

    t4ere are *ore

    #"

  • 8/18/2019 QoS in RouterOs v6

    13/30

    =ouble QoSRouterO( B;.x

    #8

  • 8/18/2019 QoS in RouterOs v6

    14/30

    =ouble QoSRouterO( B;.x

    #$

  • 8/18/2019 QoS in RouterOs v6

    15/30

    =ouble QoSRouterO( B;.xD a(i%ally 2e 2ill u(e t4e *ar' fa%ility t2o ti*e( D

    • Mar' traffi% by traffi% tye in *an&le %4ain +reroutin&

    • i*it traffi% by tye in GlobalDin T

    • ReDMar' traffi% by %lient( in *an&le %4ain 3or2ard• i*it traffi% er %lient in Interfa%e T

    #;

  • 8/18/2019 QoS in RouterOs v6

    16/30

    %4an&e( in RouterO( v6.x• 1o *ore &lobalDin and &lobalDout rela%ed by a

    E&lobalF lo%ated u(t before (i*le >ueue(H

    • etter (i*le >ueue( (ele%tion al&orit4* 4a(4in&H

    • Si*le >ueue( 4aen in different la%e at t4e veryend of o(troutin& and inut %4ain(H

    • Si*le >ueue( 4ave (earate riority (ettin& fordo2nloaduloadtotalH

    • Si*le >ueue( tar&etDaddre((e( and interfa%eara*eter( are oined into one tar&et ara*eter no2

    (uort( *ultile interfa%e( *at%4 for one >ueueH• Si*le >ueue( d(tDaddre(( ara*eter i( %4an&ed to d(t

    and no2 (uort( de(tination interfa%e *at%4in&H

    #6

  • 8/18/2019 QoS in RouterOs v6

    17/30

    RouterO( v6.x +a%'etflo2

    #?

  • 8/18/2019 QoS in RouterOs v6

    18/30

    =ouble QoSrouterO( B6.x

    #@

    • e%au(e >ueuin& 4aen( at one la%e 2e

    %annot *ar' >ueue re*ar' and reD>ueue a(in v;.x

    • )e %an u(e *an&le to *ar' a%'et by tye of

    (ervi%e and >ueue t4e* in >ueue tree butJ

    • )e need a (earate fa%ility to >ueue a%'et(

    to a%4ieve er u(er li*itation.• Idea(5

  • 8/18/2019 QoS in RouterOs v6

    19/30

    Si*le >ueue(• 1ot for only for (i*le ta('( any*oreJ

    • 1o need to *ar' %an identify traffi% ba(ed ond(tDaddre(( interfa%e et%J

    • 3a(tJ e(e%ially on *ulti%ore 4ard2are

    • 1u*ber of (i*le >ueue i( not relevantany*ore

    )e %an 4ave t4ou(and( of t4e* and 2e %anea(ily %reate t4e* eit4er dyna*i%ally or by(%rit(.

    #9

  • 8/18/2019 QoS in RouterOs v6

    20/30

    T4e bi& i%ture

    "0

  • 8/18/2019 QoS in RouterOs v6

    21/30

    +ra%ti%al exa*le D (i*le +++o, A-D re(tri%t band2idt4 er u(er

    D (uort voi%eD video (trea*in&

    D t ro&ra*(

    "#

  • 8/18/2019 QoS in RouterOs v6

    22/30

    Servi%e tye D +a%'et Mar'in&• Cu* to a %4ain 24ere

    2e 2ill ut t4e *ar' ont4e %onne%tion

    • Cu* to a %4ain 24ere

    2e 2ill ut t4e *ar' ont4e a%'et ba(ed on

    t4e %onne%tion

    • T4i( 2ill redu%eover4ead for %o*lex

    *at%4e(.

    ""

    • )inbox vie2

  • 8/18/2019 QoS in RouterOs v6

    23/30

    Man&le D ,xort vie2/ip firewall mangle

    add action=jump chain=forward connection-mark=no-mark jump-target=conmark

    add action=jump chain=forward connection-mark=!no-mark jump-target=pktmark

    add action=mark-connection chain=conmark comment=voip dst-port=5060-5061,16000-17000 new-connection-mark=voip-con protocol=udp

    add action=mark-connection chain=conmark comment=video dst-address-

    list=youtube new-connection-mark=video-con protocol=tcp

    add action=mark-connection chain=conmark comment=p2p new-connection-

    mark=p2p-con p2p=all-p2p

    add action=mark-connection chain=conmark comment=rest connection-mark=no-mark new-connection-mark=all-con

    add action=return chain=conmark

    add action=mark-packet chain=pktmark comment=VO connection-mark=voip-con

    new-packet-mark=VO

    add action=mark-packet chain=pktmark comment=VI connection-mark=video-con

    new-packet-mark=VIadd action=mark-packet chain=pktmark comment=BE connection-mark=all-con

    new-packet-mark=BE

    add action=mark-packet chain=pktmark comment=BK connection-mark=p2p-con

    new-packet-mark=BK

    "8

  • 8/18/2019 QoS in RouterOs v6

    24/30

    Servi%e tye K Queue Tree• +arent >ueue in &lobal

    for uload anddo2nload traffi% (et(*axDli*it

    • -4ild %la((e( 2it4

    4i&4er riority 2ill beable to rea%4 *axDli*itbefore %la(( 2it4 lo2er

    riority.• Traffi% >ueued ba(ed on

    t4e a%'et *ar'

    "$

    • )inbox vie2

  • 8/18/2019 QoS in RouterOs v6

    25/30

    Queue Tree D ,xort vie2/queue tree

    add max-limit=10M name=QOS parent=global queue=default

    add limit-at=2M max-limit=10M name=BK packet-mark=BK parent=QOSadd limit-at=2M max-limit=10M name=BE packet-mark=BE parent=QOS

    priority=6

    add limit-at=2M max-limit=10M name=VI packet-mark=VI parent=QOS

    priority=4

    add limit-at=2M max-limit=10M name=VO packet-mark=VO parent=QOSpriority=2

    ";

  • 8/18/2019 QoS in RouterOs v6

    26/30

    +er u(er li*it K =yna*i% Si*le Queue

    • )inbox vie2

    "6

  • 8/18/2019 QoS in RouterOs v6

    27/30

    =yna*i% Si*le Queue K ,xort vie2/ppp profile

    set 0 dns-server=8.8.8.8,8.8.4.4 local-address=10.0.0.6 only-

    one=yes rate-limit="256k/2560k" remote-address=customers use-vj-compression=no

    /interface pppoe-server server

    add disabled=no interface=vlan200 keepalive-timeout=35 max-

    mru=1492 max-mtu=1492 one-session-per-host=yes

    "?

  • 8/18/2019 QoS in RouterOs v6

    28/30

    +er u(er li*it K Si*le Queue

    "@

  • 8/18/2019 QoS in RouterOs v6

    29/30

    Sour%e(• QoS e(t +ra%ti%e and RouterOS v6

    re(entation( by Cani( Me&i(• Mi'roti' 2i'i

    QoS t4eory

    "9

  • 8/18/2019 QoS in RouterOs v6

    30/30

    TA1< !OU• QLA -o**ent( and (u&&e(tion(

    D Alfredo Giordano a&iordano2arian.net

    80