Mikrotik : Membangun Router Load Balancing menggunakan 1 NIC dibawah Router Utama

Sudah lama saya tidak menulis lagi di Blog. Untuk Kesempatan kali ini saya akan share bagaimana membangun sebuah Router Load Balancing dibawah Router-Router Utama. Bagaimana Gambaran Topologinya? Kita lihat dibawah ini

topologi
Gambaran Topologi

Nah langsung saja untuk scriptnya (Router 192.168.3.1 Saja ya… karena kita hanya membahas itu).

/ip address add address=192.168.3.1/22 interface=ether1
/ip route
add check-gateway=ping distance=1 gateway=192.168.0.1 routing-mark=routeisp_1 scope=225
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=routeisp_2 scope=225
add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=routeisp_3 scope=225
add check-gateway=ping distance=1 gateway=192.168.0.1 scope=225
/ip dns set allow-remote-requests=yes servers=192.168.0.1,192.168.1.1,192.168.2.1,8.8.4.4
/ip firewall nat
add action=src-nat chain=srcnat connection-mark=koneksi_1 out-interface=ether1 to-addresses=192.168.3.1
add action=src-nat chain=srcnat connection-mark=koneksi_2 out-interface=ether1 to-addresses=192.168.3.1
add action=src-nat chain=srcnat connection-mark=koneksi_3 out-interface=ether1 to-addresses=192.168.3.1
/ip firewall mangle
add action=mark-connection chain=prerouting connection-state=new in-interface=ether1 new-connection-mark=koneksi_1 nth=3,1 src-address=192.168.0.0/22
add action=mark-connection chain=prerouting connection-state=new in-interface=ether1 new-connection-mark=koneksi_2 nth=3,2 src-address=192.168.0.0/22
add action=mark-connection chain=prerouting connection-state=new in-interface=ether1 new-connection-mark=koneksi_3 nth=3,3 src-address=192.168.0.0/22
add action=mark-routing chain=prerouting connection-mark=koneksi_1 in-interface=ether1 new-routing-mark=routeisp_1 passthrough=no src-address=192.168.0.0/22
add action=mark-routing chain=prerouting connection-mark=koneksi_2 in-interface=ether1 new-routing-mark=routeisp_2 passthrough=no src-address=192.168.0.0/22
add action=mark-routing chain=prerouting connection-mark=koneksi_3 in-interface=ether1 new-routing-mark=routeisp_3 passthrough=no src-address=192.168.0.0/22

Yang perlu kita perhatikan adalah penamakan dari interface kita, nama koneksi/connection mark dan nama routing kita/routing mark.

ini adalah hasil download ujicoba saya menggunakan metode diatas. dengan speed koneksi ISP A 5Mbps, ISP B 3 Mbps dan Koneksi C 3 Mbps.

Download Speed
Download Speed

 

Terima kasih. semoga bermanfaat.

Tinggalkan Balasan

This site uses Akismet to reduce spam. Learn how your comment data is processed.