Diposting oleh

Mikrotik Loadbalancing 4 Speedy

Diposting oleh
Mikrotik Loadbalancing 4 Speedy - metode loadbalancing yang di bicarakan ada beberapa jenis, namun dari sekian informasi yang ada saya lebih menyukai loadblancing dengan nth. Silahkan di baca di forum - forum yang membahas mikrotik (http://forummikrotik.com) tentang kelebihan dan kekurangan masih - masing dari loadbalancing.



Berikut loadbalancing yang saya gunakan, pastekan code mikrotik berikut ini di mangle lewat new terminal mikrotik.

/ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=jalur4 passthrough=yes 
connection-state=new in-interface=ether5 nth=4,1

add chain=prerouting action=mark-routing new-routing-mark=Speedy-1 passthrough=no\
in-interface=ether5 connection-mark=jalur4

add chain=prerouting action=mark-connection new-connection-mark=jalur3 passthrough=yes\
connection-state=new in-interface=ether5 nth=3,1

add chain=prerouting action=mark-routing new-routing-mark=Speedy-3 passthrough=no\
in-interface=ether5 connection-mark=jalur3

add chain=prerouting action=mark-connection new-connection-mark=jalur2 passthrough=yes\
connection-state=new in-interface=ether5 nth=2,1

add chain=prerouting action=mark-routing new-routing-mark=Speedy-2 passthrough=no\
in-interface=ether5 connection-mark=jalur2

add chain=prerouting action=mark-connection new-connection-mark=jalur1 passthrough=yes\
connection-state=new in-interface=ether5 nth=1,1

add chain=prerouting action=mark-routing new-routing-mark=Speedy-1 passthrough=no\
in-interface=ether5 connection-mark=jalur1

Ether5 adalah ether lan, kemudian di IP -> ROUTE
masing masing interface pppoe-out dari speedy set routingnya sesuai mark routing di mangle.

/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=\
Speedy-1 scope=30 target-scope=10

 add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=\
Speedy-2 scope=30 target-scope=10

 add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=\
Speedy-3 scope=30 target-scope=10

 add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out4 routing-mark=\
Speedy-4 scope=30 target-scope=10

add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=Speedy-1,Speedy-2,Speedy-3,Speedy-4 \
    scope=30 target-scope=10


Selain cara itu bisa juga menggunakan jump seperti berikut:

/ip firewall mangle 
add action=jump chain=prerouting connection-state=new disabled=no dst-address-list=!private in-interface=ether5 jump-target=LB

add action=mark-connection chain=LB connection-state=new disabled=yes dst-address-list=!private dst-port=80 in-interface=ether5 new-connection-mark=Speedy-4 nth=4,1 passthrough=yes protocol=tcp

add action=mark-routing chain=proxy connection-mark=Speedy-4 disabled=yes in-interface=ether5 new-routing-mark=Speedy-1 passthrough=no

add action=mark-connection chain=LB connection-state=new disabled=yes dst-address-list=!private  dst-port=80 in-interface=ether5 new-connection-mark=Speedy-3 nth=3,1 passthrough=yes protocol=tcp

add action=mark-routing chain=proxy connection-mark=Speedy-3 disabled=yes in-interface=ether5 new-routing-mark=Speedy-1 passthrough=no

add action=mark-connection chain=LB connection-state=new disabled=no dst-address-list=!private  dst-port=80 in-interface=ether5 new-connection-mark=Speedy-2 nth=2,1 passthrough=yes protocol=tcp

add action=mark-routing chain=LB connection-mark=Speedy-2 disabled=no in-interface=ether5 new-routing-mark=Speedy-2 passthrough=no

add action=mark-connection chain=LB connection-state=new disabled=no dst-address-list=!private  dst-port=80 in-interface=ether5 new-connection-mark=Speedy-1 nth=1,1 passthrough=yes protocol=tcp

add action=mark-routing chain=LB connection-mark=Speedy-1 disabled=no in-interface=ether5 new-routing-mark=Speedy-1 passthrough=no

Alasan kenapa harus loadbalancing -> baca kenapa harus loadbalancing untuk load balancing mikrotik 2.9.27 mikrotik lama, untuk mikrotik 3line speedy load balancing mikrotik 3 line speedy

Tidak ada komentar:

Posting Komentar