Renungan Ayat Suci Al-Qur'an

Selasa, 17 Mei 2011

Load Balancing dengan konfigurasi 2 Line untuk Mikrotik versi 2.9.27

Berikut scripting Load Balancing dengan konfigurasi 2 Line untuk Mikrotik versi 2.9.27
Sesuaikan IP masing-masing interface menurut network kita.

Note : 10.11.90.1 = IP Local
192.168.1.1 = IP Modem Speedy 1
192.168.2.1 = IP Modem Speedy 2

/ ip address
add address=10.11.90.1/24 network=10.11.90.0 broadcast=10.11.90.255 \
interface=local comment="" disabled=no
add address=192.168.1.254/24 network=192.168.1.0 broadcast=192.168.1.255 \
interface="Public1" comment="" disabled=no
add address=192.168.2.254/24 network=192.168.2.0 broadcast=192.168.2.255 \
interface="Public2" comment="" disabled=no

/ ip firewall mangle
add chain=prerouting in-interface=local connection-state=new nth=1,1,0 \
action=mark-connection new-connection-mark=Golden1 passthrough=yes \
comment="Load Balancing Client" disabled=no
add chain=prerouting in-interface=local connection-mark=Golden1 \
action=mark-routing new-routing-mark=Golden1 passthrough=no comment="" \
disabled=no
add chain=prerouting in-interface=local connection-state=new nth=1,1,1 \
action=mark-connection new-connection-mark=Golden2 passthrough=yes \
comment="" disabled=no
add chain=prerouting in-interface=local connection-mark=Golden2 \
action=mark-routing new-routing-mark=Golden2 passthrough=no comment="" \
disabled=no

/ ip firewall nat
add chain=srcnat out-interface="Public1" action=masquerade comment="" \
disabled=no
add chain=srcnat out-interface="Public2" action=masquerade comment="" \
disabled=no

/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.2.1 scope=255 target-scope=10 \
routing-mark=Golden1 comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=192.168.1.1 scope=255 target-scope=10 \
routing-mark=Golden2 comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=192.168.1.1 scope=255 target-scope=10 \
comment="primary connection" disabled=no

Thanks to Joysolution @ www.forummikrotik.com

0 komentar:

Posting Komentar

~ Keep Respect & Peace ~