Serial Console and Terminal

Document revision:2.1 (Wed Mar 03 16:12:49 GMT 2004)
Applies to: V2.9

General Information


The Serial Console and Terminal are tools, used to communicate with devices and other systems that are interconnected via serial port. The serial terminal may be used to monitor and configure many devices - including modems, network devices (including MikroTik routers), and any device that can be connected to a serial (asynchronous) port.


Packages required: system
License required: Level1
Submenu level: /system, /system console, /system serial-terminal
Standards and Technologies: RS-232
Hardware usage: Not significant

Related Documents


The Serial Console (managed side) feature allows configuring one serial port of the MikroTik router for access to the router's Terminal Console over the serial port. A special null-modem cable is required to connect the router's serial port with the workstation's or laptop's serial (COM) port. A terminal emulation program, e.g., HyperTerminal, should be run on the workstation. You can also use MikroTik RouterOS to connect to an another Serial Console (for example, on a Cisco router).

Several customers have described situations where the Serial Terminal (managing side) feature would be useful:

With the serial-terminal feature of the MikroTik, up to 132 (and, maybe, even more) devices can be monitored and controlled

Serial Console Configuration


A special null-modem cable should be used for connecting to the serial console. The Serial Console cabling diagram for DB9 connectors is as follows:

Router Side (DB9f) Signal Direction Side (DB9f)
1, 6 CD, DSR IN 4
2 RxD IN 3
3 TxD OUT 2
4 DTR OUT 1, 6
5 GND - 5
8 CTS IN 7

Configuring Console

Submenu level: /system console

Property Description

enabled (yes | no; default: no) - whether serial console is enabled or not

free (read-only: text) - console is ready for use

port (name; default: serial0) - which port should the serial terminal listen to

term (text) - name for the terminal

used (read-only: text) - console is in use

vcno (read-only: integer) - number of virtual console - [Alt]+[F1] represents '1', [Alt]+[F2] - '2', etc.

wedged (read-only: text) - console is currently not available


To enable Serial Console with terminal name MyConsole:

[admin@MikroTik] system console> set 0 disabled=no term=MyConsole
[admin@MikroTik] system console> print
Flags: X - disabled, W - wedged, U - used, F - free
 #   PORT    VCNO       TERM
 0 F serial0            MyConsole
 1 W          1          linux
 2 W          2          linux
 3 W          3          linux
 4 W          4          linux
 5 W          5          linux
 6 W          6          linux
 7 W          7          linux
 8 W          8          linux
[admin@MikroTik] system console>

To check if the port is available or used (parameter used-by):

[admin@MikroTik] system serial-console> /port print detail
  0 name=serial0 used-by=Serial Console baud-rate=9600 data-bits=8 parity=none
    stop-bits=1 flow-control=none

  1 name=serial1 used-by="" baud-rate=9600 data-bits=8 parity=none stop-bits=1

[admin@MikroTik] system serial-console>

Using Serial Terminal

Command name: /system serial-terminal


The command is used to communicate with devices and other systems that are connected to router via serial port.

All keyboard input is forwarded to the serial port and all data from the port is output to the connected device. After exiting with [Ctrl]+[Q], the control signals of the port are lowered. The speed and other parameters of serial port may be configured in the /port directory of router console. No terminal translation on printed data is performed. It is possible to get the terminal in an unusable state by outputting sequences of inappropriate control characters or random data. Do not connect to devices at an incorrect speed and avoid dumping binary data.

Property Description

port (name) - port name to use


[Ctrl]+[Q] and [Ctrl]+[X] have special meaning and are used to provide a possibility of exiting from nested serial-terminal sessions:

To send [Ctrl]+[X] to to serial port, press [Ctrl]+[X] [Ctrl]+[X]

To send [Ctrl]+[Q] to to serial port, press [Ctrl]+[X] [Ctrl]+[Q]


To connect to a device connected to the serial1 port:

[admin@MikroTik] system> serial-terminal serial1

[Type Ctrl-Q to return to console]
[Ctrl-X is the prefix key]

Console Screen

Submenu level: /system console screen


This facility is created to change line number per screen if you have a monitor connected to router.

Property Description

line-count (25 | 40 | 50) - number of lines on monitor


This parameter is applied only to a monitor, connected to the router.


To set monitor's resolution from 80x25 to 80x40:

[admin@MikroTik] system console screen> set line-count=40
[admin@MikroTik] system console screen> print
    line-count: 40
[admin@MikroTik] system console screen>