Load Balancing PCC

Load Balancing
pada mikrotik router adalah salah satu cara mendistribusikan beban trafik pada dua atau lebih jalur koneksi internet, agar trafik dapat berjalan baik dan seimbang dan menghindari overload pada salah satu jalur trafik,

Kita pakai 2 ISP untuk nantinya kita load balancing secara scheduler.

/ip firewall address-list
add address=10.0.0.0/8 list=private-lokal
add address=172.16.0.0/12 list=private-lokal
add address=192.168.0.0/16 list=private-lokal
Tambahkan route default untuk kedua ISP anda yang sudah di marking di mangle

/ip firewall mangle
add action=mark-connection chain=input comment=exit-1 in-interface=ether2 new-connection-mark=exit-1 passthrough=yes
add action=mark-routing chain=output comment=exit-1 connection-mark=exit-1 new-routing-mark=exit-1 passthrough=no
add action=mark-routing chain=prerouting comment=exit-1 connection-mark=exit-1 new-routing-mark=exit-1 passthrough=no
add action=mark-connection chain=input comment=exit-2 in-interface=ether1 new-connection-mark=exit-2 passthrough=yes
add action=mark-routing chain=output comment=exit-2 connection-mark=exit-2 new-routing-mark=exit-2 passthrough=no
add action=mark-routing chain=prerouting comment=exit-2 connection-mark=exit-2 new-routing-mark=exit-2 passthrough=no
add action=mark-connection chain=prerouting dst-address-list=private-lokal new-connection-mark=private-lokal passthrough=yes src-address-list=private-lokal
add action=accept chain=prerouting connection-mark=private-lokal
add action=mark-connection chain=prerouting comment=vip dst-address-list=!private-lokal new-connection-mark=vip passthrough=yes protocol=icmp \
src-address-list=private-lokal
add action=mark-connection chain=prerouting comment=vip dst-address-list=!private-lokal dst-port=53,5353,123 new-connection-mark=vip passthrough=yes \
protocol=tcp src-address-list=private-lokal
add action=mark-connection chain=prerouting comment=vip dst-address-list=!private-lokal dst-port=53,5353,123 new-connection-mark=vip passthrough=yes \
protocol=udp src-address-list=private-lokal
add action=accept chain=prerouting comment=vip connection-mark=vip
add action=mark-routing chain=prerouting comment=jalur-1 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-1 passthrough=no \
per-connection-classifier=both-addresses-and-ports:3/0 src-address-list=private-lokal
add action=mark-routing chain=prerouting comment=jalur-1 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-1 passthrough=no \
per-connection-classifier=both-addresses-and-ports:3/1 src-address-list=private-lokal
add action=mark-routing chain=prerouting comment=jalur-2 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-2 passthrough=no \
per-connection-classifier=both-addresses-and-ports:3/2 src-address-list=private-lokalSetting masquerade buat kedua link ISP
/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=ISP1
add action=masquerade chain=srcnat disabled=no out-interface=ISP2
Setting statik route masing-masing host ke masing-masing gateway ISP anda.
/ip route
add dst-address=8.8.8.8 gateway=192.168.2.1 scope=10
add dst-address=8.8.4.4 gateway=192.168.1.1 scope=10
Setting static route ke masing-masing host dari routing mark mikrotik load balancing anda.
/ip route
add check-gateway=ping comment=default distance=1 gateway=192.168.1.1
add check-gateway=ping comment=backup distance=2 gateway=192.168.2.1
add check-gateway=ping comment=exit-1 distance=1 gateway=192.168.1.1 routing-mark=exit-1
add check-gateway=ping comment=exit-2 distance=1 gateway=192.168.2.1 routing-mark=exit-2
add check-gateway=ping comment=jalur-1 distance=1 gateway=192.168.1.1 routing-mark=jalur-1
add check-gateway=ping comment=jalur-1 distance=2 gateway=192.168.2.1 routing-mark=jalur-1
add check-gateway=ping comment=jalur-2 distance=1 gateway=192.168.2.1 routing-mark=jalur-2
add check-gateway=ping comment=jalur-2 distance=2 gateway=192.168.1.1 routing-mark=jalur-2
Loadbalancing menggunakan teknik pcc ini akan berjalan efektif dan mendekati seimbang jika semakin banyak koneksi (dari client) yang terjadi.

Gunakan ISP yang memiliki bandwith FIX bukan Share untuk mendapatkan hasil yang lebih optimal, Load Balance menggunakan PCC ini bukan selamanya dan sepenuhnya sebuah solusi yang pasti berhasil baik di semua jenis network, karena proses penyeimbangan dari traffic.

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel