Manual Mikrotik
Manual Mikrotik
Contents
1 Overview
2 Winbox
3 WebFig
4 CLI
4.1 Serial Cable
4.2 Monitor and Keyboard
Overview
After you have installed the RouterOS software, or turned on the Router for the
first time, there are various ways how to connect to it:
Accessing Command Line Interface (CLI) via Telnet, ssh, serial cable or
even keyboard and monitor if router has VGA card.
Accessing Web based GUI (WebFig)
Using WinBox configuration utility
Winbox
Winbox is configuration utility that can connect to the router via MAC or IP
protocol. Latest winbox version can be downloaded from our demo router.
Run Winbox utility, then click the [...] button and see if Winbox finds your
Router and it's MAC address. Winbox neighbor discovery will discover all
routers on the broadcast network. If you see routers on the list, connect to it by
clicking on MAC address and pressing Connect button.
Winbox will try download plugins from the router, if it is connecting for the first
time to the router with current version. Note that it may take about one minute to
download all plugins if winbox is connected with MAC protocol.
This method works with any device that runs RouterOS. Your PC needs to have
MTU 1500
If winbox cannot find any routers, make sure that your Windows computer is
directly connected to the router with an Ethernet cable, or at least they both are
connected to the same switch. As MAC connection works on Layer2, it is
possible to connect to the router even without IP address configuration. Due to
the use of broadcasting MAC connection is not stable enough to use
continuously, therefore it is not wise to use it on a real production / live network!.
MAC connection should be used only for initial configuration.
WebFig
If you have router with default configuration, then IP address of the router can be
used to connect to the Web interface. WebFig has almost the same configuration
functionality as Winbox.
Please see following articles to learn more about web interface configuration:
winbox terminal
telnet
ssh
serial cable etc.
Serial Cable
If your device has a Serial port, you can use a console cable (or Null modem cable)
Plug one end of the serial cable into the console port (also known as a serial port
or DB9 RS232C asynchronous serial port) of the RouterBOARD and the other
end in your PC (which hopefully runs Windows or Linux). You can also use a
USB-Serial adapter. Run a terminal program (HyperTerminal, or Putty on
Windows) with the following parameters for All RouterBOARD models except
230:
9600bit/s, 8 data bits, 1 stop bit, no parity, hardware (RTS/CTS) flow control by
default.
If parameters are set correctly you should be able to see login prompt. Now you
can access router by entering username and password:
MikroTik 4.15
MikroTik Login:
[admin@MikroTik] >
If your device has a graphics card (ie. regular PC) simply attach a monitor to the
video card connector of the computer (note: RouterBOARD products don't have
this, so use Method 1 or 2) and see what happens on the screen. You should see a
login promt like this:
MikroTik v3.16
Login:
Enter admin as the login name, and hit enter twice (because there is no
password yet), you will see this screen:
Now you can start configuring the router, by issuing the setup command.
This method works with any device that has a video card and keyboard connector
Manual:Initial Configuration
From MikroTik Wiki
Contents
1 Summary
2 Connecting wires
3 Configuring router
3.1 Logging into the router
3.2 Router user accounts
3.3 Configure access to internet
3.3.1 DHCP Client
3.3.2 Static IP Address
3.3.3 Configuring network address translation (NAT)
3.3.4 Default gateway
3.3.5 Domain name resolution
3.3.6 SNTP Client
3.4 Setting up Wireless
3.4.1 Check Ethernet interface state
3.4.2 Security profile
3.4.3 Wireless settings
3.4.4 Bridge LAN with Wireless
4 Troubleshooting & Advanced configuration
4.1 General
4.1.1 Check IP address
4.1.2 Change password for current user
4.1.3 Change password for existing user
4.1.4 No access to the Internet or ISP network
4.1.5 Checking link
4.2 Wireless
4.2.1 Channel frequencies and width
4.2.2 Wireless frequency usage
4.2.3 Change Country settings
4.3 Port forwarding
4.3.1 Static configuration
4.3.2 Dynamic configuration
4.4 Limiting access to web pages
4.4.1 Set up Web Proxy for page filtering
4.4.2 Set up Access rules
4.4.3 Limitation strategies
Summary
Congratulations, you have got hold of MikroTik router for your home network.
This guide will help you to do initial configuration of the router to make your
home network a safe place to be.
The guide is mostly intended in case if default configuration did not get you to
the internet right away, however some parts of the guide is still useful.
Connecting wires
Router's initial configuration should be suitable for most of the cases. Description
of the configuration is on the back of the box and also described in the online
manual.
Configuring router
Initial configuration has DHCP client on WAN interface (ether1), rest of the
ports are considered your local network with DHCP server configured for
automatic address configuration on client devices. To connect to the router you
have to set your computer to accept DHCP settings and plug in the ethernet cable
in one of the LAN ports (please check routerboard.com for port numbering of the
product you own, or check front panel of the router).
To access the router enter address 192.168.88.1 in your browser. Main RouterOS
page will be shown as in the screen shot below. Click on WebFig from the list.
You will be prompted for login and password to access configuration interface.
Default login name is admin and blank password (leave empty field as it is
already).
It is good idea to start with password setup or add new user so that router is not
accessible by anyone on your network. User configuration is done form System -
> Users menu.
To access this menu, click on System on the left panel and from the dropdown
menu choose Users (as shown in screenshot on the left)
You will see this screen, where you can manage users of the router. In this screen
you can edit or add new users:
When you click on account name (in this case admin), edit screen for the
user will be displayed.
If you click on Add new button, new user creation screen will be
displayed.
Both screens are similar as illustrated in screenshot below. After editing user's
data click OK (to accept changes) or Cancel. It will bring you back to initial
screen of user management.
In user edit/Add new screen you can alter existing user or create new. Field
marked with 2. is the user name, field 1. will open password screen, where old
password for the user can be changed or added new one (see screenshot below).
If initial configuration did not work (your ISP is not providing DHCP server for
automatic configuration) then you will have to have details from your ISP for
static configuration of the router. These settings should include
Static IP Address
You have to fill only fields that are marked. Field 1. should contain IP
address provided by your ISP and network mask'. Examples:
172.16.88.67/24
both of these notations mean the same, if your ISP gave you address in one
notation, or in the other, use one provided and router will do the rest of
calculation.
Note: While you type in the address, webfig will calculate if address you have
typed is acceptable, if it is not label of the field will turn red, otherwise it will be
blue
Note: It is good practice to add comments on the items to give some additional
information for the future, but that is not required
Since you are using local and global networks, you have to set up network
masquerade, so that your LAN is hidden behind IP address provided by your ISP.
That should be so, since your ISP does not know what LAN addresses you are
going to use and your LAN will not be routed from global network.
To check if you have the source NAT open 'IP -> Firewall -> tab NAT' and check
if item highlighted (or similar) is in your configuration.
Essential fields for masquerade to work:
enabled is checked;
chain - should be srcnat;
out-interface is set to interface connected to your ISP network, Following
this guide ether1;
action should be set to masquerade.
In screenshot correct rule is visible, note that irrelevant fields that should not
have any value set here are hidden (and can be
ignored)
Default gateway
under 'IP -> Routes' menu you have to add routing rule called default route. And
select Add new to add new
route.
here you will have to press button with + near red Gateway label and enter in the
field default gateway, or simply gateway given by your ISP.
This should look like this, when you have pressed the + button and enter gateway
into the field displayed.
After this, you can press OK button to finish creation of the default route.
At this moment, you should be able to reach any globally available host on the
Internet using IP address.
To check weather addition of default gateway was successful use Tools -> Ping
Domain name resolution
To be able to open web pages or access Internet hosts by domain name DNS
should be configured, either on your router or your computer. In scope of this
guide, i will present only option of router configuration, so that DNS addresses
are given out by DHCP-Server that you are already using.
This can be done in 'IP -> DNS ->Settings', first Open 'IP ->DNS':
Then select Settings to set up DNS cacher on the router. You have to add field to
enter DNS IP address, section 1. in image below. and check Allow Remote
Requests marked with 2.
The result of pressing + twice will result in 2 fields for DNS IP addresses:
Note: Filling acceptable value in the field will turn field label blue, other way it
will be marked red.
SNTP Client
To do that, go to 'System -> SNTP' where you have to enable it, first mark,
change mode from broadcast to unicast, so you can use global or ISP provided
NTP servers, that will allow to enter NTP server IP addresses in third area.
Setting up Wireless
For ease of use bridged wireless setup will be used, so that your wired hosts will
be in same ethernet broadcast domain as wireless clients.
Warning: Changing settings may affect connectivity to your router and you can
be disconnected from the router. Use Safe Mode so in case of disconnection made
changes are reverted back to what they where before you entered safe mode
Check if all intended LAN Ethernet ports are set as slave ports of the rest of one
of the LAN ports. For example, if ether2. ether3, ether4 and ether5 are intended
as LAN ports, set on ether3 to ether5 attribute Master Port to ether2.
In case this operation fails - means that Ethernet interface is used as port in
bridge, you have to remove them from bridge to enable hardware packet
switching between Ethernet ports. To do this, go to Bridge -> Ports and remove
slave ports (in example, ether3 to ether5) from the tab.
Note: If master port is present as bridge port, that is fine, intended configuration
requires it there, same applies to wireless interface (wlan)
Security profile
To edit or create new security profile head to 'Wireless -> tab 'Security Prodiles'
and choose one of two options:
WPA Pre- shared key and WPA2 Pre- shared key should be entered with
sufficient length. If key length is too short field label will indicate that by turning
red, when sufficient length is reached it will turn
blue.
Wireless settings
WiFI devices usually are designed with 2.4GHz modes in mind, setting band to
2GHz-b/g/n will enable clients with 802.11b, 802.11g and 802.11n to connect to
the access point
Adjust channel width to enable faster data rates for 802.11n clients. In example
channel 6 is used, as result, 20/40MHz HT Above or 20/40 MHz HT Below can be
used. Choose either of them.
Set SSID - the name of the access point. It will be visible when you scan for
networks using your WiFi
equipment.
When settings are set accordingly it is time to enable our protected wireless
access-
point
Open Bridge menu and check if there are any bridge interface available first
mark. If there is not, select Add New marked with second mark and in the screen
that opens just accept the default settings and create interface. When bridge
interface is availbe continue to Ports tab where master LAN interface and WiFI
interface have to be added.
First marked area is where interfaces that are added as ports to bridge interface
are visible. If there are no ports added, choose Add New to add new ports to
created bridge interfaces.
When new bridge port is added, select that it is enabled (part of active
configuration), select correct bridge interface, following this guide - there should
be only 1 interface. And select correct port - LAN interface master port and WiFi
port
General
Check IP address
Adding IP address with wrong network mask will result in wrong network
setting. To correct that problem it is required to change address field, first
section, with correct address and network mask and network field with correct
network, or unset it, so it is going to be recalculated again
Change password for current user
To change password of the current user, safe place to go is System -> Password
Where all the fields has to be filled. There is other place where this can be done
in case you have full privileges on the router.
Change password for existing user
If you have full privileges on the router, it is possible to change password for any
user without knowledge of current one. That can be done under System ->
Users menu.
Steps are:
Select user;
type in password and re-type it to know it is one you intend to set
No access to the Internet or ISP network
If you have followed this guide to the letter but even then you can only
communicate with your local hosts only and every attempt to connect to Internet
fails, there are certain things to check:
Respectively, there are several ways how to solve the issue, one - check
configuration if you are not missing any part of configuration, second - set MAC
address. Change of mac address is available only from CLI - New Terminal from
the left side menu. If new window is not opening check your browser if it is
allowing to open popup windows for this place. There you will have to write
following command by replacing MAC address to correct one:
Or contact your ISP for details and inform that you have changed device.
Checking link
There are certain things that are required for Ethernet link to work:
Link activity lights are on when Ethernet wire is plugged into the port
Correct IP address is set on the interface
Correct route is set on the router
It is located here: Tool -> Ping menu. Fill in Ping To field and press start to
initiate sending of ICMP packets.
Wireless
Wireless unnamed features in the guide that are good to know about.
Configuration adjustments.
Channel frequencies and width
It is possible to choose different frequency, here are frequencies that can be used
and channel width settings to use 40MHz HT channel (for 802.11n). For
example, using channel 1 or 2412MHz frequency setting 20/40MHz HT
below will not yield any results, since there are no 20MHz channels available
below set frequency.
Warning: You should check how many and what frequencies you have in your
regulatory domain before. If there are 10 or 11 channels adjust settings
accordingly. With only 10 channels, channel #10 will have no sense of
setting 20/40MHz HT above since no full 20MHz channel is available
If wireless is not performing very well even when data rates are reported as being
good, there might be that your neighbours are using same wireless channel as you
are. To make sure follow these steps:
Note: Advanced mode is toggle button that changes from Simple to Advanced
mode and back.
Port forwarding
A lot of users prefer to configure these rules statically, to have more control over
what service is reachable from outside and what is not. This also has to be used
when service you are using does not support dynamic configuration.
Following rule will forward all connections to port 22 on the router external ip
address to port 86 on your local host with set IP address:
if you require other services to be accessible you can change protocol as required,
but usually services are running TCP and dst-port. If change of port is not
required, eg. remote service is 22 and local is also 22, then to-ports can be left
unset.
Comparable command line command:
Note: Screenshot contain only minimal set of settings are left visible
Dynamic configuration
uPnP is used to enable dynamic port forwarding configuration where service you
are running can request router using uPnP to forward some ports for it.
Warning: Services you are not aware of can request port forwarding. That can
compromise security of your local network, your host running the service and your
data
Using IP -> Web Proxy it is possible to limit access to unwanted web pages. This
requires some understanding of use of WebFig interface.
Set up Web Proxy for page filtering
From IP -> Web Proxy menu Access tab open Web Proxy Settings and make sure
that these attributes are set follows:
This list will contain all the rules that are required to limit access to sites on the
Internet.
To add sample rule to deny access to any host that contain example.com do the
following when adding new entry:
With this rule any host that has example.com will be unaccessible.
Limitation strategies
For approach A each site that has to be denied is added with Action set to Deny
For approach B each site that has to be allowed should be added with Action set
to Allow and in the end is rule, that matches everything with Action set to Deny.
Manual:Console login process
From MikroTik Wiki
Contents
1 Description
2 Console login options
3 Different information shown by login process
3.1 Banner
3.2 License
3.3 Demo version upgrade reminder
3.4 Software key information
4 Different information shown by console process after logging in
4.1 System Note
4.2 Critical log messages
5 Prompt
6 FAQ
Description
There are different ways to log into console:
serial port
console (screen and keyboard)
telnet
ssh
mac-telnet
winbox terminal
Input and validation of user name and password is done by login process. Login
process can also show different informative screens (license, demo version
upgrade reminder, software key information, default configuration).
At the end of successful login sequence login process prints banner and hands
over control to the console process.
Console process displays system note, last critical log entries, auto-detects terminal
size and capabilities and then displays command prompt]. After that you can start
writing commands.
Use up arrow to recall previous commands from command history, TAB key to
automatically complete words in the command you are typing, ENTER key to
execute command, and Control-C to interrupt currently running command and
return to prompt.
Easiest way to log out of console is to press Control-D at the command prompt
while command line is empty (You can cancel current command and get an
empty line with Control-C, so Control-C followed by Control-D will log you out
in most cases).
Additional login parameters can be appended to login name after '+' sign.
If parameter is not present, then default value is used. If number is not present
then implicit value of parameter is used.
example: admin+c80w - will disable console colors and set terminal width to 80.
Param Default Implicit
"w" auto auto Set terminal width
"h" auto auto Set terminal height
"c" on off disable/enable console colors
"t" on off Do auto detection of terminal capabilities
"e" on off Enables "dumb" terminal mode
Different information shown by login process
Banner
Login process will display MikroTik banner after validating user name and
password.
Actual banner can be different from the one shown here if it is replaced by
distributor. See also: branding.
License
After logging in for the first time after installation you are asked to read software
licenses.
Answer y to read licenses, n if you do not wish to read licenses (question will not
be shown again). Pressing SPACE will skip this step and the same question will
be asked after next login.
After logging into router that has demo key, following remonder is shown:
If router does not have software key, it is running in the time limited trial mode.
After logging in following information is shown:
After entering valid software key, following information is shown after login:
-------------------------------------------------------------------------------
You can type "v" to see the exact commands that are used to add and remove
this default configuration, or you can view them later with
'/system default-configuration print' command.
To remove this default configuration type "r" or hit any other key to continue.
If you are connected using the above IP and you remove it, you will be disconnected.
Applying and removing of the default configuration is done using console script
(you can press 'v' to review it).
It is possible to always display some fixed text message after logging into console.
Critical log messages
Console will display last critical error messages that this user has not seen yet.
See log for more details on configuration. During console session these messages
are printed on screen.
dec/10/2007 10:40:06 system,error,critical login failure for user root from 10.0.0.1 via
telnet
dec/10/2007 10:40:07 system,error,critical login failure for user root from 10.0.0.1 via
telnet
dec/10/2007 10:40:09 system,error,critical login failure for user test from 10.0.0.1 via
telnet
Prompt
[admin@MikroTik] /interface> - Default command prompt, shows user
name, system identity, and current command path.
[admin@MikroTik] /interface<SAFE> - Prompt indicates that console
session is in Safe Mode.
[admin@MikroTik] >> - Prompt indicates that HotLock is turned on.
{(\... - While entering multiple line command continuation prompt
shows open parentheses.
line 2 of 3> - While editing multiple line command prompt shows
current line number and line count.
address: - Command requests additional input. Prompt shows name of
requested value.
Console can show different prompts depending on enabled modes and data that is
being edited. Default command prompt looks like this:
[admin@MikroTik] /interface>
Default command prompt shows name of user, '@' sign and system name in
brackets, followed by space, followed by current command path (if it is not '/'),
followed by '>' and space. When console is in safe mode, it shows word SAFE in
the command prompt.
[admin@MikroTik] /interface<SAFE>
Hotlock mode is indicated by an additional yellow '>' character at the end of the
prompt.
[admin@MikroTik] >>
It is possible to write commands that consist of multiple lines. When entered line
is not a complete command and more input is expected, console shows
continuation prompt that lists all open parentheses, braces, brackets and quotes,
and also trailing backslash if previous line ended with backslash-whitespace.
[admin@MikroTik] > {
{... :put (\
{(\... 1+2)}
3
When you are editing such multiple line entry, prompt shows number of current
line and total line count instead of usual username and system name.
Sometimes commands ask for additional input from user. For example, command
'/password' asks for old and new passwords. In such cases prompt shows name of
requested value, followed by colon and space.
FAQ
Q: How do I turn off colors in console?
A: Add '+c' after login name.
Contents
1 Troubleshooting tools
1.1 Check network connectivity
1.1.1 Using the ping command
1.1.2 Using the traceroute command
1.2 Log Files
1.3 Torch (/tool torch)
1.3.1 IPv6
1.3.2 Winbox
1.4 Packet Sniffer (/tool sniffer)
1.5 Bandwidth test
1.6 Profiler
Troubleshooting tools
Before, we look at the most significant commands for connectivity checking and
troubleshooting, here is little reminder on how to check host computer's network
interface parameters on .
The Microsoft windows have a whole set of helpful command line tools that
helps testing and configuring LAN/WAN interfaces. We will look only at
commonly used Windows networking tools and commands.
All of the tools are being ran from windows terminal. Go to Start/Run and enter
"cmd" to open a Command window.
ipconfig – used to display the TCP/IP network configuration values. To open it,
enter "ipconfig" in the command prompt.
C:\>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : mshome.net
Link-local IPv6 Address . . . . . : fe80::58ad:cd3f:f3df:bf18%8
IPv4 Address. . . . . . . . . . . : 173.16.16.243
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 173.16.16.1
There are also a variety of additional functions for ipconfig. To obtain a list of
additional options, enter "ipconfig /?" or “ipconfig -?”.
netstat – displays the active TCP connections and ports on which the computer is
listening, Ethernet statistics, the IP routing table, statistics for the IP, ICMP, TCP,
and UDP protocols. It comes with a number of options for displaying a variety of
properties of the network and TCP connections “netstat –?”.
Very similar commands are available also on unix-like machines. Today in most
of Linux distributions network settings can be managed via GUI, but it is always
good to be familiar with the command-line tools. Here is the list of basic
networking commands and tools on Linux:
iwconfig - iwconfig tool is like ifconfig and ethtool for wireless cards. That also
view and set the basic Wi-Fi network details.
nslookup – give a host name and the command will return IP address.
ip route add {NETWORK address} via {next hop address} dev {DEVICE}, for
example:
mentioned tools are only small part of networking tools that is available on
Linux. Remember if you want full details on the tools and commands options
use man command. For example, if you want to know all options
on ifconfig write command man ifconfig in terminal.
Ping is one of the most commonly used and known commands. Administration
utility used to test whether a particular host is reachable across an Internet
Protocol (IP) network and to measure the round-trip time for packets sent from
the local host to a destination host, including the local host's own interfaces.
Ping uses Internet Control Message Protocol (ICMP) protocol for echo response
and echo request. Ping sends ICMP echo request packets to the target host and
waits for an ICMP response. Ping output displays the minimum, average and
maximum times used for a ping packet to find a specified system and return.
From PC:
Windows:
C:\>ping 10.255.255.4
Pinging 10.255.255.4 with 32 bytes of data:
Reply from 10.255.255.4: bytes=32 time=1ms TTL=61
Reply from 10.255.255.4: bytes=32 time<1ms TTL=61
Reply from 10.255.255.4: bytes=32 time<1ms TTL=61
Reply from 10.255.255.4: bytes=32 time<1ms TTL=61
Ping statistics for 10.255.255.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0%
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
Unix-like:
From MikroTik:
Traceroute displays the list of the routers that packet travels through to get to a
remote host. The traceroute or tracepath tool is available on practically all
Unix-like operating systems and tracert on Microsoft Windows operating
systems.
Using this command you can see how packets travel through the network and
where it may fail or slow down. Using this information you can determine the
computer, router, switch or other network device that possibly causing network
issues or failures.
Windows:
C:\>tracert 10.255.255.2
Tracing route to 10.255.255.2 over a maximum of 30 hops
1 <1 ms <1 ms <1 ms 10.13.13.1
2 1 ms 1 ms 1 ms 10.255.255.2
Trace complete.
Unix-like:
Traceroute and tracepath is similar, only tracepath does not not require superuser
privileges.
From MikroTik:
All messages stored in routers local memory can be printed from /log menu.
Each entry contains time and date when event occurred, topics that this message
belongs to and message itself.
You can monitor traffic classified by protocol name, source address, destination
address, port. Torch shows the protocols you have chosen and tx/rx data rate for
each of them.
Example:
The following example monitor the traffic generated by the telnet protocol,
which passes through the interface ether1.
[admin@MikroTik] tool>
[admin@MikroTik] tool>
PRO.. SRC-ADDRESS TX RX
tcp 10.0.0.144 1.01kbps 608bps
icmp 10.0.0.144 480bps 480bps
[admin@MikroTik] tool>
IPv6
Starting from v5RC6 torch is capable of showing IPv6 traffic. Two new
parameters are introduced src-address6 and dst-address6. Example:
Winbox
Here you can specify different packet sniffer parameters, like maximum amount
of used memory, file size limit in KBs.
There are three commands that are used to control runtime operation of the
packet sniffer:
The start command is used to start/reset sniffing, stop - stops sniffing. To save
currently sniffed packets in a specific file save command is used.
In the following example the packet sniffer will be started and after some time -
stopped:
[admin@MikroTik] tool sniffer> start
[admin@MikroTik] tool sniffer> stop
Below the sniffed packets will be saved in the file named test:
[admin@MikroTik] tool sniffer> save file-name=test
There are also available different submenus for viewing sniffed packets.
/tool sniffer protocol – show all kind of protocols that have been sniffed
/tool sniffer host – shows the list of hosts that were participating in data
exchange you've sniffed
For example:
Bandwidth test
The Bandwidth Tester can be used to measure the throughput (Mbps) to another
MikroTik router (either wired or wireless network) and thereby help to discover
network "bottlenecks"- network point with lowest throughput.
TCP – uses the standard TCP protocol operation principles with all main
components like connection initialization, packets
acknowledgments, congestion window mechanism and all other features of
TCP algorithm. Please review the TCP protocol for details on its internal
speed settings and how to analyze its behavior. Statistics for throughput
are calculated using the entire size of the TCP data stream. As
acknowledgments are an internal working of TCP, their size and usage of
the link are not included in the throughput statistics. Therefore statistics
are not as reliable as the UDP statistics when estimating throughput.
Remember that Bandwidth Test uses all available bandwidth (by default) and
may impact network usability.
If you want to test real throughput of a router, you should run bandwidth test
through the router not from or to it. To do this you need at least 3 routers
connected in chain:
Note: If you use UDP protocol then Bandwidth Test counts IP header+UDP header+UDP
data. In case if you use TCP then Bandwidth Test counts only TCP data (TCP header and
IP header are not included).
Configuration example:
Server
Client
Run UDP bandwidth test in both directions, user name and password depends on
remote Bandwidth Server. In this case user name is ‘admin’ without any
password.
More information and all commands description can be found in the manual>>
Profiler
Profiler is a tool that shows CPU usage for each process running on RouterOS. It
helps to identify which process is using most of the CPU resources.
Manual:Tools/Profiler
From MikroTik Wiki
< Manual:Tools
Contents
1 Summary
1.1 CPU usage on multi-core systems
2 Classifiers
Summary
Command: /tool profile
Standards:
Profiler tool shows CPU usage for each process running in RouterOS. It helps to
identify which process is using most of the CPU resources.
On multi-core systems tool allows to specify per core CPU usage. For example,
to view CPU usage on second core use following command:
"cpu" parameter allows to specify integer number which represents a core or two
of predefined values all and total
'The support file is used for debugging MikroTik RouterOS and to solve the
support questions faster. All MikroTik Router information is saved in a binary
file, which is stored on the router and can be downloaded from the router using
ftp.'
You can view the contents of this file in your Mikrotik account, simply to to the
Supout.rif section and upload the file.
This file contains all your routers configuration, logs and some other details that
will help the MikroTik Support to solve your issue.
/system sup-output
Contents
1 RouterOS features
1.1 Hardware Support
1.2 Installation
1.3 Configuration
1.4 Backup/Restore
1.5 Firewall
1.6 Routing
1.7 MPLS
1.8 VPN
1.9 Wireless
1.10 DHCP
1.11 Hotspot
1.12 QoS
1.13 Proxy
1.14 Tools
1.15 Other features
RouterOS features
RouterOS is MikroTik's stand-alone operating system based on linux v3.3.5
kernel. The following list shows features found in the latest RouterOS release:
Hardware Support
Configuration
Backup/Restore
Firewall
Statefull filtering
Source and destination NAT
NAT helpers (h323, pptp, quake3, sip, ftp, irc, tftp)
Internal connection, routing and packet marks
Filtering by IP address and address range, port and port range, IP protocol,
DSCP and many more
Address lists
Custom Layer7 matcher
IPv6 support
PCC - per connection classifier, used in load balancing configurations
Routing
Static routing
Virtual Routing and Forwarding (VRF)
Policy based routing
Interface routing
ECMP routing
IPv4 dynamic routing protocols: RIP v1/v2, OSPFv2, BGP v4
IPv6 dynamic routing protocols: RIPng, OSPFv3, BGP
Bidirectional Forwarding Detection ( BFD)
MPLS
VPN
Wireless
DHCP
Hotspot
QoS
Hierarchical Token Bucket ( HTB) QoS system with CIR, MIR, burst and
priority support
Simple and fast solution for basic QoS implementation - Simple queues
Dynamic client rate equalization ( PCQ)
Proxy
Tools
Ping, traceroute
Bandwidth test, ping flood
Packet sniffer, torch
Telnet, ssh
E-mail and SMS send tools
Automated script execution tools
CALEA
File Fetch tool
Advanced traffic generator
Other features
Samba support
OpenFlow support
Bridging – spanning tree protocol (STP, RSTP), bridge firewall and MAC
natting.
Dynamic DNS update tool
NTP client/server and synchronization with GPS system
VRRP v2 and v3 support
SNMP
M3P - MikroTik Packet packer protocol for wireless links and ethernet
MNDP - MikroTik neighbor discovery protocol, supports CDP (Cisco
discovery protocol)
RADIUS authentication and accounting
TFTP server
Synchronous interface support (Farsync cards only) (Removed in v5.x)
Asynchronous – serial PPP dial-in/dial-out, dial on demand
ISDN – dial-in/dial-out, 128K bundle support, Cisco HDLC, x75i, x75ui,
x75bui line protocols, dial on demand
Manual:RouterOS FAQ
From MikroTik Wiki
Contents
1 What is MikroTik RouterOS™?
2 Installation
3 Logging on and Passwords
4 Licensing Issues
5 Upgrading
6 Downgrading
7 TCP/IP Related Questions
8 Bandwidth Management Related Questions
9 Wireless Questions
10 BGP Questions
Installation
How can I install RouterOS?
RouterOS can be installed with CD Install or Netinstall.
How large HDD can I use for the MikroTik RouterOS™?
MikroTik RouterOS™ supports disks larger than 8GB (usually up to
120GB). But make sure the BIOS of the router's motherboard is able to
support these large disks.
Can I run MikroTik RouterOS™ from any hard drive in my system?
Yes
Is there support for multiple hard drives in MikroTik RouterOS™?
A secondary drive is supported for web cache. This support has been
added in 2.8, older versions don't support multiple hard drives.
Why the CD installation stops at some point and does not go "all the way
through"?
The CD installation is not working properly on some motherboards. Try to
reboot the computer and start the installation again. If it does not help, try
using different hardware.
Logging on and Passwords
What is the username and password when logging on to the router for the
first time?
Username is 'admin', and there is no password (hit the 'Enter' key). You
can change the password using the '/password' command.
How can I recover a lost password?
If you have forgotten the password, there is no recovery for it. You have
to reinstall the router.
After power failure the MikroTik router is not starting up again
If you haven't shut the router down, the file system has not been
unmounted properly. When starting up, the RouterOS™ will perform a file
system check. Depending on the HDD size, it may take several minutes to
complete. Do not interrupt the file system check! It would make your
installation unusable.
How can I access the router if the LAN interface has been disabled?
You can access the router either locally (using monitor and keyboard) or
through the serial console.
Licensing Issues
How many MikroTik RouterOS™ installations does one license cover?
The license is per RouterOS installation. Each installed router needs a
separate license.
Does the license expire?
The license never expires. The router runs for ever. Your only limitation is
to which versions you can upgrade. For example if it says "Upgradable to
v4.x", it means you can use all v4 releases, but not v5 This doesn't mean
you can't stay on v4.x as long as you want.
How can I reinstall the MikroTik RouterOS™ software without losing my
software license?
You have to use CD, Floppies or Netinstall procedure and install the
MikroTik RouterOS™ on the HDD with the previous MikroTik
RouterOS™ installation still intact. The license is kept with the HDD. Do
not use format or partitioning utilities, they will delete your key! Use the
same (initial) BIOS settings for your HDD!
Can I use my MikroTik RouterOS™ software license on a different
hardware?
Yes, you can use different hardware (motherboard, NICs), but you should
use the same HDD. The license is kept with the HDD unless format or
fdisk utilities are used. It is not required to reinstall the system when
moving to different hardware. When paying for the license, please be
aware, that it cannot be used on another harddrive than the one it was
installed upon.
License transfer to another hard drive costs 10$. Contact support to
arrange this.
What to do, if my hard drive with MikroTik RouterOS™ crashes, and I
have to install another one?
If you have paid for the license, you have to write to
support[at]mikrotik.com and describe the situation. We may request you to
send the broken hard drive to us as proof prior to issuing a replacement
key.
What happens if my hardware breaks again, and I lose my replacement
key?
The same process is used as above, but this time, we need physical proof
that there is in fact been another incident.
If you have a free demo license, no replacement key can be issued. Please
obtain another demo license, or purchase the base license.
More information available here All_about_licenses
How can I enter a new Software Key?
Entering the key from Console/FTP:
import the attached file with the command '/system license import' (you
should upload this file to the router's FTP server)
use copy/paste to enter the key into a Telnet window (no matter
which submenu). Be sure to copy the whole key, including the lines
"--BEGIN MIKROTIK SOFTWARE KEY--" and "--END
MIKROTIK SOFTWARE KEY--"
use 'system -> license' menu in Winbox to Paste or Import the key
I have mis-typed the software ID when I purchased the Software Key. How
can I fix this?
In the Account Server choose `work with keys`, then select your mis-typed
key, and then choose `fix key`.
About entering keys, see more on this page
Entering a RouterOS License key
All other information about License Keys can be found here
All_about_licenses
Upgrading
How can I install additional feature packages?
You have to use the same version package files (extension .npk) as the
system package. Use the /system package print command to see the list
of installed packages. Check the free space on router's HDD using
the /system resource print command before uploading the package files.
Make sure you have at least 2MB free disk space on the router after you
have uploaded the package files!
Upload the package files using the ftp BINARY mode to the router and
issue /system reboot command to shut down the router and reboot. The
packages are installed (upgraded) while the router is going for shutdown.
You can monitor the installation process on the monitor screen connected
to the router. After reboot, the installed packages are listed in the /system
package print list.
How can I upgrade?
To upgrade the software, you will need to download the latest package
files (*.npk) from our website (the 'system' package plus the ones that you
need). Then, connect to the router via FTP and upload the new packages to
it by using Binary transfer mode.
Then reboot the router by issuing /system reboot command. More
information here: Upgrading_RouterOS
I installed additional feature package, but the relevant interface does not
show up under the /interface print list.
You have to obtain (purchase) the required license level or install the NPK
package for this interface (for example package 'wireless').
If I do upgrade RouterOS, will I lose my configuration?
No, configuration is kept intact for upgrades within one version family.
When upgrading version families (for example, V2.5 to V2.6) you may
lose the configuration of some features that have major changes. For
example when upgrading from V2.4, you should upgrade to the last
version of 2.4 first.
How much free disk space do I need when upgrading to higher version?
You need space for the system package and the additional packages you
have to upgrade. After uploading the newer version packages to the router
you should have at least 2MB free disk space left. If not, do not try to
make the upgrade! Uninstall the unnecessary packages first, and then
upgrade the remaining ones.
Downgrading
How can I downgrade the MikroTik RouterOS™ installation to an older
version?
You can downgrade by reinstalling the RouterOS™ from any media. The
software license will be kept with the HDD as long as the disk is not
repartitioned/reformatted. The configuration of the router will be lost (it is
possible to save the old configuration, but this option has unpredictable
results when downgrading and it is not recommended to use it).
Another way is to use the /system package downgrade command. This
works only if you downgrade to 2.7.20 and not lower. Upload the older
packages to the router via FTP and then use the /system package
downgrade command.
How can I change the TCP port number for telnet or http services, if I do
not want to use the ports 23 and 80, respectively?
You can change the allocated ports under /ip service.
When I use the IP address/mask in the form 10.1.1.17/24 for my filtering or
queuing rules, they do not work.
The rules 'do not work', since they do not match the packets due to the
incorrectly specified address/mask. The correct form would be:
10.1.1.0/24 for the IP addresses in the range 10.1.1.0-10.1.1.255, or,
10.1.1.17/32 for just one IP address 10.1.1.17.
Wireless Questions
Can I bridge wlan interface operating in the station mode?
No, you cannot.
See more >>
BGP Questions
See BGP FAQ and HowTo
Manual:Connection oriented
communication (TCP/IP)
From MikroTik Wiki
Contents
1 Connection oriented communication (TCP/IP)
1.1 TCP session establishment and termination
1.1.1 Connection establishment process
1.1.2 Connection termination
1.2 Segments transmission (windowing)
1.3 Ethernet networking
1.3.1 CSMA/CD
1.3.2 Half and Full duplex Ethernet
1.4 Simple network communication example
1.4.1 ARP protocol operation
Connection termination
When the data transmission is complete and the host wants to terminate the
connection, termination process is initiated. Unlike TCP Connection
establishment, which uses three-way handshake, connection termination uses
four-way massages. Connection is terminated when both sides have finished the
shut down procedure by sending a FIN and receiving an ACK.
Let’s think about what happens when datagrams are sent out faster than receiving
device can process. Receiver stores them in memory called a buffer. But since
buffer space are not unlimited, when its capacity is exceeded receiver starts to
drop the frames. All dropped frames must be retransmitted again which is the
reason for low transmission performance.
To address this problem, TCP uses flow control protocol. window mechanism is
used to control the flow of the data. When connection is established, receiver
specifies window field (see, TCP header format, Figure 1.6.) in each TCP frame.
Window size represents the amount of received data that receiver is willing to
store in the buffer. window size (in bytes) is send together with
acknowledgements to the sender. So the size of window controls how much
information can be transmitted from one host to another without receiving an
acknowledgment. Sender will send only amount of bites specified in window size
and then will wait for acknowledgments with updated window size.
If the receiving application can process data as quickly as it arrives from the
sender, then the receiver will send a positive window advertisement (increase the
windows size) with each acknowledgement. It works until sender becomes faster
than receiver and incoming data will eventually fill the receiver's buffer, causing
the receiver to advertise acknowledgment with a zero window. A sender that
receives a zero window advertisement must stop transmit until it receives a
positive window. Windowing process is illustrated in Figure 2.2.
The host A starts transmit with window size of 1000, one 1000byte frame is
transmitted. Receiver (host B) returns ACK with window size to increase to
2000. The host A receives ACK and transmits two frames (1000 bytes each).
After that receiver advertises an initial window size to 2500. Now sender
transmits three frames (two containing 1,000 bytes and one containing 500 bytes)
and waits for an acknowledgement. The first three segments fill the receiver's
buffer faster than the receiving application can process the data, so the advertised
window size reaches zero indicating that it is necessary to wait before further
transmission is possible.
The size of the window and how fast to increase or decrease the window size is
available in various TCP congestion avoidance algorithms such as Reno, Vegas,
Tahoe etc.
Ethernet networking
CSMA/CD
Ethernet network uses Carrier Sense Multiple Access with Collision detection
(CSMA/CD) protocol for data transmission. That helps to control and manage
access to shared bandwidth when two or more devices want to transmit data at
the same time. CSMA/CD is a modification of Carrier Sense Multiple Access.
Carrier Sense Multiple Access with Collision Detection is used to improve
CSMA performance by terminating transmission as soon as collision is detected,
reducing the probability of a second collision on retry.
Multiple Access – means that multiple stations send and receive on the one
medium.
When the sender is ready to send data, it checks continuously if the medium is
busy. If the medium becomes idle the sender transmits a frame.
Look at the Figure 2.4 bellow where simple example of CSMA/CD is explained.
1. Any host on the segment that wants to send data “listens” what is
happening on the physical medium(wire) an is checking whether someone
else is not sending data already.
2. Host A and host C on shared network segment sees that nobody else is
sending and tries to send frames.
3. Host A and Host C are listening at the same time so both of them will
transmit at the same time and collision will occur. Collision results in what
we refer to as "noise" - a change in the voltage of the signals in the line
(wire).
4. Host A and Host B detect this collision and send out “jam” signal to tell
other hosts not to send data at this time. Both Host A and Host C need to
retransmit this data, but we don't want them to send frames simultaneously
once again. To avoid this, host A and host B will start a random timer
(ms) before attempting to start CSMA/CD process again by listening to the
wire.
Ethernet standards such as Ethernet II and Ethernet 802.3 are passed through
formal IEEE (Institute of Electrical and Electronics Engineers) standardization
process. The difference is that Ethernet II header includes Protocol type field
whereas in Ethernet 802.3 this field was changed to length field. Ethernet is the
standard CSMA/CD access method. Ethernet supports different data transfer
rates Ethernet (10BaseT) – 10 Mbps, Fast Ethernet (100Base-TX) – 100 Mbps
Gigabit Ethernet (1000Base-T) – 1000 Mbps through different types of physical
mediums (twisted pairs (Copper), coaxial cable, optical fiber). Today Ethernet
cables consist of four twisted pairs (8 wires). For example, 10Base-T uses only
one of these wire pairs for running in both directions using half-duplex mode.
For windows and Unix like machines: arp – a displays the list of IP addresses
with its corresponding MAC addresses
ip arp print – same command as arp – a but display the ARP table on a
MikroTik Router.