Home / Mikrotik Router / Mikrotik Router Basic Commands

Mikrotik Router Basic Commands

Mikrotik Router Basic Commands

Collection of Mikrotik Router Basic Commands – For those of you who are just learning to use Mikrotik must still be confused with the command (command line ) used on RouterOS. Though many basic commands Mikrotik important and must be known so that you can use Mikrotik RouterOS well. Actually the basic commands MikroTik RouterOS not much different from the basic commands on Linux generally. Because in fact, this is a Mikrotik development of the Debian Linux kernel.

Basic Commands Mikrotik RouterOS

The Mikrotik RouterOS shell command is the same as linux, such as saving commands, just using the TAB key on the keyboard then long commands, no more typing, just type the start of the command name, later Shell will automatically display the corresponding commands. For example IP ADDRESS command in mikrotik. Simply just typing in the ADD IP spaces press the TAB key, then the shell will automatically recognize and translate as IP ADDRESS command.

 

Here is a common command in Mikrotik commonly used:

  1. The command to shutdown and restart the computer, type:

[Admin @ MikroTik]> system shutdown  (For computer shutdown)

[Admin @ MikroTik]> system reboot       (To restart the computer)

[Admin @ MikroTik]> system reset   (To set up pre-configured configuration). And keep in mind that these commands must be performed in the admin directory.

  1. The command to rename the machine Mikrotik, type:

[Admin @ MikroTik]> / system identity

[Admin @ MikroTik]> system i dentity> set name = proxy

To see the configuration results, type “print” or   “pr”

Contok [admin @ MikroTik] system indentity> pr name: “proxy”

Then the console changes to [ admin @ proxy]

  1. The command to change the password of MikroTik machine, type

[Admin @ proxy]> / password

[Admin @ proxy] password> old password (if before you have not set password then type empty)

[Admin @ proxy] password> new password : …… (type in the new password)

[Admin @ proxy] password> retype new password : …… .. (enter once again passowrdnya)

As an example :

If   the old password is empty and the new password ABCD, then the command is as follows:

[Admin @ proxy]> / password

[Admin @ proxy] password> old password

[Admin @ proxy] password> new password ABCD

[Admin @ proxy] password> retype new password ABCD

  1. The command to see the interface conditions on the Mikrotik Router:

[Admin @ Mikrotik]> Print interface
Flags: X – disabled, D – dynamic, R – running
# NAME TYPE RX-RATE TX-RATE MTU
0 R ether1 ether 0 0 1500
1 R ether2 ether 0 0 1500

[Admin @ Mikrotik]>

If the interface has an X (disabled) after the number (0,1), then check again
etherned cardnya, should R (running).

  1. Rename interface
    [admin @ Mikrotik]> interface (enter)
  2. To change the name of Interface ether1 to Public (or any), then:

[Admin @ Mikrotik] interface> set 0 name = Public

  1. So also for ether2, suppose the name changed to Local, then
    [Admin @ Mikrotik] interface> set 1 name = Local
  2. Or simply from the root directory position, using the “/” sign, without the quotes
    [admin @ Mikrotik]> / interface set 0 name = Public
  3. Check again whether the interface name has been changed.
    [Admin @ Mikrotik]> / interface print

Flags: X – disabled, D – dynamic, R – running
# NAME TYPE RX-RATE TX-RATE MTU
0 R Local ether 0 0 1500
1 R Public ether 0 0 1500

  1. Commands to view the software MikroTik OS sofwtware package:

[Admin @ proxy]> / system package

[Admin @ proxy] system package> <type print or pr>

With the above command it will show the existing softwore package in MikroTik Os Example:

