Routeros Mikrotik Tutorial - Setting Bandwitdh Mikrotik Dengan Queue Tree [Marking Packet Game, Streaming, Browsing]


Sebagai penyedia layanan saluran internet, tentu kita ingin menunjukkan layanan terbaik sehingga semua kebutuhan pengguna internet dapat diakomodasi dan dapat menjalankan aktifitas browsing, streaming, maupun bermain game online dengan nyaman.

Masalah yang biasa terjadi yakni dikala 2 atau lebih saluran yang berbeda, menyerupai browsing, streaming dan game online terjadi pada satu jaringan yang sama, antara keduanya dapat saling menganggu.
Misalnya, pada warnet atau wargame (warnet dan game online) dikala banyak yang bermain game online dan streaming, traffic browsing akan terganggu. untuk mengatasi hal tersebut mari kita kupas dan praktekan megenai management bandwitdh dengan queue tree mikrotik.

Langkah-langkah yang harus kita lakukan ada sebagai berikut :
  •  Buat dulu firewal layer 7 regexp nya

Mode CLI


/ip firewall layer7-protocol
add name=skypetoskype regexp="^..\\x02............."
add name=UA-IDM regexp="get /.*(user-agent: mozilla/4.0|range: bytes=)"
add name=stream_7 regexp=\
    "^.*(get|GET).+(\\.flv|\\.mp3|\\.mp4|netflix|\\.swf).*\$"
add comment=bittorrent name=bittorrent regexp="^(\13bittorrent protocol|azver\
    \01\$|get /scrape\\\?info_hash=)|d1:ad2:id20:|\08'7P\\)[RP]"
add comment=extensi name=extensi regexp="^.*get.+\\.(exe|rar|iso|zip|7zip|0[0-\
    9][1-9]|flv|mkv|avi|mp4|3gp|rmvb|mp3|img|mov|zip|rar|7z|mpeg|cod|ipsw|mpg|\
    wav|wmv|kom|mars|fma|zpc|tga|nup|mar|cod|ipsw|gem|bin|cab|avc|vpx|microsof\
    t|windowsupdate).*\$"
add comment=streaming name=streaming regexp=\
    videoplayback|video|movie|youtube
Copy - Paste di Terminal
  • Kedua sesuaikan queue type nya dengan management bandwitdh anda 

Mode CLI


/queue type
add kind=pcq name=DOWNLOAD pcq-classifier=dst-address,dst-port \
    pcq-dst-address6-mask=64 pcq-rate=512k pcq-src-address6-mask=64
add kind=pcq name=UPLOAD pcq-classifier=src-address pcq-dst-address6-mask=64 \
    pcq-rate=384k pcq-src-address6-mask=64
add kind=pcq name=GAME pcq-classifier=\
    src-address,dst-address,src-port,dst-port pcq-dst-address6-mask=64 \
    pcq-rate=2560k pcq-src-address6-mask=64
add kind=pcq name=HTTP pcq-classifier=\
    src-address,dst-address,src-port,dst-port pcq-dst-address6-mask=64 \
    pcq-rate=768k pcq-src-address6-mask=64
add kind=pfifo name=PING pfifo-limit=64
add kind=pfifo name=pfifo_icmp pfifo-limit=10
Copy - Paste di Terminal
  • Buat firewall Mangle nya : jangan lupa sesuaikan dengan kebutuhan anda ya !

Mode CLI


/ip firewall mangle
add action=mark-connection chain=prerouting comment="GAME ONLINE TCP" \
    dst-port="18900-18910,1818,39190,49100,7777,19101,27780,29000,22100,5121,6\
    000-6152,14500-14501" new-connection-mark="GAME ONLINE" protocol=tcp
add action=mark-connection chain=prerouting dst-port="9090-9099,12310-12320,39\
    190,6112,6000-6099,28901-28925,14300-14325,15500,5101,5201" \
    new-connection-mark="GAME ONLINE" protocol=tcp
add action=mark-connection chain=prerouting dst-port="8888,7725,7780,49100,910\
    0,9200,7778,2001-2005,34220,2122,8383,1993-1994,81" new-connection-mark=\
    "GAME ONLINE" protocol=tcp
add action=mark-connection chain=prerouting dst-port="5567-5570,6543-6546,5000\
    -5020,14300-14440,10500-10610,16666-16668,28000-28013,8086" \
    new-connection-mark="GAME ONLINE" protocol=tcp
add action=mark-connection chain=prerouting dst-port="9601-9602,8085,11011-110\
    41,13413,19000,5105,10009,5340-5352,6000-6001,29200,10402" \
    new-connection-mark="GAME ONLINE" protocol=tcp
add action=mark-connection chain=prerouting dst-port="15000-15002,16402-16502,\
    5126,3010,11031,4300,12011,12110,15001,15002,7341,7451,22108" \
    new-connection-mark="GAME ONLINE" protocol=tcp
add action=mark-connection chain=prerouting dst-port="9600,16402-16502,5171,30\
    10,11031,4300,12011,12110,15001,15002,7341-7350,30000-30003" \
    new-connection-mark="GAME ONLINE" protocol=tcp
add action=mark-connection chain=prerouting dst-port="8400,8600,8800,28001-280\
    10,20110-20120,7201-7208,7401,13008,27932-27935,3101-3120" \
    new-connection-mark="GAME ONLINE" protocol=tcp
add action=mark-connection chain=prerouting dst-port=9110,2424,3443,53 \
    new-connection-mark="GAME ONLINE" protocol=tcp
