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 manglesetelah mangle ini di buat jangan lupa untuk membuat routing-mark pada ip route :
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
/ip routeselamat mencoba dan happy blogging :)
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
0 komentar:
Posting Komentar