[Admin @ MikroTik   system package> pr

Flags: x – disabled

 #        Name

0    X routing – test

1    dhcp

2    radiolan

3    user-managers

4    X webproxy-test

5    arlan

6    isdn

7    hotspot-fix

8    ppp

9    wireless

10  web-proxy

11   hotspots

12   advanced-tools

13   security

14   Telephony

15   routing

16   synchronous

17   system

18   routerboard

19   rstp-bridge-test

20   X wireless-legecy

VERSION

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

2.9.27

 

To   see more details, type:

     [Admin @ proxy] system package> pr detail fl            gs: x – disabled

0         x name = “routing-test” version = “2.9.27” build-time = jul / 03/2006 10:57:53 scheduled

1         name = “system” version = “2.9.27” build – time = jul / 03/2006 10: 56: 37 schedule

2         name = “system” version = “2.9.27” build – time = jul / 03/2006 10: 56: 44   schedule

3         name = “web-proxy” version = “2.9.27” build-time = jul / 03/2006 10: `58: 03 schedule

4         name = “advanced -tools” version = “2.9.27” build -time = jul / 03/2006 10:56:41 scheduled = “”

5         name = “dhcp” version = “2.9.27” build-time = jul / 03/2006 10:56:45 scheduled = “”

6         name = “hotspot” version = “2.9.27” build-time = jul / 03/2006 10:56:58 scheduled = “”

7         x name = “webproxy-test” version = “2.9.27” build-time = jul / 03/2006 10:57:52 scheduled

8         name = “routerboard” version = “2.9.27” build-time = jul / 03/2006 10: 57: 17 – [q quit |  D dump |Up |Down]

  1. Commands to upgrade the router software package:

[Admin @ Mikrotik] system upgade>

To upgrade chosen packages:

Download 0.1,2,3,4,5,6,7,8,9,10,11,12,13,1 4

  1. The command activates the existing software packages in MikroTik OS:

    [Admin @ Mikrotik] system page>

     Enable <type in the desired package>

Example:

[Admin @ proxy] system package> enable dhcp

  1. The command to rename ethernet on MikroTik OS machine:

[Admin @ proxy]> / interface

[Admin @ proxy] interface> ethernet set etherl name = public

Or by using the command

[Admin @ proxy] interface> set < type in attached ethernet number>

Name = <    new ethernet name >

Example:

[Admin @ proxy] interface> set 0 name = public

[Admin @ proxy] interface> set 1 name = lan

Or

[Admin @ proxy] interface>
set 0 name = public; Set 1 name = lan

9 . IP address setting command on MikroTik OS machine:

[Admin @ proxy]> ip address

[Admin @ proxy] ip address>

Add interface = <interface name> anddress =

(Type IP address / subnet mask interface)

Example:

If the interfaces name “lan” and the desired IP address: 192.168.01 and the subnet mask: 255.255.255.0, then the command is   as follows

[Admin @ proxy]> / ip address

[Admin @ proxy] ip address>

Add interface = lan address = 192.168.0.1/24

  1. IP primaty and Secondary DNS command settings:
    [admin @ proxy] ./ ip dns

[Admin @ proxy] ip dns>

Set name-dns> = <Ip dns from ISP>

Example:

If the IP is the primary DNS ISP: 202.134.1.10 and secondary:

202.134.0.0155, then the command is as follows:

[Admin @ proxy] ./ ip dns

[Admin @ proxy] ip dns>

Set primary-dns = 202.134.1.10

[Admin @ proxy] ip dns>

Set secondary-dns = 202.134.0.155

  1. IP Gateway setting command on MikroTik OS machine

[Admin @ proxy]> / ip route

[Admin @ proxy] ip route> add gateway = <ip gatway

Example of IP gateway   from ISP: 202.134.1.1, then the command:

[Admin @ proxy]> / ip route

[Admin @ proxy] ip route>

Add   gateway = 202.134.1.1

  1. Network Address Translate (NAT) command on MikroTik OS machine

[Admin @ proxy]> / ip firewall nat

[Admin @ proxy] ip firewall nat>

Add   chain = srcnat out-interface = <etherface connected

With a WAN network> scr-address =

<Network-id interface connected with LAN / subnet mask interface

LAN> action = masqurade

Example:
if the network-id LAN interface: “192.168.0.0” and subnet

Mask: “255.255.255.0”. To interface MikroTik OS machine connected to the network

WAN: “pubilk”, then the command is as follows:

[Admin @ proxy]> / ip firewall nat

[Admin @ proxy [ip firewall nat>

Add chain = srcnat out-interface = public

Scr-address = 192.168.0.0 / 24 action = masquerade

 

Mikrotik basic commands for RouterOS above is not to complete because there are many more basic commands Mikrotik that can be used because of the menu and features of Mikrotik itself very much and varied.

Quite so long ago, I hope the article on Basic Commands Collection Mikrotik RouterOS is useful, we connect again Mikrotik Tutorial on another occasion.
[\hide]

About admin

Check Also

Mikrotik Winbox

How to View Mikrotik Winbox Password

How to View Mikrotik Winbox Password Forgot Username and Password Mikrotik? Forgot your Username and …

Leave a Reply

Your email address will not be published. Required fields are marked *