Jumat, 15 November 2019

Queue Tree

15/11/2019
Assalamualaikum Wr. Wb.
Kali ini saya akan mengerjakan tugas Queue Tree dengan Mangle.

Pertama, Mangle pada mikrotik merupakan suatu cara untuk menandai paket data dan koneksi tertentu yang dapat diterapkan pada fitur mikrotik lainnya, sepeti pada routes, pemisahan bandwidth pada queues, NAT dan filter rules.

Dan Queue Tree adalah salah satu fitur yang terdapat dalam mikrotik yang digunakan untuk mengatur jumlah bandwidth. Berfungsi untuk mengimplementasikan fungsi yang lebih komplex dalam limit bandwidth. Biasanya digunakan oleh admin warnet untuk membatasi satu arah koneksi untuk download maupun untuk upload. Cara membuat Queue Tree sering dibilang agak rumit oleh orang oleh karena itu orang lebih banyak memilih simple queue.

Alat yang dipakai adalah Router RB941, kabel UTP dan Laptop.

Pertama, lakukan konfig dasar, IP seperti yang tertera pada topologi, DNS, Client menggunakan wlan dan Firewall untuk mengizinkan akses Internet.

Kedua, membuat Mangle Mark Connect menggunakan script (seperti di gambar topologi di atas). Berikut adalah script-nya;
WARNET/ETH1
mangle mark connect :
/
ip firewall mangle add action=mark-connection chain=prerouting disabled=no new-connection-mark=eth1_pc1 passthrough=yes src-address=200.100.10.2
/
ip firewall mangle add action=mark-connection chain=prerouting disabled=no new-connection-mark=eth1_pc2 passthrough=yes src-address= 200.100.10.3
/
ip firewall mangle add action=mark-connection chain=prerouting disabled=no new-connection-mark=eth1_pc3 passthrough=yes src-address= 200.100.10.4
/
ip firewall mangle add action=mark-connection chain=prerouting disabled=no new-connection-mark=eth1_pc4 passthrough=yes src-address= 200.100.10.5
/
ip firewall mangle add action=mark-connection chain=prerouting disabled=no new-connection-mark=eth1_pc5 passthrough=yes src-address= 200.100.10.6


KANTOR/ETH2
mangle mark connect :
/
ip firewall mangle add action=mark-connection chain=prerouting disabled=no new-connection-mark=eth2_pc1 passthrough=yes src-address=200.100.11.2
/
ip firewall mangle add action=mark-connection chain=prerouting disabled=no new-connection-mark=eth2_pc2 passthrough=yes src-address= 200.100.11.3
/
ip firewall mangle add action=mark-connection chain=prerouting disabled=no new-connection-mark=eth2_pc3 passthrough=yes src-address= 200.100.11.4
/
ip firewall mangle add action=mark-connection chain=prerouting disabled=no new-connection-mark=eth2_pc4 passthrough=yes src-address= 200.100.11.5
/
ip firewall mangle add action=mark-connection chain=prerouting disabled=no new-connection-mark=eth2_pc5 passthrough=yes src-address= 200.100.11.6


Ketiga, membuat Mangle Mark Paket;
WARNET/ETH1
mangle mark paket :
/ip firewall mangle add action=mark-packet chain=prerouting connection-mark=eth1_pc1 disabled=no new-packet-mark=et1_pc1 passthrough=yes
/ip firewall mangle add action=mark-packet chain=prerouting connection-mark=eth1_pc2 disabled=no new-packet-mark=et1_pc2 passthrough=yes
/ip firewall mangle add action=mark-packet chain=prerouting connection-mark=eth1_pc3 disabled=no new-packet-mark=et1_pc3 passthrough=yes
/ip firewall mangle add action=mark-packet chain=prerouting connection-mark=eth1_pc4 disabled=no new-packet-mark=et1_pc4 passthrough=yes
/ip firewall mangle add action=mark-packet chain=prerouting connection-mark=eth1_pc5 disabled=no new-packet-mark=et1_pc5 passthrough=yes

