Pendahuluan
MikroTik adalah salah satu perangkat router yang sangat powerful untuk mengatur jaringan, mulai dari koneksi internet, pembagian bandwidth, hingga sistem hotspot. Artikel ini akan membahas konfigurasi MikroTik dari nol menggunakan CLI (terminal), sehingga cocok untuk pemula maupun yang ingin memahami lebih dalam.
Agar tidak membingungkan, kita mulai dengan asumsi topologi dan IP terlebih dahulu.
1. Asumsi Topologi dan Konfigurasi Awal
Topologi Sederhana
- ether1 → Internet (WAN dari ISP)
- ether2 → Jaringan LAN
- ether3 → Jaringan Hotspot
Asumsi IP Address
- WAN (ether1) → DHCP dari ISP
- LAN (ether2) → 192.168.10.1/24
- HOTSPOT (ether3) → 192.168.20.1/24
DHCP Range
- LAN → 192.168.10.10 – 192.168.10.100
- HOTSPOT → 192.168.20.10 – 192.168.20.100
2. Reset dan Persiapan Awal MikroTik
/system reset-configuration no-defaults=yes skip-backup=yes
Login kembali via Winbox/Terminal setelah reboot.
3. Konfigurasi Interface dan IP Address
Rename Interface (biar rapi)
/interface ethernet
set ether1 name=WAN
set ether2 name=LAN
set ether3 name=HOTSPOT
Set IP Address
/ip address
add address=192.168.10.1/24 interface=LAN
add address=192.168.20.1/24 interface=HOTSPOT
4. Setting Internet (WAN DHCP Client)
/ip dhcp-client
add interface=WAN use-peer-dns=yes use-peer-ntp=yes
5. Setting NAT (Agar Bisa Internet)
/ip firewall nat
add chain=srcnat out-interface=WAN action=masquerade
6. Setting DNS
/ip dns
set servers=8.8.8.8,8.8.4.4 allow-remote-requests=yes
7. Setting DHCP Server LAN
/ip pool
add name=pool-lan ranges=192.168.10.10-192.168.10.100/ip dhcp-server
add name=dhcp-lan interface=LAN address-pool=pool-lan disabled=no/ip dhcp-server network
add address=192.168.10.0/24 gateway=192.168.10.1 dns-server=192.168.10.1
8. Setting DHCP Server HOTSPOT
/ip pool
add name=pool-hotspot ranges=192.168.20.10-192.168.20.100/ip dhcp-server
add name=dhcp-hotspot interface=HOTSPOT address-pool=pool-hotspot disabled=no/ip dhcp-server network
add address=192.168.20.0/24 gateway=192.168.20.1 dns-server=192.168.20.1
9. Manajemen Bandwidth (Simple Queue)
Contoh Limit per IP (LAN)
/queue simple
add name="User1" target=192.168.10.10 max-limit=2M/2M
add name="User2" target=192.168.10.11 max-limit=3M/3M
Limit per Jaringan (Hotspot)
/queue simple
add name="HOTSPOT-LIMIT" target=192.168.20.0/24 max-limit=5M/5M
10. Manajemen Bandwidth Advanced (PCQ – Fair Usage)
/queue type
add name=pcq-download kind=pcq pcq-rate=2M pcq-classifier=dst-address
add name=pcq-upload kind=pcq pcq-rate=2M pcq-classifier=src-address/queue simple
add name="PCQ-HOTSPOT" target=192.168.20.0/24 queue=pcq-upload/pcq-download
Keuntungan:
- Bandwidth dibagi rata otomatis
- Tidak perlu setting satu per satu user
11. Setting Hotspot MikroTik
Setup Hotspot Wizard via CLI
/ip hotspot setup
Ikuti langkah:
- Interface → HOTSPOT
- Local Address → 192.168.20.1/24
- Address Pool → pool-hotspot
- SSL → none
- SMTP → 0.0.0.0
- DNS → 8.8.8.8
- DNS Name → hotspot.local
- User → admin
- Password → bebas
12. Menambahkan User Hotspot
/ip hotspot user
add name=user1 password=123
add name=user2 password=123
13. Limit Bandwidth per User Hotspot
/ip hotspot user profile
add name=paket1 rate-limit=2M/2M/ip hotspot user
add name=user3 password=123 profile=paket1
14. Blokir Akses Situs (Firewall Filter)
/ip firewall filter
add chain=forward content=facebook action=drop
15. Testing
Cek:
- Internet → ping 8.8.8.8
- DNS → ping google.com
- Hotspot → login via browser
- Bandwidth → cek di Queue
Kesimpulan
Dengan konfigurasi ini, MikroTik Anda sudah memiliki:
- Koneksi internet aktif
- Jaringan LAN berjalan
- Sistem hotspot aktif
- Manajemen bandwidth (basic & advanced)
- Kontrol akses jaringan
Konfigurasi ini sudah cukup untuk:
- Warnet
- RT/RW Net
- Kantor kecil
- Usaha hotspot voucher
Up :
SCRIPT FULL MIKROTIK (ALL-IN-ONE)
⚠️ Catatan sebelum mulai
- Script ini akan menghapus konfigurasi lama
- Jalankan via Terminal (Winbox / SSH)
- Router akan reboot otomatis
1. RESET MIKROTIK
/system reset-configuration no-defaults=yes skip-backup=yes
Setelah reboot, login lagi lalu jalankan script di bawah ini sekaligus.
2. SCRIPT FULL KONFIGURASI
# =========================
# RENAME INTERFACE
# =========================
/interface ethernet
set ether1 name=WAN
set ether2 name=LAN
set ether3 name=HOTSPOT# =========================
# IP ADDRESS
# =========================
/ip address
add address=192.168.10.1/24 interface=LAN
add address=192.168.20.1/24 interface=HOTSPOT# =========================
# DHCP CLIENT (INTERNET)
# =========================
/ip dhcp-client
add interface=WAN use-peer-dns=no add-default-route=yes# =========================
# DNS
# =========================
/ip dns
set servers=8.8.8.8,8.8.4.4 allow-remote-requests=yes# =========================
# NAT INTERNET
# =========================
/ip firewall nat
add chain=srcnat out-interface=WAN action=masquerade# =========================
# DHCP SERVER LAN
# =========================
/ip pool
add name=pool-lan ranges=192.168.10.10-192.168.10.100/ip dhcp-server
add name=dhcp-lan interface=LAN address-pool=pool-lan disabled=no/ip dhcp-server network
add address=192.168.10.0/24 gateway=192.168.10.1 dns-server=192.168.10.1# =========================
# DHCP SERVER HOTSPOT
# =========================
/ip pool
add name=pool-hotspot ranges=192.168.20.10-192.168.20.100/ip dhcp-server
add name=dhcp-hotspot interface=HOTSPOT address-pool=pool-hotspot disabled=no/ip dhcp-server network
add address=192.168.20.0/24 gateway=192.168.20.1 dns-server=192.168.20.1# =========================
# BANDWIDTH MANAGEMENT (PCQ)
# =========================
/queue type
add name=pcq-download kind=pcq pcq-rate=2M pcq-classifier=dst-address
add name=pcq-upload kind=pcq pcq-rate=2M pcq-classifier=src-address/queue simple
add name="LIMIT-HOTSPOT" target=192.168.20.0/24 queue=pcq-upload/pcq-download# =========================
# HOTSPOT SETUP
# =========================
/ip hotspot profile
add name=hotspot-profile hotspot-address=192.168.20.1 dns-name=hotspot.local/ip hotspot
add name=hotspot1 interface=HOTSPOT address-pool=pool-hotspot profile=hotspot-profile# =========================
# HOTSPOT USER PROFILE (LIMIT)
# =========================
/ip hotspot user profile
add name=paket1 rate-limit=2M/2M
add name=paket2 rate-limit=5M/5M# =========================
# USER HOTSPOT
# =========================
/ip hotspot user
add name=user1 password=123 profile=paket1
add name=user2 password=123 profile=paket2# =========================
# FIREWALL BASIC (OPTIONAL BLOKIR)
# =========================
/ip firewall filter
add chain=forward content=facebook action=drop comment="blok fb (optional)"# =========================
# TIME ZONE
# =========================
/system clock
set time-zone-name=Asia/Jakarta# =========================
# IDENTITY ROUTER
# =========================
/system identity
set name="MIKROTIK-RTR"# =========================
# DONE
# =========================
HASIL AKHIR SETELAH SCRIPT
Setelah script dijalankan, router kamu sudah:
✅ Internet aktif
- WAN otomatis dari ISP
✅ LAN aktif
- IP: 192.168.10.1
- DHCP jalan
✅ Hotspot aktif
- IP: 192.168.20.1
- Login:
- user1 / 123
- user2 / 123
✅ Bandwidth management
- Hotspot dibagi rata (PCQ)
- User bisa dibatasi per paket
CARA TESTING
- Colok ke LAN → harus dapat IP
- Colok ke HOTSPOT → buka browser
- Akan muncul login hotspot
- Login pakai:
- user1 / 123
KELEBIHAN SCRIPT INI
- Sudah clean (tanpa config bawaan)
- Sudah include:
- NAT
- DHCP
- DNS
- Hotspot
- Limit bandwidth otomatis
- Cocok untuk:
- RT/RW Net
- Warnet
- WiFi voucher
QnA (SEO Tambahan)
Q: Apakah MikroTik harus pakai Winbox?
A: Tidak, semua bisa via CLI seperti contoh di atas.
Q: Apa bedanya Simple Queue dan PCQ?
A: Simple Queue manual, PCQ otomatis membagi bandwidth.
Q: Kenapa hotspot tidak muncul login?
A: Biasanya DNS atau NAT belum benar.
Q: Berapa minimal RAM MikroTik untuk hotspot?
A: Disarankan minimal 64MB, lebih baik 128MB ke atas.

