Perintah - perintah Dasar Mikrotik

PERINTAH-PERINTAH DASAR MIKROTIK


·         MENGEDIT USER
ü  user print (untuk melihat user)
ü  user add name = smk-bisa password = 1 group = full disabled = no (untuk menambah user)

·         MENAMBAH IP ADDRESS
ü  ip address add address=192.168.1.102/24 interfaces = ether1 disabled = no
ü  ping 192.168.1.102
ü  ping 10.10.1.1

·         MENAMBAH GATEWAY
ü  ip route add gateway=192.168.1.1 (ip modem) disabled = no
ü  ip route print
ü  ping 192.168.1.1

·         MENAMBAH DNS (DOMAIN NAME SYSTEM)
ü  ip dns set servers = 202.134.1.10 allow-remote-requests = yes
ü  ping 202.134.1.10

·         AGAR TERHUBUNG KE INTERNET
ü  ip firewall nat add chain=srcnat action=masquerade out-interface=ether1

·         MENAMBAH DHCP (DYNAMIC HOST CONFIGURATION PROTOCOL)
ü  ip pool add name = dhcp-pool ranges = 10.10.1.2 - 10.10.1.254
ü  ip dhcp-server network add address = 10.10.1.0/24 gateway=10.10.1.1 dns-server=202.134.1.10
ü  ip dhcp-server add interfaces = ether3 address-pool = dhcp-pool disabled = no
ü  ip dhcp-server print
ü  ping yahoo.com

·         MENAMBAH MANAGEMENT BANDWITH
ü  ip firewall mangle add chain = forward src-address=10.10.1.0/24 action = mark-connection new-connection-mark = user-con
ü  ip firewall mangle add connection-mark = user-con action = mark-packet new-packet-mark = user-con chain = forward

·         MENAMBAH SETTING SIMPLE QUEUE (UNTUK MEMBATASI DOWNLOAD DAN UPLOAD)
ü  queue simple add name = smk-muhammadiyah1-pasuruan target-address = 10.10.1.0/24 max-limit = 128k/128k disabled = no
·         CARA SETTING HOTSPOT
ü  ip hotspot setup
ü  hotspot interface : ether3
ü  local address of network : 10.10.1.1/24
ü  masquere network : yes
ü  address pool of network : 10.10.1.2-10.10.1.154
ü  certificate : none
ü  ip address of smtp server : 0.0.0.0
ü  dns server : 202.134.1.10
ü  dns name : di kosongi
ü  name of local hotspot user : admin
ü  password for the user : 0

·         MEMBLOK SITUS DI INTERNET DENGAN PROXY
ü  ip firewall filter add chain = forward out-interface=ether1 content = (situs yg mau di blok,misalnya:facebook.com) action = drop

·         CARA BLOK IP
ü  klik winbox
ü  pilih IP
ü  firewall
ü  address list (name = attacker address = 192.168.1.123 (IP yg mw di blok))
ü  filter rules
ü  general (chain = input protocol = 6 (tcp) dst-port = (Port yg mw di blok, contoh:www (80) in-interfaces = ether1 (WAN atau konek internet))
ü  advanced (src.addres.list = attacker)
ü  action (drop)

·         MEMBUAT DUA SERVER BISA MEMBUKA MIKROTIK KITA DAN YANG LAINNYA TIDAK BISA
ü  masuk winbox
ü  ip => firewall
ü  buat address list
ü  ip server : name    : vicky
ü  address : 192.168.1.123
ü  ip server : name    : vicky
ü  address : 192.168.1.9
ü  ip kita   : name    : vicky
ü  address : 192.168.1.102 / 10.10.1.2
ü  filter rules
ü  general
ü  chain        : "input"
ü  protocol     : "6 (tcp)"
ü  in.interface : "ether1" (yang terhubung ke internet)
ü  advanced
ü  src.address  : [!] "vicky"
ü  action   : "drop"

·         BRIDGE
ü  masuk winbox
ü  pilih bridge
ü  bridge pilih tambah langsung ok
ü  bridge port pertama
ü  interface : "ether1" pilih yang tegak (yang terhubung ke internet)
ü  bridge port kedua
ü  interface : "ether3" pilih yang tegak (yang terhubung ke komputer kita)
ü  pilih ip => address
ü  address   : 10.10.1.2/24
ü  network   : gak usah dietting
ü  interface : bridge1

·         CARA MENGHITUNG SUBNETMASK
ü  kelas A = 1-127 subnetmask = 255.0.0.0
ü  Kelas B = 128-192 subnetmask = 255.255.0.0
ü  Kelas C = 193-255 subnetmask = 255.255.255.0

contoh :
mencari 15 host
kelas C kelas B kelas A
2 pangkat 7 (128) 2 pangkat 8 (256) 2 pangkat 16 (65536)
2 pangkat 6 (64) 2 pangkat 9 (512) 2 pangkat 17 (131072)
2 pangkat 5 (32) 2 pangkat 10 (1024) 2 pangkat 18 (262144)
2 pangkat 4 (16) 2 pangkat 11 (2048) 2 pangkat 19 (524288)
2 pangkat 3 (8) 2 pangkat 12 (4096) 2 pangkat 20 (1048576)
2 pangkat 2 (4) 2 pangkat 13 (8192) 2 pangkat 21 (2097152)
2 pangkat 1 (2) 2 pangkat 14 (16384) 2 pangkat 22 (4194304)
2 pangkat 0 (1) 2 pangkat 15 (32768) 2 pangkat 23 (8388608)
Pembagian kelas IP
10.100.1.1/8  255.0.0.0             kelas A
172.16.2.1 2/1655.255.0.0           kelas B
192.168.1.10/24 255.255.255.0       kelas C

Penghitungan Subnet Mask
a.b.c.d
8.8.8.8
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1
contoh 1
192.168.1.20/27
berapa subnet mask nya?
jawab :
27 = 8+8+8+3
255.255.255.xxx
xxx = 3
1 1 1 0 0 0 0 0 = 3
128 + 64 + 32 +0+0+0+0+0= 224
maka subnet mask > 255.255.255.224
contoh 2
192.168.1.20/9
berapa subnet mask nya?
jawab :
9 = 8+1
255.xxx.0.0
xxx = 1
1 0 0 0 0 0 0 0 = 3
128 +0+0+0+0+0+0+0+0= 128
maka subnet mask > 255.128.0.0
Menghitung IP(Host) yang bisa dipakai
Rumus = (2^n)-2
Contoh 1
192.168.1.20/25

Berapa maksimal Host/IP yang bisa dipakai?
25 = 24 + 1
1 0 0 0 0 0 0 0 (jumlah 0 adalah 7, maka n=7)
128 64 32 16 8 4 2 1
Mentok di 128 (2^7)
maka >> 128-2= 126 host
Jumlah Block network = 2^1 = 2
Range IP >>
Network 1 >>
192.168.1.0/25
192.168.1.1 – 192.168.1.126
192.168.1.127 >> IP Broadcast
Network 2 >>
192.168.1.128/25
192.168.1.129 – 192.168.1.254

192.168.1.255 >> IP Broadcast

Share this

Related Posts

Previous
Next Post »