MIKROTIK / ROUTING
Load Balance NTH
Bagi koneksi baru bergiliran ke tiap jalur (1, 2, 1, 2 …) sesuai bobot.
PANDUAN Cara memakai Load Balance NTH
Alternatif PCC: koneksi baru dibagikan bergiliran ke tiap jalur. Lebih rata untuk banyak pengguna, tapi satu perangkat bisa berpindah-pindah jalur.
SEBELUM MULAI
- Sama seperti PCC: tiap modem di port berbeda, IP modem beda jaringan, DHCP Client Add Default Route = no.
CARA MENGISI
- Bobot menentukan giliran: bobot 2 dan 1 berarti WAN1 mendapat dua koneksi untuk setiap satu koneksi WAN2.
SETELAH SCRIPT DIJALANKAN
- Kalau ada situs bank/game yang sering logout, pakai PCC dengan cara membagi “IP klien”.
Baru pertama kali? Cara menempel script ke MikroTik & arti istilah
HASIL / SCRIPTHASIL / HITUNG
Load Balance NTH
# ===================================================
# LOAD BALANCE NTH
# Dibuat 2026-11-25 oleh SatuKonfig (satukonfig.com)
# Tempel di Winbox > New Terminal (RouterOS v7)
# ===================================================
# FastTrack melewati mangle — matikan agar load balance bekerja
/ip firewall filter disable [find action=fasttrack-connection]
# --- jaringan lokal tidak ikut dibagi ---
/ip firewall address-list add list=LOKAL-nth address=10.0.0.0/8 comment="SatuKonfig nth:"
/ip firewall address-list add list=LOKAL-nth address=172.16.0.0/12 comment="SatuKonfig nth:"
/ip firewall address-list add list=LOKAL-nth address=192.168.0.0/16 comment="SatuKonfig nth:"
# --- tabel routing per WAN ---
:if ([:len [/routing table find name="ke-wan1"]] = 0) do={ /routing table add name=ke-wan1 fib comment="SatuKonfig nth:" }
:if ([:len [/routing table find name="ke-wan2"]] = 0) do={ /routing table add name=ke-wan2 fib comment="SatuKonfig nth:" }
# --- mangle ---
/ip firewall mangle
add chain=prerouting in-interface=bridge-lan dst-address-list=LOKAL-nth action=accept comment="SatuKonfig nth: lokal bypass"
add chain=prerouting in-interface=ether1 connection-mark=no-mark action=mark-connection new-connection-mark=wan1-conn passthrough=yes comment="SatuKonfig nth: koneksi masuk WAN1"
add chain=prerouting in-interface=ether2 connection-mark=no-mark action=mark-connection new-connection-mark=wan2-conn passthrough=yes comment="SatuKonfig nth: koneksi masuk WAN2"
add chain=prerouting in-interface=bridge-lan dst-address-type=!local connection-mark=no-mark connection-state=new nth=2,1 action=mark-connection new-connection-mark=wan1-conn passthrough=yes comment="SatuKonfig nth: bagian 1/2 ke WAN1"
add chain=prerouting in-interface=bridge-lan dst-address-type=!local connection-mark=no-mark connection-state=new nth=2,2 action=mark-connection new-connection-mark=wan2-conn passthrough=yes comment="SatuKonfig nth: bagian 2/2 ke WAN2"
add chain=prerouting in-interface=bridge-lan connection-mark=wan1-conn action=mark-routing new-routing-mark=ke-wan1 passthrough=no comment="SatuKonfig nth:"
add chain=prerouting in-interface=bridge-lan connection-mark=wan2-conn action=mark-routing new-routing-mark=ke-wan2 passthrough=no comment="SatuKonfig nth:"
add chain=output connection-mark=wan1-conn action=mark-routing new-routing-mark=ke-wan1 passthrough=no comment="SatuKonfig nth:"
add chain=output connection-mark=wan2-conn action=mark-routing new-routing-mark=ke-wan2 passthrough=no comment="SatuKonfig nth:"
# --- route per WAN (+ cadangan bila WAN mati) ---
/ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-table=ke-wan1 distance=1 check-gateway=ping comment="SatuKonfig nth: WAN1 utama"
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-table=ke-wan1 distance=2 comment="SatuKonfig nth: WAN1 cadangan"
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-table=ke-wan2 distance=1 check-gateway=ping comment="SatuKonfig nth: WAN2 utama"
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-table=ke-wan2 distance=2 comment="SatuKonfig nth: WAN2 cadangan"
# --- tabel main (trafik router sendiri) ---
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping comment="SatuKonfig nth: main WAN1"
add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping comment="SatuKonfig nth: main WAN2"
# --- NAT ---
/ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade comment="SatuKonfig nth: NAT WAN1"
/ip firewall nat add chain=srcnat out-interface=ether2 action=masquerade comment="SatuKonfig nth: NAT WAN2"
Contoh isian di form hanya contoh; sesuaikan dengan jaringan Anda. Backup dulu sebelum menempel: /system backup save name=sebelum-satukonfig. Cara lengkap ada di Panduan di atas.