Diposting oleh

Cara LoadBalancing PCC Mikrotik 4 Line PPPOE-OUT

Diposting oleh
Cara LoadBalancing PCC Mikrotik 4 Line PPPOE-OUT - sebenarnya sampai saat ini ada dua teknik load balancing di mikrotik, ada yang menggunakan NTH ada pula yang menggunakan pcc, dan metoda pcc ini sudah jauh hari ada, namun baru sempat saya menuliskannya disini, ini pun sekedar dokumentasi saya saat membuat load balancing di router mikrotik client saya, mini isp di kolut sulawesi.



Seperti biasa setting mikrotik mini isp di kolut(Kolaka Utara), Saya setting lewat remote winbox kesana. Metode loadbalancing pcc berikut adalah dialing di mikrotik, bukan dial di modem speedy, tulisan asli soal pcc 4 line ini saya ambil dari sebuah blog, sepertinya blok orang fakistan, namun saya modifikasi ulang karena didalamnya saya menemukan ke anehan di bagian /ip firewall nat dan /ip routing yang memuat routing yang berulang-ulang entah saya yang salah entah artikel tersebut, namun saya lebih menyukai seperti load balancing yang saya gunakaan disini dengan 4 buah masquerade pada masing-masing pppoe-out, tanpa harus membuat masquerade secara global.

Beliau itu memiliki masquerade seperti di bawah ini,

/ip firewall nat
add chain=srcnat out-interface=internet1 action=masquerade
add chain=srcnat out-interface=internet2 action=masquerade
add chain=srcnat out-interface=internet3 action=masquerade
add chain=srcnat out-interface=internet4 action=masquerade
add chain=srcnat out-interface=internet5 action=masquerade

add chain=srcnat action=masquerade
add chain=srcnat action=masquerade
add chain=srcnat action=masquerade
add chain=srcnat action=masquerade
add chain=srcnat action=masquerade

Bagi saya jikalau sudah menggunakan add chain=srcnat action=masquerade tidak perlu lagi membuat masquerade per-interface wan-nya. Tapi entah mungkin saya yang salah, correct me if im wrong.. :)


/ip firewall mangle

add chain=input in-interface=pppoe-out1 action=mark-connection new-connection-mark=internet1_conn
add chain=input in-interface=pppoe-out2 action=mark-connection new-connection-mark=internet2_conn
add chain=input in-interface=pppoe-out3 action=mark-connection new-connection-mark=internet3_conn
add chain=input in-interface=pppoe-out4 action=mark-connection new-connection-mark=internet4_conn


add chain=output connection-mark=internet1_conn action=mark-routing new-routing-mark=to_internet1
add chain=output connection-mark=internet2_conn action=mark-routing new-routing-mark=to_internet2
add chain=output connection-mark=internet3_conn action=mark-routing new-routing-mark=to_internet3
add chain=output connection-mark=internet4_conn action=mark-routing new-routing-mark=to_internet4


add chain=prerouting dst-address-type=!local in-interface=ether1 per-connection-classifier=both-addresses:4/0 \
action=mark-connection new-connection-mark=internet1_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether1 per-connection-classifier=both-addresses:4/1 \
action=mark-connection new-connection-mark=internet2_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether1 per-connection-classifier=both-addresses:4/2 \
action=mark-connection new-connection-mark=internet3_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether1 per-connection-classifier=both-addresses:4/3 \
action=mark-connection new-connection-mark=internet4_conn passthrough=yes

add chain=prerouting connection-mark=internet1_conn in-interface=ether1 action=mark-routing new-routing-mark=to_internet1
add chain=prerouting connection-mark=internet2_conn in-interface=ether1 action=mark-routing new-routing-mark=to_internet2
add chain=prerouting connection-mark=internet3_conn in-interface=ether1 action=mark-routing new-routing-mark=to_internet3
add chain=prerouting connection-mark=internet4_conn in-interface=ether1 action=mark-routing new-routing-mark=to_internet4

Langkah Cara LoadBalancing PCC Mikrotik 4 Line PPPOE-OUT selanjutnya adalah melakukan routing terhadap masing-masing routing mark yang telah kita buat.

/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_internet1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_internet2 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=to_internet3 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out4 routing-mark=to_internet4 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out4 routing-mark=game scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out3,pppoe-out2,pppoe-out1 scope=30 target-scope=10

Cara LoadBalancing PCC Mikrotik 4 Line PPPOE-OUT - Saya menyukai routing seperti ini timbang routing seperti artikel yang saya sebut tadi, lagi-lagi cmiiw.

Tidak ada komentar:

Posting Komentar