Rabu, 09 Januari 2013

Command Line Intreface



Berikut beberapa perintah dasar mengkonfigurasi MikroTik dengan menggunakan Command Line Interface (CLI):
  1. Memberi Nama Router
    /system identity set name=RouterKu.
  2. Melihat Interface yang terpasang
    /interface print
  3. Memberi Nama pada Interface Ethernet
    /interface ethernet set ether1 name=Public
    /interface Ethernet set ether2 name=Local
    atau
    /interface set 0 name=Public
    /interface set 1 name=Local
    atau
    / interface set 0 name=Public; set 1 name=Local
  4. Memberi IP Address pada interface Public dan Local
    /ip address add address=192.168.67.100/24 interface=Public
    /ip address add address=167.16.10.100/24 interface=Local
  5. Mengganti IP Address pada interface Local (1)
    /ip address remove 1
    /ip address add address=172.16.10.100/24 interface=Local
  6. Menambahkan default gateway
    / ip route add dst-address=0.0.0.0/0 gateway=192.168.67.2 Atau
    /ip route add gateway=192.168.67.2
  7. Menambahkan NAT Masquerade
    /ip firewall nat add chain=srcnat out-interface=Public action=masquerade
  8. Menambahkan Primary DNS dan Secondary DNS
    /ip dns set primary-dns=203.78.115.215 secondary-dns=203.78.115.222 allow-remote-request=yes
  9. Menambahkan DHCP Server packet
    • Buat IP Pool
      /ip pool add name = ippool1 ranges= 172.16.10.1-172.16.10.10
    • Setup DHCP Server
      /ip dhcp-server add interface=Local address=ippool1
    • Setup Netwok; Gateway, DNS Server,..
      /ip dhcp-server  network add address=172.16.10.0/24 gateway=172.16.10.100 s=dns-server=203.78.115.222


  1. Membackup System configuration
    /system backup save name=Backup-1   
  2. Restore System configuration
    /system backup load name=Backup-

12.  Add
Berfungsi sebagai perintah untuk menambah properties.
13.   Comment
Berfungsi sebagai perintah untuk memberi komentar sebagai keterangan.
14.  Disable
Berfungsi sebagai perintah untuk menonaktifkan suatu rule / action / service, dan lain sebagainya.
15.  Edit
Berfungsi sebagai perintah untuk mengubah nilai properties suatu item.
16.  Export
Berfungsi sebagai perintah untuk membackup semua perintah konfigurasi pada setiap direktori / service.
17.  Print
Berfungsi sebagai perintah untuk menampilkan / mencetak informasi ke layar.
18.  Remove
Berfungsi sebagai perintah untuk menghapus suatu rule / file / script, dan lain sebagainya.
19.  Set
Berfungsi sebagai perintah untuk mengganti nilai value pada suatu rule / item.

ini adalah perintah yang sering gunakan.
20.   Untuk shutdown dan restart komputer, yaitu dengan perintah
[admin@Mikrotik]>system shutdown –> untuk mematikan
[admin@Mikrotik]>system reboot –> untuk restart komputer
[admin@Mikrotik]>system reset –> untuk me-reset konfigurasi yang sudah dibuat sebelumnya
21.   Untuk merubah nama mesin MikroTik, yaitu :
[admin@Mikrotik]>/system identity
[admin@Mikrotik]/system identity> set name=proxy
22.   Untuk merubah password mesin MikroTik, yaitu :
[admin@Mikrotik]>/system password
[admin@Mikrotik]>/system password>old password
(ketikkan password lama)

[admin@Mikrotik]>/system password>
new password: …….(ketikkan password baru)
[admin@Mikrotik]>/system password> retype new password: …….
(ketikkan lagi password baru)
23. 
24.  Berikut ini daftar perintah dasar yang sering digunakan dalam mode CLI (Command Line)
25.  1.  Setting Password
router>enable
router#configure terminal
router(config)#enable password forumsains (set password untuk masuk ke mode privilege)
router(config)#enable secret secret (set enkripsi untuk password yang  disimpan)
26.  2. Setting Host Name
router>enable
router#configure terminal
router(config)#hostname nama-host
27.  3. Setting VLAN
router>enable
router#configure terminal
router(config)#vlan nomor-vlan
router(config-vlan)#name nama-vlan
28.  4. Setting IP Address pada VLAN
router>enable
router#configure terminal
router(config)#interface vlan 1
router(config-if)#ip address address mask (misal: ip address 172.10.46.1 255.255.255.0)
router(config-if)#no shutdown
29.  5. Setting Identitas pada Port Cisco Catalyst
router>enable
router#configure terminal
router(config)#interface nama-port
router(config-if)#description “Port Setting Identitas”
router(config-if)#end
30.  6. Setting IP Gateway
router>enable
router#configure terminal
router(config)#ip default-gateway address
31.  9. Setting Line Con 0
router#configure terminal
router(config)#line con 0
router(config-line)#login
router(config-line)#password password
32.  10. Melihat Semua Konfigurasi
router#show running-config
33.  11. Menghapus Semua Konfigurasi
router#erase startup-config
router#dir
router#delete flash:vlan.dat
router#dir
router#reload

Tidak ada komentar:

Posting Komentar