Manual:Port: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
Created page with "{{Versions|v5+}} __TOC__ ===Summary=== There are many ways how to use ports on the routers. Most obvious one is to use serial port for initial RouterOS configuration after i..."
 
 
(3 intermediate revisions by 2 users not shown)
Line 30: Line 30:


{{ Note | List of the ports are maintained automatically by the RouterOS.}}
{{ Note | List of the ports are maintained automatically by the RouterOS.}}


'''Properties'''
'''Properties'''
Line 42: Line 41:
|type=integer {{!}} auto
|type=integer {{!}} auto
|default=auto
|default=auto
|desc=Baud rate used by the port. If set to '''auto''', then RouterOS tries to detect baud rate automatically.
|desc=Baud rate (speed) used by the port. If set to '''auto''', then RouterOS tries to detect baud rate automatically.
}}
}}


Line 49: Line 48:
|type=7 {{!}} 8
|type=7 {{!}} 8
|default=
|default=
|desc=
|desc=The number of data bits in each character.
* '''7''' - true ASCII
* '''8''' - any data (matches the size of a byte)
}}
}}


Line 56: Line 57:
|type=on {{!}} off
|type=on {{!}} off
|default=
|default=
|desc=
|desc=Whether to enable RS-232 DTR signal circuit used by flow control.
}}
}}


Line 63: Line 64:
|type=hardware {{!}} none {{!}} xon-xoff
|type=hardware {{!}} none {{!}} xon-xoff
|default=
|default=
|desc=
|desc=method of flow control to pause and resume the transmission of data.
}}
}}


Line 70: Line 71:
|type=string
|type=string
|default=
|default=
|desc=
|desc=Name of the port.
}}
}}


Line 77: Line 78:
|type= even {{!}} none {{!}} odd
|type= even {{!}} none {{!}} odd
|default=
|default=
|desc=
|desc=Error detection method. If enabled, extra bit is sent to detect the communication errors. In most cases parity is set to '''none''' and errors are handled by the communication protocol.
}}
}}


Line 84: Line 85:
|type=on {{!}} off
|type=on {{!}} off
|default=
|default=
|desc=
|desc=Whether to enable RS-232 RTS signal circuit used by flow control.
}}
}}


Line 91: Line 92:
|type=1 {{!}} 2
|type=1 {{!}} 2
|default=
|default=
|desc=
|desc=Stop bits sent after each character. Electronic devices usually uses 1 stop bit.
}}
}}


Line 124: Line 125:
|desc=Shows what is using current port. For example, by default '''Serial0''' is used by serial-console.
|desc=Shows what is using current port. For example, by default '''Serial0''' is used by serial-console.
}}
}}


===Firmware===
===Firmware===
Line 187: Line 187:
|type=string
|type=string
|default=""
|default=""
|desc=
|desc=Name of the file, where communication will be logged. By default logging is disabled.
}}
}}


Line 248: Line 248:
|desc=IP address of remote location that is currently connected.
|desc=IP address of remote location that is currently connected.
}}
}}


===See More===
===See More===

Latest revision as of 07:05, 26 September 2013

Applies to RouterOS: v5+


Summary

There are many ways how to use ports on the routers. Most obvious one is to use serial port for initial RouterOS configuration after installation(by default serial0 is used by serial-terminal).

Serial and USB ports can also be used to:

  • connect 3G modems;
  • connect to another device through a serial cable
  • access device connected to serial cable remotely.


General

Sub-menu: /port


Menu lists all available serial, usb, ... ports on the router and allows to configure port parameters, like baud-rate, flow-control, etc.

Below you can see default port configuration on RB493.

[admin@RB493G] /port> print 
Flags: I - inactive 
 #   NAME                         CHANNELS USED-BY                      BAUD-RATE
 0   serial0                             1 serial-terminal              115200 

Note: List of the ports are maintained automatically by the RouterOS.


Properties

Property Description
baud-rate (integer | auto; Default: auto) Baud rate (speed) used by the port. If set to auto, then RouterOS tries to detect baud rate automatically.
data-bits (7 | 8; Default: ) The number of data bits in each character.
  • 7 - true ASCII
  • 8 - any data (matches the size of a byte)
dtr (on | off; Default: ) Whether to enable RS-232 DTR signal circuit used by flow control.
flow-control (hardware | none | xon-xoff; Default: ) method of flow control to pause and resume the transmission of data.
name (string; Default: ) Name of the port.
parity (even | none | odd; Default: ) Error detection method. If enabled, extra bit is sent to detect the communication errors. In most cases parity is set to none and errors are handled by the communication protocol.
rts (on | off; Default: ) Whether to enable RS-232 RTS signal circuit used by flow control.
stop-bits (1 | 2; Default: ) Stop bits sent after each character. Electronic devices usually uses 1 stop bit.


Read-only properties

Property Description
channels (integer) Number of channels supported by the port.
inactive (yes | no)
line-state ()
used-by (string) Shows what is using current port. For example, by default Serial0 is used by serial-console.

Firmware

Sub-menu: /port firmware


This submenu allows to specify directory where drivers for 3g modems can be uploaded and used.


Remote Access

Sub-menu: /port remote-access


If you want to access serial device that can only talk to COM ports and is located somewhere else behind router, then you can use remote-access.

As defined in RFC 2217 RouterOS can transfer data from/to a serial device over TCP connection.

Enabling remote access on RouterOS is very easy:

/port remote-access add port=serial0 protocol=rfc2217 tcp-port=9999

Note: By default serial0 is used by serial-terminal. Without releasing the port, it cannot be used by remote-access or other services



Properties

Property Description
allowed-addresses (IP address range; Default: 0.0.0.0/0) Range of IP addresses allowed to access port remotely.
channel (integer [0..4294967295]; Default: 0) Port channel that will be used. If port has only one channel then channel number should always be 0.
disabled (yes | no; Default: no)
local-address (IP address; Default: ) IP address used as source address.
log-file (string; Default: "") Name of the file, where communication will be logged. By default logging is disabled.
port (string; Default: ) Name of the port from Port list.
protocol (raw | rfc2217; Default: rfc2217) RFC 2217 defines a protocol to transfer data from/to a serial device over TCP. If set to raw, then data is sent to serial as is.
tcp-port (integer [1..65535]; Default: 0) TCP port on which to listen for incoming connections.


Read-only properties

Property Description
active (yes | no) Whether remote access is active and ready to accept connection.
busy (yes | no) Whether port is currently busy.
inactive (yes | no)
logging-active (yes | no) Whether logging to file is currently running
remote-address (IP address) IP address of remote location that is currently connected.

See More


[ Top | Back to Content ]