Alat dan bahan:
- 2 Koneksi Internet dari ISP/WISP
- Mikrotik minimal 3 Ethernet
- PC Client
Contoh Study Kasus
Untuk RT.RW.Net memakai 2 ISP untuk menyuplai clientnya, dengan ip address sebagai berikut.
ISP 1
- ip address 192.168.0.1
- netmask 255.255.255.0
ISP 2
- ip address 192.168.1.1
- netmask 255.255.255.0
Lokal
- ip address 192.168.2.1/24
Jadi dari 2 koneksi internet rencana mau di pakai semua, langkah pertama yaitu dari 2 koneksi tersebut akan di masukan semua ke Mikrotik.
Susunan Interface Mikrotik
- ISP 1==>ether1-isp1
- ISP 2==>ether2-isp2
- LAN ==>ether3-lokal
Konfigurasi IP Address pada mikrotik
1. /ip addresss
2. add address=192.168.0.2/24 interface=ether1-isp1 disable=no
3. add address=192.168.1.2/24 interface=ether2-isp2 disable=no
4. add address=192.168.2.1/24 interface=ether3-lokal disable=no
2. add address=192.168.0.2/24 interface=ether1-isp1 disable=no
3. add address=192.168.1.2/24 interface=ether2-isp2 disable=no
4. add address=192.168.2.1/24 interface=ether3-lokal disable=no
Jangan lupa priksa koneksi ke ISP pastikan terhubung dengan baik
Selanjutnya yaitu setting Manggle untuk Load Balancing
Konfigurasi NAT ke masing masing ISP
Selanjutnya yaitu setting Manggle untuk Load Balancing
- /ip firewall mangle
- add action=mark-connection chain=input comment="" connection-state=new \ disabled=no in-interface=ether1-isp1 new-connection-mark=isp-1 passthrough=yes
- add action=mark-connection chain=input comment="" connection-state=new \ disabled=no in-interface=ether1-isp2 new-connection-mark=isp-2 passthrough=yes
- add action=mark-routing chain=output comment="" connection-mark=isp-1 \ disabled=no new-routing-mark=koneksi-1 passthrough=no
- add action=mark-routing chain=output comment="" connection-mark=isp-2 \ disabled=no new-routing-mark=koneksi-2 passthrough=no
- add action=mark-connection chain=prerouting comment="" disabled=no \ dst-address-type=!local in-interface=ether3-lokal new-connection-mark=\ isp-1 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
- add action=mark-connection chain=prerouting comment="" disabled=no \ dst-address-type=!local in-interface=ether3-lokal new-connection-mark=\ isp-2 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1
- add action=mark-routing chain=prerouting comment="" connection-mark=isp-1 \ disabled=no in-interface=ether3-lokal new-routing-mark=koneksi-1 passthrough=yes
- add action=mark-routing chain=prerouting comment="" connection-mark=isp-2 \ disabled=no in-interface=ether3-lokal new-routing-mark=koneksi-2 passthrough=yes
Konfigurasi NAT ke masing masing ISP
- ip firewall nat/
- add chain=scrnat out-interfaces=ether1-isp1 action=masquerade
- add chain=scrnat out-interfaces=ether2-isp2 action=masquerade
Setting Routing ke masing masing ISP
/ip route
## Default route ke ISP 1
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.0.1 \
routing-mark=koneksi-1
## Default route ke ISP 2
add disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.1.1 \
routing-mark=koneksi-2
## Pengaturan routing untuk masing-masing mark-routing beban trafik
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.0.1
add comment="" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.1.1
## Default route ke ISP 1
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.0.1 \
routing-mark=koneksi-1
## Default route ke ISP 2
add disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.1.1 \
routing-mark=koneksi-2
## Pengaturan routing untuk masing-masing mark-routing beban trafik
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.0.1
add comment="" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.1.1
Alhamdulillah akhirnya selelsai juga..tinggal di uji coba aja..lihat di bagian interface, apakah tx/rx isp1 dan isp2 berjalan semua...apa lagi kalau banyak client yang online akan terlihat sekali, coba lakukan speedtest apa ada perubahan? selamat mencoba :D
#referensi
http://adamonline.web.id/mikrotik/load-balancing-2-isp-pcc-mikrotik
Tidak ada komentar:
Posting Komentar