Home / Mikrotik Router Configuration / Mikrotik RouterOS Commands

Mikrotik RouterOS Commands

Basic set of Commands Mikrotik RouterOS

For those who are just learning to use Mikrotik must still confused with the command (command line) used in Mikrotik 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 is not much different from the basic commands in linux in general. Because of this proxy is actually an outgrowth of the Debian linux kernel.

Mikrotik Router OS Commands

Mikrotik RouterOS same command shell with Linux, such as saving the order, please use the TAB key on the keyboard long command, no longer need to be typed, simply type in the beginning of the command is called, will be automatically Shell will display itself commands respect. Eg IP ADDRESS command in Mikrotik RouterOS. Quite simply typing in IP ADD space press the TAB key, the shell will automatically recognize and translate it as a command IP ADDRESS.

Here’s a basic Mikrotik RouterOS commands commonly used

1. The command to shutdown and restart the computer, type:
[Admin @ MikroTik]> system shutdown (to shutdown the computer)
[Admin @ MikroTik]> system reboot (To restart the computer)
[Admin @ MikroTik]> System reset (For configurations that have been made previously). And keep in mind that the order – the order must be carried out in the admin directory.

2. The command to change the machine name Mikrotik, type:
[Admin @ MikroTik]> / system identity
[Admin @ MikroTik]> system identity> set name = Proxy
To view the configuration, type “print” or “pr”
[admin @ MikroTik] system indentity> pr name: “proxy”
Then the console changes to [admin @ proxy]

3. The command to change the password MikroTik machine, type
[Admin @ proxy]> / password
[Admin @ proxy] password> old password (if you have not previously set a password then enter empty)
[Admin @ proxy] password> New password: …… (type a new password)
[Admin @ proxy] password> Retype new password: …… .. (insert again password Again)

As an example :
If the old password and new password 123456789 empty, then the command is as follows:
[Admin @ proxy]> / password
[Admin @ proxy] password> old password
[Admin @ proxy] password> new password 123456789
[Admin @ proxy] password> Retype new password 123456789

4. The command to view conditions in Mikrotik Router interface:
[Admin @ MikroTik]> interface print
Flags: X – disabled, D – dynamic, R – running
# NAME TYPE RX-TX-RATE RATE MTU
0 R ether1 ether 0 0 1500
1 R ether2 ether 0 0 1500
[Admin @ MikroTik]>
If there is an X interface (disabled) after the number (0.1), then check again
ethernet card again, should R (running).
a. Renaming interface
[Admin @ MikroTik]> interface (enter)
b. To rename Interface ether1 be Public

[Admin @ MikroTik] interface> set 0 name = Public
c. Like wise for ether2, suppose the name was changed to Local, then
[Admin @ MikroTik] interface> sets one name = Local
d. or simply from the position of the root directory, a symbol “/”, without the quotes
[Admin @ MikroTik]> / interface set 0 name = Public
e. Please check that your name has been changed interface.
[Admin @ MikroTik]> / interface print
Flags: X – disabled, D – dynamic, R – running
# NAME TYPE RX-TX-RATE RATE MTU
Local R ether 0 0 0 1500
1 R Public ether 0 0 1500

5. Command to see the package software Mikrotik RouterOS:
[Admin @ proxy]> / system package
[Admin @ proxy] system package> <type in print or pr>
With the above command will appear software package is in Mikrotik Os Example:
[Admin @ Mikrotik system package> pr
Flags: x – disabled

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]

6. Command to upgrade the router software package

[Admin @ Mikrotik] system upgrade>
To upgrade chosen packages:
Download 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14

7. The command to enable existing software packages in Mikrotik RouterOS

[Admin @ MikroTik] system page> 

Enable <typing the desired packages>
example:
[Admin @ proxy] system package> enable dhcp

8. The command to change the name on a machine ethernet Mikrotik OS:
[Admin @ proxy]> / interface
[Admin @ proxy] interface> ethernet set etherl name = public
Or by using the command
[Admin @ proxy] interface> set <typing number attached ethernet>
name = <name of the new ethernet>
For example:
[Admin @ proxy] interface> name = public set 0
[Admin @ proxy] interface> sets one name = lan
Or
[Admin @ proxy] interface>
set 0 name = public; sets one name = lan

9. The order setting the IP address on the machine Mikrotik RouterOS:
[Admin @ proxy]> ip address
[Admin @ proxy] ip address>
Add interface = <interface name> IPAddress =
(Type the IP address / subnet mask interface)
example:
If the name of the interface “lan” and the IP address of the desired: 192.168.01 and subnet mask: 255.255.255.0, then the command as follows
[Admin @ proxy]> / ip address
[Admin @ proxy] ip address>
Add interface = lan address = 192.168.0.1/24

10. The order setting primary and Secondary DNS IP:
[Admin @ proxy] ./ ip dns
[Admin @ proxy] ip dns>
Set-dns name> = <Ip dns from ISP>

example:
If the primary ISP’s DNS IP: 8.8.8.8 and secondary:
8.8.4.4, then the command is as follows:
[Admin @ proxy] ./ ip dns
[Admin @ proxy] ip dns>
Set primary-dns =8.8.8.8
[Admin @ proxy] ip dns>
Set secondary-dns = 8.8.4.4

11. Orders Gateway IP settings on the machine MikroTik OS
[Admin @ proxy]> / ip route
[Admin @ proxy] ip route> add gateway = <ip gatway
Examples of ISP gateway IP: 202.134.1.1, then the command:
[Admin @ proxy]> / ip route
[Admin @ proxy] ip route>
add gateway = 202.134.1.1

12. Command Network address Translate (NAT) on the machine Mikrotik RouterOS
[Admin @ proxy]> / ip firewall nat
[Admin @ proxy] ip firewall nat>
add chain = srcnat out-interface = <etherface connected
with WAN> scr-address =
<Network-id interface connected to LAN / subnet mask interface
LAN> action = masqurade

example:
if the LAN interface network-id: “192.168.0.0” and the subnet
Mask: “255.255.255.0”. for Mikrotik RouterOS machine interfaces that connect to the network
WAN: “pubilc”, then the command 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

Basic commands for RouterOS Mikrotik above are not too full, because there are many more commands that can be used Mikrotik basis because the menus and features of Mikrotik itself are numerous and varied.

About admin

Check Also

Load Balance 2 WAN in Mikrotik

How to Load Balance 2 WAN in Mikrotik

How to Load Balance 2 WAN in Mikrotik This article again discusses Load Balancing, which …

Leave a Reply

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