add action=mark-connection chain=prerouting comment="GAME ONLINE UDP" \
    dst-port="40000-40010,9601-9602,12060-12070,11100-11500,7808,30000,12011,1\
    2110,27010-27017,1293" new-connection-mark="GAME ONLINE" protocol=udp
add action=mark-connection chain=prerouting dst-port=\
    123,137,138,53,36936,36937 new-connection-mark="GAME ONLINE" protocol=udp
add action=mark-connection chain=prerouting dst-port="14009-14026,10020-10022,\
    12000-15900,15100-15150,50000-50100,54500-56500,12310-12320,15500" \
    new-connection-mark="GAME ONLINE" protocol=udp
add action=mark-connection chain=prerouting dst-port="30002-30008,7777-7977,42\
    051-42052,40040-40500,1479,9401,9600,1660-2960,8001,39311" \
    new-connection-mark="GAME ONLINE" protocol=udp
add action=mark-connection chain=prerouting dst-port="14101-14105,5101,5201,26\
    001-26010,17001-17002,7533,7533,16425-16650,5171,16318" \
    new-connection-mark="GAME ONLINE" protocol=udp
add action=mark-packet chain=prerouting connection-mark="GAME ONLINE" \
    new-packet-mark="game onlines" passthrough=no
add action=mark-connection chain=prerouting comment="GAME FB" dst-port=\
    843,8000,8001,8012,8890,9001,9339,4000,5222,5313 new-connection-mark=\
    game_fb protocol=tcp
add action=mark-packet chain=prerouting connection-mark=game_fb \
    new-packet-mark=game_fb passthrough=no
add action=mark-connection chain=prerouting comment="ALL PC" in-interface=\
    port3-Speedy new-connection-mark=Http|s-Conn protocol=tcp src-port=80,443
add action=mark-packet chain=prerouting connection-mark=Http|s-Conn \
    new-packet-mark=Http|s-Conn packet-mark="!game onlines" passthrough=no
add action=mark-connection chain=prerouting comment=Upload connection-mark=\
    "!GAME ONLINE" dst-port=80,443 in-interface=port5-Warnet \
    new-connection-mark=upload_conn protocol=tcp
add action=mark-connection chain=prerouting comment=Upload connection-mark=\
    "!GAME ONLINE" dst-port=80,443 in-interface=port5-port4-Timur \
    new-connection-mark=upload_conn protocol=tcp
add action=mark-connection chain=prerouting comment=Upload connection-mark=\
    "!GAME ONLINE" dst-port=80,443 in-interface=port5-port2-Home \
    new-connection-mark=upload_conn protocol=tcp
    new-connection-mark=upload_conn protocol=tcp
add action=mark-connection chain=prerouting comment=Upload connection-mark=\
    "!GAME ONLINE" dst-port=80,443 in-interface=port5-port1-Omni \
    new-connection-mark=upload_conn protocol=tcp
add action=mark-packet chain=prerouting connection-mark=upload_conn \
    new-packet-mark=upload passthrough=no
add action=mark-packet chain=forward comment="LIMIT ALL" layer7-protocol=\
    streaming new-packet-mark=streaming passthrough=no
add action=mark-packet chain=forward layer7-protocol=extensi new-packet-mark=\
    extensi passthrough=no
add action=mark-packet chain=forward layer7-protocol=bittorrent \
    new-packet-mark=bittorrent passthrough=no
add action=jump chain=prerouting comment=UDP-Browsing jump-target=browsing
add action=mark-connection chain=browsing connection-bytes=0-524288 dst-port=\
    80,443,19302-19309 new-connection-mark=bros_conn protocol=udp
add action=mark-packet chain=browsing connection-mark=bros_conn \
    new-packet-mark=b_out_pkt passthrough=no
Copy - Paste di Terminal

Mode CLI


/queue tree
add max-limit=2M name="1. Upload" parent=global
add name="2. Download" parent=global
add max-limit=10M name="3. all about layer7" parent=global-out
add max-limit=2M name="1. Upload" parent=global
add name="2. Download" parent=global
add max-limit=10M name="3. all about layer7" parent=global
add name=Browsing packet-mark=b_out_pkt parent="2. Download" queue=default
add limit-at=512k max-limit=7M name=youtube packet-mark=streaming parent=\
    "3. all about layer7" queue=DOWNLOAD
add limit-at=512k max-limit=5M name=limitEx packet-mark=extensi parent=\
    "3. all about layer7" queue=DOWNLOAD
add limit-at=512k max-limit=1M name=torrent packet-mark=bittorrent parent=\
    "3. all about layer7" queue=DOWNLOAD
add name="Game Online" packet-mark="game onlines" parent="2. Download" \
    priority=3 queue=GAME
add name="game upload" packet-mark="game onlines" parent="1. Upload" \
    priority=3 queue=GAME
add name="Game FB" packet-mark=game_fb parent="2. Download" priority=3 queue=\
    default
Copy - Paste di Terminal
Semua Rule yang kami share silahkan dipelajari dan diharap sebagai pembelajaran untuk menambah pengetahuan dan dikembangkan lagi, ini hanya rule pengalaman eksklusif dan untuk Rule Streaming mampu anda baca di Setting Management Streaming Dengan Metode Filter IP Dinamic

Source/Reference :
- http://mikrotik.co.id


BACA JUGA : ARTIKEL TENTANG SETTING MIKROTIK DIBAWAH INI :

Comments