Selasa, 15 April 2014

Load Balancing & Failover 2 ISP Menggunakan Mikrotik

- LAN = 192.168.200.1/24
- Uplink = ISP-1 = 102.103.104.102/30 (Gateway ISP 102.103.104.101)
- Uplink = ISP-2 = 202.203.204.202/30 (Gateway ISP 202.203.204.201)


/ ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=conn_1
passthrough=yes connection-state=new in-interface=LAN nth=2,1
add chain=prerouting action=mark-routing new-routing-mark=conn_1
passthrough=no in-interface=LAN connection-mark=conn_1
add chain=prerouting action=mark-connection new-connection-mark=conn_2
passthrough=yes connection-state=new in-interface=LAN nth=1,1
add chain=prerouting action=mark-routing new-routing-mark=conn_2
passthrough=no in-interface=LAN connection-mark=conn_2


/ip firewall nat
add chain=srcnat action=masquerade out-interface=ISP-1 connection-mark=conn_1
add chain=srcnat action=masquerade out-interface=ISP-2 connection-mark=conn_2


/ip route
add dst-address=0.0.0.0/0 gateway=102.103.104.101 scope=255 target-scope=10 routing-mark=conn_1 comment=”"disabled=no
add dst-address=0.0.0.0/0 gateway=202.203.204.202 scope=255 target-scope=10 routing-mark=conn_2 comment=”"disabled=no
add dst-address=0.0.0.0/0 gateway=102.103.104.101 scope=255 target-scope=10 comment=”"disabled=no


Catatan :
DNS Router : Isi dengan DNS ke-2 ISP tersebut => Allow Remote Requests (Cek List)
Isi DNS pada PC User/Client dengan 192.168.200.1 (sama dengan IP Gateway)


Sekian.
Semoga menambah pengetahuan kita.

Script diatas sudah saya coba dan berhasil.


Salam 
Merah Putih Segoroasat
Thanks

Tidak ada komentar :

Posting Komentar