Load Balance File Over, PCC, Recursive Gateway dan Netwatch
ISP-A = 10.200.200.2/30 Gateway 10.200.200.1 (ether1)
ISP-B = 172.200.200.2/30 Gateway 172.200.200.1 (ether2)
LAN = 192.168.0.x/29 (ether3-LAN)
Konfgurasi IP Address
/ip address
add address=10.200.200.2/30 comment=ISP-A interface=ether1-wan1
add address=172.200.200.2/30 comment=ISP-B interface=ether2-wan2
add address=192.168.0.1/29 comment=LAN interface=ether3-LAN
Note :
Untuk Ip ISP silahkan sesuaikan yang di dapat dari ISP
Untuk nama interface di sesuaikan masing-masing
Tambahkan Address list
Silahkan ke IP --> Firewall ---> Address list --> klik Tanda (+)
untuk name di isi local ( bebas ) dan untuk Address di isi 192.168.0.0/29 ( Di sesuaikan dengan ip Lan Anda)
Konfigurasi NAT
/ip firewall nat
add action=masquerade chain=srcnat comment=ISP-A out-interface=ether1-wan1
add action=masquerade chain=srcnat comment=ISP-B out-interface=ether2-wan2
Konfigurasi Mangle
/ip firewall mangle
add action=mark-connection chain=input in-interface=ether1-wan1 new-connection-mark=Con-ISPA
add action=mark-connection chain=input in-interface=ether2-wan2 new-connection-mark=Con-ISPB
add action=mark-routing chain=output connection-mark=Con-ISPA new-routing-mark=Route-ISPA out-interface=ether1-wan1 passthrough=no
add action=mark-routing chain=output connection-mark=Con-ISPB new-routing-mark=Route-ISPB out-interface=ether2-wan2 passthrough=no
Note : Mangle di atas untuk menandai traffic yang masuk dari ISP A atau ISP B dan trafik akan keluar melalui masing-masing ISP
add action=mark-connection chain=prerouting comment="Konfigurasi PCC" dst-address-list=!local in-interface=ether3-LAN new-connection-mark=ISPA-CON per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-routing chain=prerouting connection-mark=ISPA-CON in-interface=ether3-LAN new-routing-mark=Route-ISPA passthrough=no
add action=mark-connection chain=prerouting dst-address-list=!local in-interface=ether3-LAN new-connection-mark=ISPB-CON per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=ISPB-CON in-interface=ether3-LAN new-routing-mark=Route-ISPB passthrough=no
Note : Buat konfigurasi untuk PCC. Karena pada chain prerouting semua traffic akan ditangkap, maka kita tambahkan dst-address-type=!local agar traffic dari LAN yang menuju ke alamat IP pada ethernet router akan dihiraukan. Sisanya traffic yang melewati router itu sendiri akan di kelompokan menjadi 2 grup berdasarkan source, port dan destination.
Konfigurasi Route
/ip route
add distance=1 gateway=175.200.200.1 routing-mark=Route-ISPA
add distance=1 gateway=103.200.200.1 routing-mark=Route-ISPB
add check-gateway=ping comment=recursive-ispa distance=1 gateway=8.8.8.8 \
target-scope=30
add check-gateway=ping comment=recursive-ispb distance=2 gateway=8.8.4.4 \
target-scope=30
add check-gateway=ping comment=chek-ispb distance=2 dst-address=8.8.4.4/32 \
gateway=103.200.200.1
add check-gateway=ping comment=chek-ispa distance=1 dst-address=8.8.8.8/32 \
gateway=175.200.200.1
Note : Untuk mangle file over dan recursive gateway tujuan agar ketikan ISPA down secara otomatis pindah ke ISP B begitu juga sebaliknya
Konfigurasi Netwatch
/tool netwatch
add down-script="/ip route disable [find comment=recursive-ispa]" host=8.8.8.8 interval=3s up-script=\
"/ip route enable [find comment=recursive-ispa]"
add down-script="/ip route disable [find comment=recursive-ispb]" host=8.8.4.4 interval=3s up-script=\
"/ip route enable [find comment=recursive-ispb]
Note : Ketika ISP-A down maka ISP-A akan disable dan ketika sudah up ISP-A akan enable kembali begitu juga sebaliknya pada ISP-B
Tidak ada komentar:
Posting Komentar
Komen yang bae-bae aja