Documente Academic
Documente Profesional
Documente Cultură
To install the RouterOS using a CD you will need a CD-writer and a blank CD. Burn the CD-
image (an .iso file) to a CD. The archive with image can be downloaded here.
1. After downloading the CD image from www.mikrotik.com you will have an ISO file on
your computer:
3. In the program, choose Burn Image entry from the Recorder menu (there should be
similary named option in all major CD burning programs):
4. Select the recently extracted ISO file and click Open:
Move around menu using 'p' and 'n' or arrow keys, select with
'spacebar'.
Select all with 'a', minimum with 'm'. Press 'i' to install locally or
'r' to
install remote router or 'q' to cancel and reboot.
Follow the instructions, select needed packages, and press 'i' to install the software.
Continue? [y/n]
You should choose whether you want to keep old configuration (press [Y]) or to erase the
configuration permanently (press [N]) and continue without saving it. For a fresh
installation, press [N].
Creating partition...
Formatting disk...
The system will install selected packages. After that you will be prompted to press
'Enter'. Before doing that, remove the CD from your CD-Drive:
Software installed.
Press ENTER to reboot
1. Langkah pertama adalah install Mikrotik RouterOS pada PC atau pasang DOM.
Sampai langkah ini kita sudah bisa masuk pada mesin Mikrotik. User default adalah admin
dan tanpa password, tinggal ketik admin kemudian tekan tombol enter.
4. Mengganti nama Mikrotik Router, pada langkah ini nama server akan diganti menjadi
“XAVIERO” (nama ini sih bebas2 aja mo diganti)
[admin@Mikrotik] > system identity set name=XAVIERO
[admin@XAVIERO] >
6. Memberikan IP address pada interface Mikrotik. Misalkan ether1 akan kita gunakan untuk
koneksi ke Internet dengan IP 192.168.0.1 dan ether2 akan kita gunakan untuk network local kita
dengan IP 172.16.0.1
13. Tes untuk akses domain, misalnya dengan ping nama domain
[admin@XAVIERO] > ping yahoo.com
216.109.112.135 64 byte ping: ttl=48 time=250 ms
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 571/571.0/571 ms
[admin@XAVIERO] >
14. Setup Masquerading, Jika Mikrotik akan kita pergunakan sebagai gateway server maka agar
client computer pada network dapat terkoneksi ke internet perlu kita masquerading.
[admin@XAVIERO]> ip firewall nat add action=masquerade outinterface=
ether1 chain:srcnat
[admin@XAVIERO] >
Setelah langkah ini bisa dilakukan pemeriksaan untuk koneksi dari jaringan local. Dan jika
berhasil berarti kita sudah berhasil melakukan instalasi Mikrotik Router sebagai Gateway server.
Setelah terkoneksi dengan jaringan Mikrotik dapat dimanage menggunakan WinBox
yang bisa di download dari Mikrotik.com atau dari server mikrotik kita.
2. Tambahkan DHCP Network dan gatewaynya yang akan didistribusikan ke client Pada contoh
ini networknya adalah 172.16.0.0/24 dan gatewaynya 172.16.0.1
/ip dhcp-server network add address=172.16.0.0/24 gateway=172.16.0.1
3. Tambahkan DHCP Server ( pada contoh ini dhcp diterapkan pada interface ether2 )
/ip dhcp-server add interface=ether2 address-pool=dhcp-pool
kemudian cek kembali dhcp-server seperti langkah 4, jika tanda X sudah tidak ada berarti sudah
aktif.
untuk bandwith controller, bisa dengan sistem simple queue ataupun bisa dengan mangle
[admin@XAVIERO] queue simple> add name=Komputer01
interface=ether2 target-address=172.16.0.1/24 max-limit=65536/131072
[admin@XAVIERO] queue simple> add name=Komputer02
interface=ether2 target-address=172.16.0.2/24 max-limit=65536/131072
dan seterusnya…
SETTING MICROTIK
http://crypt0gr4phy.wordpress.com/2007/02/02/setting-mikrotik/
[admin@warnet] >interface Ethernet set ether1 name=modem ===== Ethernet yg utk modem
[admin@warnet] >interface ethernet set ether2 name=local === Ethernet yg untuk ke HUB
[admin@warnet] >ip address add interface=modem address= ( Diisi IP address dari ISP ) /
netmask
[admin@warnet] >ip address add interface=lokal address= 192.168.0.1/255.255.255.0
SETTING DNS :
[admin@warnet] >ip dns set primary-dns=10.11.155.1secondary-dns=10.11.155.2
================================================== ================
**************************************************
******************************************
Graphing /tool graphing set store-every=hour[admin@MikroTik] tool graphing> print store-
every: hour[admin@MikroTik] tool graphing> [admin@MikroTik] tool graphing interface> add
interface=ether1 \allow-address=192.168.0.0/24 store-on-disk=yes[admin@MikroTik] tool
graphing interface> printFlags: X – disabled # INTERFACE ALLOW-ADDRESS STORE-ON-
DISK 0 ether1 192.168.0.0/24 yes[admin@MikroTik] tool graphing interface> [admin@VLP
InWay] tool graphing> export
# oct/12/2005 09:51:23 by RouterOS 2.9.5
# software id = 1TLC-xxx
#
/ tool graphing
set store-every=5min
/ tool graphing queue
add simple-queue=all allow-address=10.8.2.99/32 store-on-disk=yes allow-target=yes
disabled=no
/ tool graphing resource
add allow-address=0.0.0.0/0 store-on-disk=yes disabled=no
/ tool graphing interface
add interface=Inway allow-address=0.0.0.0/0 store-on-disk=yes disabled=no
add interface=LAN allow-address=0.0.0.0/0 store-on-disk=yes disabled=no
add interface=DMZ allow-address=0.0.0.0/0 store-on-disk=yes disabled=no
Load-balancing & Fail-over di MikroTik
Kondisi : ISP dimana kita bekerja sebagai Administrator menggunakan lebih dari satu gateway untuk
terhubung ke Internet. Semuanya harus dapat melayani layanan upstream & downstream. Karena akan
beda kasusnya apabila salah satunya hanya dapat melayani downstream, contohnya jika menggunakan
VSAT DVB One-way.
Untuk kasus ini dimisalkan ISP memiliki 2 jalur ke Internet. Satu menggunakan akses DSL (256 Kbps) dan
lainnya menggunakan Wireless (512 Kbps). Dengan rasio pemakaian DSL:Wireless = 1:2 .
3. Good Luck!!
PCQ
Dengan menggunakan queue type pcq di Mikrotik, kita bisa membagi bandwidth yang ada secara
merata untuk para pelahap-bandwidth™ -->saat jaringan pada posisi peak.
Contohnya, kita berlangganan 256 Kbps. Kalau ada yang sedang berinternet ria, maka beliau dapat
semua itu jatah bandwidth. Tetapi begitu teman-temannya datang, katakanlah 9 orang lagi, maka
masing-masingnya dapat sekitar 256/10 Kbps. Yah.. masih cukup layaklah untuk buka-buka situs non-
porn atau sekedar cek e-mail & blog--> .
1. Asumsi : Network Address 192.168.169.0/28, interface yang mengarah ke pengguna diberi nama
LAN, dan interface yang mengarah ke upstream provider diberi nama INTERNET;
2. Ketikkan di console atau terminal :
> /ip firewall mangle add chain=forward src-
address=192.168.169.0/28 action=mark-connection new-connection-
mark=NET1-CM
> /ip firewall mangle add connection-mark=NET1-CM action=mark-
packet new-packet-mark=NET1-PM chain=forward
> /queue type add name=downsteam-pcq kind=pcq pcq-classifier=dst-
address
> /queue type add name=upstream-pcq kind=pcq pcq-classifier=src-
address
> /queue tree add parent=LAN queue=DOWNSTREAM packet-mark=NET1-PM
> /queue tree add parent=INTERNET queue=UPSTREAM packet-mark=NET1-
PM
3. Good Luck!!
Memanipulasi ToS ICMP & DNS di MikroTik
Tujuan :
6. Good Luck!!
Basic Setup
This page will tak about how to make QUEUE TREE in RouterOS that with Masquerading for more than
two interfaces. It’s for sharing internet connection among users on each interfacess. In manual this
possibility isn’t writted.
First, let’s set the basic setting first. I’m using a machine with 3 or more network interfaces:
[admin@instaler] > in pr
[admin@instaler] > ip ad pr
Mangle Setup
We need to mark our users. One connectoin for upload and second for download. In this example I add
mangle for one user. At the end I add mangle for local transmission because I don’t QoS local trafic
emong users. But for user I need to separate upload and download.
[admin@instaler] ip firewall mangle> print
disabled=no
new-packet-mark=lokalTrafic passthrough=yes
And now, the queue tree setting. We need one rule for downlink and one rule for uplink. Be careful
when choosing the parent. for downlink traffic, we use parent “global-out”, because we have two or
more downloading interfaces. And for uplink, we are using parent “public”, we want QoS uplink traffic.
(I’m using pcq-up and download from manual) This example is for 2Mb/1Mb
burst-time=0s
burst-threshold=0 burst-time=0s
burst-time=0s
#!/bin/sh
iptables=/sbin/iptables
#definisi default policy dan bikin chain baru bernama maccheck di interface eth1
$iptables -t mangle -F
$iptables -t mangle -F maccheck
$iptables -t mangle -X maccheck
$iptables -t mangle -N maccheck
$iptables -t mangle -I PREROUTING -i eth1 -p all -j maccheck
#self explanatory… ip address + mac
$iptables -t mangle -A maccheck -s 192.168.0.1 -i eth1 -m mac -j RETURN
–mac-source
00:80:11:11:11:11
$iptables -t mangle -A maccheck -s 192.168.0.2 -i eth1 -m mac -j RETURN
–mac-source
00:80:22:22:22:22
$iptables -t mangle -A maccheck -s 192.168.0.3 -i eth1 -m mac -j RETURN
–mac-source
00:80:33:33:33:33
#selain yg terdaftar baik ip maupun mac akan di mark untuk nanti di drop, isi
dengan salah satu
mac yg aktif yg mana saja
#disini contohnya 00:80:11:11:11:11 yg sudah kita definisikan di atas
$iptables -t mangle -A maccheck -s 0/0 -i eth1 -m mac -j MARK –mac-source !
00:80:11:11:11:11
–set-mark 1
$iptables -t mangle -A maccheck -s 0/0 -i eth1 -p all -j MARK –set-mark 1
source = primadonal.com
Limit Different Bandwidth In Day and Night
There are lot many ways to limit bandwidth for day and Night, but personally I found this is the
easiest way, Here it is.
Suppose we have one network 192.168.1.0/24 and want to limit Bandwidth for day and Night
Time.
Network 192.168.1.0/24
Bandwidth = 06:00am – 18:00pm – 1Mbps. <Max-Limit>
Bandwidth = 18:00pm – 06:00am – 2Mbps. <Max-Limit>
Create two simple queues for the same network with different Bandwidth Limit.
/queue simple
#name=”Day” target-addresses=192.168.1.0/24 dst-address=0.0.0.0/0
interface=<ether-x> parent=none direction=both priority=8
queue=default-small/default-small limit-at=512k/512k
max-limit=1M/1M total-queue=default-small
/system script
#name=”Day” source=/queue simple enable Day; /queue simple disable Night
/system scheduler
#name=”Day” on-event=Day start-date=oct/13/2007 start-time=06:00:00
interval=1d