Cara setting mikrotik 2 ISP Load Balancing PCC Dengan Fail Over Tanpa Script, contoh kali ni adalah router mikrotik anda mempunyai dual wan yang memakai metode PCC untuk load balancing. Nah bedanya di contoh ini sekalian failover atau otomatis hanya menggunakan wan/isp yang hidup. Dan bedanya lagi ini tanpa script.
Kita akan pakai host untuk monitoring uplink masing-masing ISPnya, contoh disini saya pakai DNS google (8.8.8.8 dan 8.8.4.4). Tehnik disini membuat mikrotik failover/pindah routing otomatis jika salah satu ISP down di dalam konfigurasi load balancing mikrotik anda.
Kita pakai 2 ISP untuk nantinya kita load balancing,
|
/ip address
add address=192.168.0.1/24 disabled=no interface=WAN1 network=192.168.0.0
add address=192.168.1.2/24 disabled=no interface=WAN2 network=192.168.1.0
add address=192.168.2.2/24 disabled=no interface=LAN network=192.168.2.0
|
Pertama, kita buat marking untuk load balancernya.
|
/ip firewall mangle
add action=mark-connection chain=input disabled=no in-interface=WAN1 new-connection-mark=WAN1_connmark passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=WAN2 new-connection-mark=WAN2_connmark passthrough=yes
add action=mark-routing chain=output connection-mark=WAN1_connmark disabled=no new-routing-mark=ke_ISP1 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_connmark disabled=no new-routing-mark=ke_ISP2 passthrough=yes
add action=mark-connection chain=prerouting disabled=no dst-address-type=!LAN in-interface=LAN new-connection-mark=WAN1_connmark passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting disabled=no dst-address-type=!LAN in-interface=LAN new-connection-mark=WAN2_connmark passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=WAN1_connmark disabled=no in-interface=LAN new-routing-mark=ke_ISP1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN2_connmark disabled=no in-interface=LAN new-routing-mark=ke_ISP2 passthrough=yes
|
Setting masquerade buat kedua link ISP
|
/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=WAN1
add action=masquerade chain=srcnat disabled=no out-interface=WAN2
|
Lanjut,(kalo sudah mulai pusing seruput dulu kopi nya)...hehhehe
SETTING ROUTE UNTUK IMPLEMENTASIKAN 2 ISP LOAD BALANCING PCC DENGAN FAILOVER
1.Setting statik route masing-masing host ke masing-masing gateway ISP anda :
|
/ip route
add dst-address=8.8.8.8 gateway=192.168.0.1 scope=10
add dst-address=8.8.4.4 gateway=192.168.1.1 scope=10
|
## Setting statik route ke masing-masing host dari routing mark mikrotik load balancing anda :
|
/ip route
add distance=1 gateway=8.8.8.8 routing-mark=ke_ISP1 check-gateway=ping
add distance=2 gateway=8.8.4.4 routing-mark=ke_ISP2 check-gateway=ping
|
2. Setting IP hop “virtual / boong2an” yang nanti kita gunakan untuk setting routing selanjutnya :
|
/ip route
add dst-address=10.20.30.1 gateway=8.8.8.8 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.20.30.2 gateway=8.8.4.4 scope=10 target-scope=10 check-gateway=ping
|
3. Tambahkan route default untuk kedua ISP anda yang sudah di marking di mangle :
|
/ip route
add distance=1 gateway=10.20.30.1 routing-mark=ke_ISP1
add distance=2 gateway=10.20.30.2 routing-mark=ke_ISP2
|
4. Tambahkan route default untuk mikrotik anda :
|
/ip route
add distance=1 gateway=10.20.30.1
add distance=2 gateway=10.20.30.2
|
berbagi itu indah
0 komentar:
Posting Komentar