KANTOR/ETH2
mangle mark paket :
/ip firewall mangle add action=mark-packet chain=prerouting connection-mark=eth2_pc1 disabled=no new-packet-mark=et2_pc1 passthrough=yes
/ip firewall mangle add action=mark-packet chain=prerouting connection-mark=eth2_pc2 disabled=no new-packet-mark=et2_pc2 passthrough=yes
/ip firewall mangle add action=mark-packet chain=prerouting connection-mark=eth2_pc3 disabled=no new-packet-mark=et2_pc3 passthrough=yes
/ip firewall mangle add action=mark-packet chain=prerouting connection-mark=eth2_pc4 disabled=no new-packet-mark=et2_pc4 passthrough=yes
/ip firewall mangle add action=mark-packet chain=prerouting connection-mark=eth2_pc5 disabled=no new-packet-mark=et2_pc5 passthrough=yes

Keempat, membuat induk Queue Tree;
Queue Tree induk :
WARNET/ETH1
/queue tree add max-limit=128k name=warnet-down parent=ether1 priority=8
/queue tree add max-limit=128k name=warnet-up parent=wlan1 priority=8

KANTOR/ETH2
/queue tree add max-limit=128k name=kantor-down parent=ether2 priority=8
/queue tree add max-limit=128k name=kantor-up parent=wlan1 priority=8

Kelima dan terakhir, buat Queue Tree untuk masing-masing host;
Queue Tree satuan :
WARNET/ETH1
UPLOAD
/queue tree add limit-at=64k max-limit=128k name=pc1-up packet-mark=et1_pc1 parent=warnet-up
/queue tree add limit-at=64k max-limit=128k name=pc2-up packet-mark=et1_pc2 parent=warnet-up
/queue tree add limit-at=64k max-limit=128k name=pc3-up packet-mark=et1_pc3 parent=warnet-up
/queue tree add limit-at=64k max-limit=128k name=pc4-up packet-mark=et1_pc4 parent=warnet-up
/queue tree add limit-at=64k max-limit=128k name=pc5-up packet-mark=et1_pc5 parent=warnet-up

DOWNLOAD
/queue tree add limit-at=64k max-limit=128k name=pc1-down packet-mark=et1_pc1 parent=warnet-down
/queue tree add limit-at=64k max-limit=128k name=pc2-down packet-mark=et1_pc2 parent=warnet-down /queue tree add limit-at=64k max-limit=128k name=pc3-down packet-mark=et1_pc3 parent=warnet-down
/queue tree add limit-at=64k max-limit=128k name=pc4-down packet-mark=et1_pc4 parent=warnet-down
/queue tree add limit-at=64k max-limit=128k name=pc5-down packet-mark=et1_pc5 parent=warnet-down


KANTOR/ETH2
UPLOAD
/queue tree add limit-at=64k max-limit=150k name=pc1-2-up packet-mark=et2_pc1 parent=kantor-up
/queue tree add limit-at=64k max-limit=150k name=pc2-2-up packet-mark=et2_pc2 parent=kantor-up
/queue tree add limit-at=64k max-limit=150k name=pc3-2-up packet-mark=et2_pc3 parent=kantor-up
/queue tree add limit-at=64k max-limit=150k name=pc4-2-up packet-mark=et2_pc4 parent=kantor-up
/queue tree add limit-at=64k max-limit=150k name=pc5-2-up packet-mark=et2_pc5 parent=kantor-up

DOWNLOAD
/queue tree add limit-at=64k max-limit=150k name=pc1-2-down packet-mark=et2_pc1 parent=kantor-down
/queue tree add limit-at=64k max-limit=150k name=pc2-2-down packet-mark=et2_pc2 parent=kantor-down
/queue tree add limit-at=64k max-limit=150k name=pc3-2-down packet-mark=et2_pc3 parent=kantor-down
/queue tree add limit-at=64k max-limit=150k name=pc4-2-down packet-mark=et2_pc4 parent=kantor-down
/queue tree add limit-at=64k max-limit=150k name=pc5-2-down packet-mark=et2_pc5 parent=kantor-down

Contoh hasilnya seperti berikut;
Ether1 PC 1 -5





Ether2 PC 1 - 5





Tidak ada komentar:

Posting Komentar