Membangun Warnet ADSL Speedy dengan Mikrotik RB750 Konfigurasi Interface Mikrotik Klik menu Interface
Membangun Warnet ADSL Speedy dengan Mikrotik RB750
Konfigurasi Interface Mikrotik
Klik menu Interface
Lalu ganti nama interface default Mikrotik RB750
Interface port 1 dan port 2 ganti namanya :
Port 1 : ToModem
Port 2 : ToSwitch
[admin@MikroTik] > /interface print
Flags: D - dynamic, X - disabled, R - running, S - slave
# NAME TYPE MTU L2MTU
0 R ;;; Interface ke Modem
ToModem ether 1500 1526
1 R ;;; Interface ke Switch
ToSwitch ether 1500 1524
2 ether3-local-slave ether 1500 1524
3 ether4-local-slave ether 1500 1524
4 ether5-local-slave ether 1500 1524
Konfigurasi IP Address
Klik menu IP > Address
Masukkan IP Address ke Interface ToModem : 192.168.1.2/24
Ulangi langkah diatas untuk IP Address ke Interface ToSwitch : 192.168.0.1/24
[admin@MikroTik] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.1.2/24 192.168.1.0 192.168.1.255 ToModem
1 192.168.0.1/24 192.168.0.0 192.168.0.255 ToSwitch
Konfigurasi Gateway
Klik menu IP > Routes
Set gateway ke IP Modem 192.168.1.1
[admin@MikroTik] > /ip route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 192.168.1.1 1
1 ADC 192.168.0.0/24 192.168.0.1 ToSwitch 0
2 ADC 192.168.1.0/24 192.168.1.2 ToModem 0
Konfigurasi DNS Server
Klik Menu IP > DNS
Set DNS Primary : 203.130.208.18, Secondary DNS : 203.130.196.155
[admin@MikroTik] > /ip dns print
servers: 203.130.208.18, 203.130.196.155
allow-remote-requests: yes
max-udp-packet-size: 512
cache-size: 2048KiB
cache-max-ttl: 1w
cache-used: 6KiB
Konfigurasi NAT
Klik menu IP > Firewall
Cek secara default sudah ada NAT Masquerade
[admin@MikroTik] > /ip firewall nat print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; default configuration
chain=srcnat action=masquerade out-interface=ToModem
Konfigurasi DHCP
Membuat IP Address Pool
Klik menu IP > Pool
New IP Pool
Address : 192.168.0.100 – 192.168.0.254
Set DHCP Network
Klik Menu IP > DHCP Server
Klik Tab Network > +
[admin@MikroTik] > /ip pool print
# NAME RANGES
0 default-dhcp 192.168.88.10-192.168.88.254
1 DHCP-WARNET-POOL 192.168.0.100-192.168.0.254
Set DHCP Server Aktif
Klik tab DHCP > +
[admin@MikroTik] > /ip dhcp-server network print
# ADDRESS GATEWAY DNS-SERVER WINS-SERVER DOMAIN
0 ;;; DHCP WARNET LAN KABEL
192.168.0.0/24 192.168.0.1 203.130.208.18
203.130.196.155
[admin@MikroTik] > /ip dhcp-server print
Flags: X - disabled, I - invalid
# NAME INTERFACE RELAY ADDRESS-POOL LEASE-TIME ADD-ARP
0 X default ToSwitch default-dhcp 3d
1 FAROU... ToSwitch DHCP-WARNET-POOL 3d
Selesai.
Untuk pengaturan bandwith kita pakai teknik PCQ, bandwith akan dibagi rata ke setiap client. Misal kita pakai bandwith Speedy 2 Mbps dengan 10 klien aktif maka akan dibagi 2Mbps/10. Apabila hanya 1 klien yang aktif maka seluruh bandwith akan dipakai oleh 1 klien.
Masuk ke terminal :
Copy paste skrip dibawah
/ip firewall mangle add chain=forward src-address=192.168.0.1/24 action=mark-connection new-connection-mark=WARNET-CM
/ip firewall mangle add connection-mark=WARNET-CM action=mark-packet new-packet-mark=WARNET-PM chain=forward
/queue type add name=download-pcq kind=pcq pcq-classifier=dst-address
/queue type add name=upload-pcq kind=pcq pcq-classifier=src-address
/queue tree add name=DOWNLOAD parent=ToSwicth queue=download-pcq packet-mark=WARNET-PM
/queue tree add name=UPLOAD parent=ToModem queue=upload-pcq packet-mark=WARNET-PM
Referensi : http://wiki.mikrotik.com/wiki/Manual:Queues_-_PCQ_Examples