Load Balancing Mikrotik

27 03 2008

Sekedar share dan sebagai referensi saya. Contoh konfigurasi load balancing di Mikrotik menggunakan dua koneksi yang berbeda:

loadbalancing.jpg

/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local comment=”” \
disabled=no
add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=wlan2 \
comment=”” disabled=no
add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=wlan1 \
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=odd passthrough=yes comment=”” \
disabled=no
add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \
new-routing-mark=odd passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=Local connection-state=new nth=1,1,1 \
action=mark-connection new-connection-mark=even passthrough=yes comment=”” \
disabled=no
add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \
new-routing-mark=even passthrough=no comment=”” disabled=no
/ ip firewall nat
add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
to-ports=0-65535 comment=”” disabled=no
add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
to-ports=0-65535 comment=”” disabled=no
/ ip route
add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \
comment=”” disabled=no
add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \
comment=”” disabled=no
add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 comment=”” \
disabled=no

Semoga bermanfaat.

Sumber: Mikrotik.Com


Aksi

Information

4 responses

25 04 2008
rizal

mas nanang saya udah ngikuti apa yang ada di atas, kebutulan kasus sama dengan saya, tapi ko ga bisa jalan yah mungkin ada yang kurang ga…??
terus di atas itu ada perintah seperti ini add chain=prerouting in-interface=Local connection-state=new nth=1,1,0
kalau saya isikan nilai nth seperti di atas malah error tapi kalau nth = 1,1 ga masalah gimana nech, mohon bantuannya mas nanang, terimakasih atas tutorialnya,

26 04 2008
Nanang Suryana

Mungkin ada yang kurang atau salah pada konfigurasinya, biasanya kesalahan pada seting ip, klo contoh diatas interface=Local (Local bisa diganti nama ether yang buat ke lokal), coba perintah /interface print nanti keliatan interface-nya.

Dan ada beberapa hal lagi yang mungkin salah, tp coba dulu bener gak masalahnya tentang nama interface.

Thx.

26 04 2008
Nanang Suryana

Untuk nilai nth dengan kondisi koneksi seperti diatas tidak bermasalah.

28 04 2008
rizal

mas anang inis hasil perintah seperti yang di atas, saya jalan pada mikrotik saya kemudian muncul error seperti ini
ip firewall mangle add chain=prerouting in-interface=eth3-Internal-lapan connection-state=new nth=1,1,0 action=mark-connection new-connection-mark=odd passthrough=yes comment=”” disabled=no
invalid value 1,0 for packet, an integer required
tapi kalau nth saya ganti seperti ini
ip firewall mangle add chain=prerouting in-interface=eth3-Internal-lapan connection-state=new nth=1,1 action=mark-connection new-connection-mark=odd passthrough=yes comment=”” disabled=no
invalid value 1,0 for packet, an integer required
ga masalah, RouterOS mikrotik saya pake versi 3.3
terima kasih

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s




%d blogger menyukai ini: