Artikel ini dibuat berdasarkan konten dari Channel Youtube MeKaroTik Network.
“Tutorial Load Balance dengan metode PCC – Menggabungkan 2 Sumber / koneksi Internet pada Mikrotik”
Topologi
UPLINK Internet
ether1 ISP1-SumberInternet-1 = 192.168.1.0/24
ether2 ISP2-SumberInternet-2 = 192.168.2.0/24
LOCAL LAN
ether3-Group-PC = 172.16.1.0/24
bridge-AP-wifi = (ether4,ether5)
10.1.1.0/24
Konfig Awal Interface-interface Sesuai dengan Fungsinya
Setting nama interface sesuai dengan peran/fungsi’nya masing-masing
di menu ➡️Interface
– ether1-Sumberinternet-1
– ether2-Sumberinternet-2
– ether3-Group-PC
– ether4-AP-Wifi-1
– ether5-AP-Wifi-2
buat bridge baru unt menggabungkan interface
– ether4-AP-Wifi-1
– ether5-AP-Wifi-2
+ -> beri nama -> bridge-AP-Wifi
-> tambahkan interface ether4 & ether5
buat interface list, lakukan grouping di koneksi LAN’nya
di menu ➡️Interface ➡️ Tab “Interface list“
-> klik “Lists” -> Name : LAN
->
Buat Interface List “LAN” dengan member’nya, klik “+” =
+ bridge-AP-wifi
+ ether3-Group-PC
Konfig DHCP-Client unt interface yang menuju internet (ISP1 & ISP2) =
di menu ➡️ IP ➡️ DHCP Client
+ ether1 ISP1-SumberInternet-1
+ ether2 ISP2-SumberInternet-2
Add Default Route = no
✅ Use Peer DNS
✅ Use Peer NTP
Hasil setelah 2 interface yg menuju internet mendapat IP DHCP.
Setting DNS Router
IP -> DNS
tambahkan IP DNS
8.8.8.8
8.8.4.4
Tambahkan IP unt jaringan Local
IP -> Address -> Add Interface [+]
172.16.1.1/24 = interface ether3-Group-PC
10.1.1.1/24 = interface bridge-AP-wifi
Buat DHCP Server untuk jaringan local
IP -> DHCP Server -> DHCP Setup
[+] interface bridge-AP-wifi
[+] interface ether3-Group-PC
Buat Address List untuk network yang status’nya DAC (Dynamic, Active, Connect atau terhubung langsung ke RB) 3 buah :
IP -> Firewall -> Address List
Name “Lokal-Network“
+ 10.1.1.0/24
+ 172.16.1.0/24
Name “Network-SI-1” =
+ 192.168.1.0/24
Name “Network-SI-2” =
+ 192.168.2.0/24
Mangle-Action Accept pada Network DAC (Tersambung Langsung ke Router
hal ini bertujuan agar traffic lokal tidak ditangkap oleh PCC
Menu IP -> Firewall -> Mangle
LAN <-> LAN
Tab General
- Chain = prerouting
- In Interface List = LAN
Tab Advanced
- Dst Address List = Lokal-Network
Tab Action
- Action = Accept
LAN <-> Network-SI-1
Tab General
- Chain = prerouting
- In Interface List = LAN
Tab Advanced
- Dst Address List = Network-SI-1
Tab Action
- Action = Accept
LAN <-> Network-SI-2
Tab General
- Chain = prerouting
- In Interface List = LAN
Tab Advanced
- Dst Address List = Network-SI-2
Tab Action
- Action = Accept
Mangle-Action Mark-connection pada masing-masing sumber internet
Mangle ini unt menandai koneksi yg masuk dari koneksi ISP-1 dan ISP-2
Tab General
Chain = prerouting
In-Interface = ether1 ISP1-SumberInternet-1
Connection Mark = no-mark
Tab Acion
Action = mark connection
New Connection Mark = MConn-SumberInternet-1
✅Passthrought (aktif)
Tab General
Chain = prerouting
In-Interface = ether2 ISP2-SumberInternet-2
Connection Mark = no-mark
Tab Acion
Action = mark connection
New Connection Mark = MConn-SumberInternet-2
✅Passthrought (aktif)
Mangle Action Mark Connection LAN + Pisah Traffic PCC (Per Connection Classifier)
Tab General
Chain = prerouting
In-Interface List = LAN
Connection Mark = no-mark
Tab Advanced
Per Connection Classifier = both addresses and ports : 2/0
Tab Extra
Dst Address Type
Address Type : local
✅Invert (aktif)
Tab Action
Action = mark connection
New Connection Mark = MConn-SumberInternet-1 (sudah ada tinggal pilih dari yg sudah dibuat sebelumnya)
✅Passthrought (aktif)
Address Type : local (interface local di router it sendiri).
Invert = kecuali (bukan termasuk)
Invert Local = dibaca “yg tidak termasuk interface Local”
Tab General
Chain = prerouting
In-Interface List = LAN
Connection Mark = no-mark
Tab Advanced
Per Connection Classifier = both addresses and ports : 2/1
Tab Extra
Dst Address Type
Address Type : local
✅Invert (aktif)
Tab Acion
Action = mark connection
New Connection Mark = MConn-SumberInternet-2 (sudah ada tinggal pilih dari yg sudah dibuat sebelumnya)
✅Passthrought (aktif)
Mark-Routing ISP-1
Tab General
Chain = prerouting
In-Interface List = LAN
Connection Mark = Mconn-SumberInternet-1
Tab Action
Action = mark routing
New Connection Mark = MRouting-ke-SumberInternet-1
✅Passthrought (aktif)
Tab General
Chain = output
Connection Mark = Mconn-Sumberinternet-1
Tab Action
Chain = mark routing
In-Interface List = LAN
New ROuting Mark = MRouting-ke-Sumberinternet-1
⬜Passthrought (tidak aktif)
Mark-Routing ISP-2
Tab General
Chain = prerouting
In-Interface List = LAN
Connection Mark = Mconn-SumberInternet-2
Tab Acion
Action = mark routing
New Connection Mark = MRouting-ke-SumberInternet-2
✅Passthrought (aktif)
Tab General
Chain = output
Connection Mark = Mconn-Sumberinternet-2
Tab Acion
Chain = mark routing
In-Interface List = LAN
New ROuting Mark = MRouting-ke-Sumberinternet-2
⬜Passthrought (tidak aktif)
Me’Rutekan Koneksi yang sudah ditandai tadi agar menuju gateway ISP-1 & ISP-2
akses menu IP -> Route
Dst. Address = 0.0.0.0/0
Gateway = 192.168.1.1
Check Gateway = ping
type = unicast
scope = 30
target scope = 10
Routing Mark : MRouting-ke-Sumberinternet-1
akses menu IP -> Route
Dst. Address = 0.0.0.0/0
Gateway = 192.168.1.1
Check Gateway = ping
type = unicat
scope = 30
target scope = 10
Routing Mark : MRouting-ke-Sumberinternet-2
Firewall NAT Masquerade
masuk menu IP -> Firewall -> NAT
Chain = srcnat
Out. Interface = ether1-SumberInternet-1
Action = Masquerade
masuk menu IP -> Firewall -> NAT
Chain = srcnat
Out. Interface = ether1-SumberInternet-2
Action = Masquerade
Setting Koneksi Internet untuk Router itu Sendiri
Masuk ke menu IP -> Route
Dst Address = 0.0.0.0/0
Gateway = 192.168.2.1
Check Gateway = ping
Type = unicast
Scope = 30
Target Scope = 10
Cek Hasil Load Balance PCC
IP -> Firewall -> Connections
Silahkan melihat koneksi-koneksi yang terbentuk beserta Connection Marking’nya, ada :
– Mconn-Sumberinternet-1
– Mconn-Sumberinternet-2
Pengujian dapat dilakukan dengan browsing2 dengan menggunakan browser yang berbeda, maupun cek via speedtest.
Bacaan Lain
Tambahan Pribadi [Optimasi Metode Load Balance PCC]
1️⃣ ➡️Menggunakan Gateway tipe Recursive-Gateway
contoh scenario
ISP 1 via 8.8.8.8 recursive 192.1.1.1 (gateway ISP 1), scope = 30, target scope = 30
ISP 2 Via 8.8.4.4 recursive 172.1.1.1 (gateway ISP 2), scope = 30, target scope = 30
➡️ Membuat routing backup untuk masing-masing Paket Mark Roting
– 2 Paket Mark Routing (MRouting-ke-Sumberinternet-1 dan MRouting-ke-Sumberinternet-2)
Dst. Address = 0.0.0.0/0
Gateway = 8.8.8.8
Check = ping
Distance = 1
Scope = 30
Target scope = 30
Routing Mark = MRouting-ke-Sumberinternet-1
Dst. Address = 0.0.0.0/0
Gateway = 8.8.8.8
Check = ping
Distance = 2
Scope = 30
Target scope = 30
Routing Mark = MRouting-ke-Sumberinternet-1
Dst. Address = 0.0.0.0/0
Gateway = 8.8.4.4
Check = ping
Distance = 1
Scope = 30
Target scope = 30
Routing Mark = MRouting-ke-Sumberinternet-2
Dst. Address = 0.0.0.0/0
Gateway = 8.8.8.8
Check = ping
Distance = 2
Scope = 30
Target scope = 30
Routing Mark = MRouting-ke-Sumberinternet-2
2️⃣ ➡️ Menambahkan Load Balance ECMP + Recursive Fail Over untuk traffic default RB
✅ 0.0.0.0/0 (global) diarahkan menggunakan 2 gateway recursive 8.8.8.8 dan 8.8.4.4
✅ 8.8.8.8 di routing static menggunakan ISP1
✅ 8.8.4.4 di routing static menggunakan ISP2
3️⃣ ➡️ Lakukan manage bandwidth agar terjadi pemerataan koneksi, unt yg mudah gunakan saja Simple Queue dengan metode PCQ-Upload & PCQ-Download di semua interface ISP
Uji Coba speedtest multi koneksi bisa ke
– https://speedcheck.biznetnetworks.com/
– fast.com
Uji Coba speedtest single koneksi bisa ke
– https://speedtest.magelangkab.go.id/
– fast.com (perlu konfig di menu advance unt memilih 1 / 2 / 3 / atau berapapun koneksi multi yang mau dibentuk dst)