Load Balancing mikrotik Menggunakan ecmp

pada artikel sebelumnya telah di bahas mengenai load balancing menggunakan NTH, kali ini saya akan mencoba membuat load balancing menggunakan metode ecmp khusunya pada konfigurasi firewall mangle dan route,  berikut contoh mangle dan routing pada penggunaan load balancing untuk metode ecmp dengan menggunakan 2 upstream :
/ip firewall mangle
add action=mark-routing chain=prerouting comment="Route HTTP traffic to ECMP" \
    disabled=yes dst-port=80 new-routing-mark=ecmp-http-route passthrough=yes \
    protocol=tcp
add action=mark-connection chain=input disabled=yes in-interface=ether1 \
    new-connection-mark=ether1_conn passthrough=yes
add action=mark-connection chain=input disabled=yes in-interface=ether2 \
    new-connection-mark=ether2_conn passthrough=yes
add action=mark-routing chain=output connection-mark=ether1_conn disabled=yes \
    new-routing-mark=to_wlan1 passthrough=yes
add action=mark-routing chain=output connection-mark=ether1_conn disabled=yes \
    new-routing-mark=to_wlan2 passthrough=yes
setelah mangle ini di buat jangan lupa untuk membuat routing-mark pada ip route :
/ip route
add check-gateway=ping comment="ECMP route for HTTP" disabled=yes distance=1 \
    dst-address=0.0.0.0/0 gateway=[gateway uplink 1],[gateway uplink 2] routing-mark=\
    ecmp-http-route scope=30 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway= [gateway uplink 1]  \
    routing-mark=to_wlan1 scope=30 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway= [gateway uplink 2]  \
    routing-mark=to_wlan2 scope=30 target-scope=10
add comment="Default Route to Internet" disabled=no distance=1 dst-address=\
    0.0.0.0/0 gateway=10.10.10.1 scope=30 target-scope=10 
selamat mencoba dan happy blogging :)


Komentar

Postingan populer dari blog ini

import address list nice mikrotik

Pengertian chain pada packet flow mikrotik

Transparent Proxy pada Hotspot Server