/port

Serial ports

edit

Edit items
ParameterTypeDescriptionAdditional Notes
number
Type: arg_node
Item number
/td
value-name
Type: enum
const_mapping: baud-rate | data-bits | flow-control | name | parity | stop-bits
Type: enum
mapping: [{'type': 'const', 'name': 'baud-rate', 'help': 'Baud rate (bits/s)'}, {'type': 'const', 'name': 'data-bits', 'help': 'Number of bits for data'}, {'type': 'const', 'name': 'flow-control', 'help': 'Type of flow control'}, {'type': 'const', 'name': 'name', 'help': 'New port name'}, {'type': 'const', 'name': 'parity', 'help': 'Parity'}, {'type': 'const', 'name': 'stop-bits', 'help': 'Number of bits for control'}]
Name of editable property
Enum parameters:
  • baud-rate - Baud rate (bits/s)
/td

export

Print or save an export script that can be used to restore configuration
ParameterTypeDescriptionAdditional Notes
compact
Type: switch
value: True
Only exports user-changed settings without defaults
/td
file
Type: string
File name
Name of the file that will be stored in FTP access area.
/td
hide-sensitive
Type: switch
value: True
Hides sensitive information like passwords from beeing printed
/td
terse
Type: switch
value: True
Creates export with output without line wraps
/td
verbose
Type: switch
value: True
Creates output with all RouterOS settings (including the default ones)
/td

find

Find items by value
ParameterTypeDescriptionAdditional Notes
where
Type: query_arg
query: True
Generates output depending on values supplied (used mainly for scripting)
/td

get

Gets value of item's property
ParameterTypeDescriptionAdditional Notes
number
Type: arg_node
Item number
/td
value-name
Type: enum
const_mapping: baud-rate | channels | data-bits | device | flow-control | inactive | line-state | name | parity | stop-bits | used-by
Type: enum
mapping: [{'type': 'const', 'name': 'baud-rate', 'help': 'Baud rate (bits/s)'}, {'type': 'const', 'name': 'channels'}, {'type': 'const', 'name': 'data-bits', 'help': 'Number of bits for data'}, {'type': 'const', 'name': 'device'}, {'type': 'const', 'name': 'flow-control', 'help': 'Type of flow control'}, {'type': 'const', 'name': 'inactive', 'help': 'Inactive port'}, {'type': 'const', 'name': 'line-state', 'help': 'The name of signal'}, {'type': 'const', 'name': 'name', 'help': 'New port name'}, {'type': 'const', 'name': 'parity', 'help': 'Parity'}, {'type': 'const', 'name': 'stop-bits', 'help': 'Number of bits for control'}, {'type': 'const', 'name': 'used-by', 'help': 'Shows the user of the port'}]
Name of the value you want to get
Enum parameters:
  • baud-rate - Baud rate (bits/s)
/td

print

ParameterTypeDescriptionAdditional Notes
append
Type: switch
value: True
Controls if print to file overwrites or appends to content of an existing file
/td
as-value
Type: switch
interesting: False
value: True
Prints out output as value (used in scripting)
/td
brief
Type: switch
value: True
Displays brief description
/td
count-only
Type: switch
value: True
Shows only the count of special login users
/td
default-config
Type: switch
sysc: 3
value: True
/td
detail
Type: switch
value: True
Displays detailed information
/td
file
Type: string
Print the content of the submenu into specific file
/td
follow
Type: switch
value: True
Updates output in real-time
/td
follow-only
Type: switch
value: True
Will output changes that have occured after invoking command
/td
follow-strict
Type: switch
value: True
¯_(ツ)_/¯ (Requires: Option.npk)
/td
from
Type: arg_node
noexport: True
Print parameters only from specified item
/td
intervaltime [200000000 .. 9223372036854775807] unit: 1000000
Displays information and refreshes it in selected time interval
/td
proplist
Type: obj_arg
+arg: {'producer': 'enum_arg', 'sub': [{'key': '#mapping', 'value': {'producer': '', 'sub': [{'key': '', 'value': {'producer': 'const_mapping', 'sub': [{'key': 'data', 'value': {'producer': '', 'sub': [{'key': 'baud-rate', 'value': 4}, {'key': 'channels', 'value': 3}, {'key': 'data-bits', 'value': 5}, {'key': 'device', 'value': 2}, {'key': 'flow-control', 'value': 8}, {'key': 'inactive', 'value': 20}, {'key': 'line-state', 'value': 11}, {'key': 'name', 'value': 0}, {'key': 'parity', 'value': 6}, {'key': 'stop-bits', 'value': 7}, {'key': 'used-by', 'value': 1}]}}, {'key': 'help', 'value': {'producer': '', 'sub': [{'key': 0, 'value': 'New port name'}, {'key': 1, 'value': 'Shows the user of the port'}, {'key': 4, 'value': 'Baud rate (bits/s)'}, {'key': 5, 'value': 'Number of bits for data'}, {'key': 6, 'value': 'Parity'}, {'key': 7, 'value': 'Number of bits for control'}, {'key': 8, 'value': 'Type of flow control'}, {'key': 11, 'value': 'The name of signal'}, {'key': 20, 'value': 'Inactive port'}]}}]}}]}}, {'key': 'acc', 'value': {'producer': '"ufd0007"', 'sub': []}}, {'key': 'hint', 'value': 'Name of the value you want to get'}, {'key': 'setUnsetAcc', 'value': {'producer': '"bfd0008"', 'sub': []}}]}
Names of properties
/td
show-ids
Type: switch
value: True
Prints static IDs for selected submenu (Requires: Option.npk)
/td
stats
Type: switch
value: True
Shows statistics on ports
/td
terse
Type: switch
interesting: False
value: True
Show details in compact and machine friendly format
/td
value-list
Type: switch
interesting: False
value: True
Show properties one per line
/td
where
Type: query_arg
query: True
Generates output depending on values supplied (used mainly for scripting)
/td
without-paging
Type: switch
value: True
Displays information in one piece
/td

remove

Remove item
ParameterTypeDescriptionAdditional Notes
numbers
Type: arg_node
List of item numbers
/td

set

Change item properties
ParameterTypeDescriptionAdditional Notes
baud-rate
Type: enum
const_mapping: 1000000 | 110 | 115200 | 1152000 | 1200 | 134 | 150 | 1500000 | 1800 | 19200 | 200 | 2000000 | 230400 | 2400 | 2500000 | 300 | 3000000 | 3500000 | 38400 | 4000000 | 460800 | 4800 | 50 | 500000 | 57600 | 576000 | 600 | 75 | 921600 | 9600
Type: enum
mapping: [{'type': 'const', 'name': '1000000'}, {'type': 'const', 'name': '110'}, {'type': 'const', 'name': '115200'}, {'type': 'const', 'name': '1152000'}, {'type': 'const', 'name': '1200'}, {'type': 'const', 'name': '134'}, {'type': 'const', 'name': '150'}, {'type': 'const', 'name': '1500000'}, {'type': 'const', 'name': '1800'}, {'type': 'const', 'name': '19200'}, {'type': 'const', 'name': '200'}, {'type': 'const', 'name': '2000000'}, {'type': 'const', 'name': '230400'}, {'type': 'const', 'name': '2400'}, {'type': 'const', 'name': '2500000'}, {'type': 'const', 'name': '300'}, {'type': 'const', 'name': '3000000'}, {'type': 'const', 'name': '3500000'}, {'type': 'const', 'name': '38400'}, {'type': 'const', 'name': '4000000'}, {'type': 'const', 'name': '460800'}, {'type': 'const', 'name': '4800'}, {'type': 'const', 'name': '50'}, {'type': 'const', 'name': '500000'}, {'type': 'const', 'name': '57600'}, {'type': 'const', 'name': '576000'}, {'type': 'const', 'name': '600'}, {'type': 'const', 'name': '75'}, {'type': 'const', 'name': '921600'}, {'type': 'const', 'name': '9600'}]
constant: True
Baud rate (bits/s)
/td
data-bits
Type: enum
const_mapping: 7 | 8
Type: enum
mapping: [{'type': 'const', 'name': '7'}, {'type': 'const', 'name': '8'}]
constant: True
Number of bits for data
/td
dtr
Type: bool
falseStr: off
trueStr: on
/td
flow-control
Type: enum
const_mapping: hardware | none | xon-xoff
Type: enum
mapping: [{'type': 'const', 'name': 'hardware'}, {'type': 'const', 'name': 'none'}, {'type': 'const', 'name': 'xon-xoff'}]
constant: True
Type of flow control
/td
name
Type: string
New port name
/td
numbers
Type: arg_node
List of item numbers
/td
parity
Type: enum
const_mapping: even | none | odd
Type: enum
mapping: [{'type': 'const', 'name': 'even'}, {'type': 'const', 'name': 'none'}, {'type': 'const', 'name': 'odd'}]
constant: True
Parity
/td
rts
Type: bool
falseStr: off
trueStr: on
/td
stop-bits
Type: enum
const_mapping: 1 | 2
Type: enum
mapping: [{'type': 'const', 'name': '1'}, {'type': 'const', 'name': '2'}]
constant: True
Number of bits for control
/td

/port/remote-access

add

Create a new item
ParameterTypeDescriptionAdditional Notes
allowed-addresses
Type: ip_range_arg
acc1: {'producer': '"be u3"', 'sub': []}
acc2: {'producer': '"be u4"', 'sub': []}
/td
channelnum [0 .. 4294967295]/td
copy-from
Type: arg_node
noexport: True
ID of item to make a copy from
/td
disabled
Type: bool
Defines whether item is ignored or used
/td
local-address
Type: ipAddr
/td
log-file
Type: string
/td
port
Type: enum
other_mapping: {'producer': 'remote_mapping', 'sub': [{'key': 'path', 'value': '{52,1}'}]}
Type: enum
mapping: [{'producer': 'remote_mapping', 'sub': [{'key': 'path', 'value': '{52,1}'}]}]
/td
protocol
Type: enum
const_mapping: raw | rfc2217
Type: enum
mapping: [{'type': 'const', 'name': 'raw'}, {'type': 'const', 'name': 'rfc2217'}]
constant: True
/td
tcp-portnum [1 .. 65535]/td

disable

Disable items
ParameterTypeDescriptionAdditional Notes
numbers
Type: arg_node
List of item numbers
/td

edit

Edit items
ParameterTypeDescriptionAdditional Notes
number
Type: arg_node
Item number
/td
value-name
Type: enum
const_mapping: allowed-addresses | channel | local-address | log-file | port | protocol | tcp-port
Type: enum
mapping: [{'type': 'const', 'name': 'allowed-addresses'}, {'type': 'const', 'name': 'channel'}, {'type': 'const', 'name': 'local-address'}, {'type': 'const', 'name': 'log-file'}, {'type': 'const', 'name': 'port'}, {'type': 'const', 'name': 'protocol'}, {'type': 'const', 'name': 'tcp-port'}]
Name of editable property
/td

enable

Enable items
ParameterTypeDescriptionAdditional Notes
numbers
Type: arg_node
List of item numbers
/td

export

Print or save an export script that can be used to restore configuration
ParameterTypeDescriptionAdditional Notes
compact
Type: switch
value: True
Only exports user-changed settings without defaults
/td
file
Type: string
File name
Name of the file that will be stored in FTP access area.
/td
hide-sensitive
Type: switch
value: True
Hides sensitive information like passwords from beeing printed
/td
terse
Type: switch
value: True
Creates export with output without line wraps
/td
verbose
Type: switch
value: True
Creates output with all RouterOS settings (including the default ones)
/td

find

Find items by value
ParameterTypeDescriptionAdditional Notes
where
Type: query_arg
query: True
Generates output depending on values supplied (used mainly for scripting)
/td

get

Gets value of item's property
ParameterTypeDescriptionAdditional Notes
number
Type: arg_node
Item number
/td
value-name
Type: enum
const_mapping: active | allowed-addresses | busy | channel | disabled | inactive | local-address | log-file | logging-active | port | protocol | remote-address | tcp-port
Type: enum
mapping: [{'type': 'const', 'name': 'active'}, {'type': 'const', 'name': 'allowed-addresses'}, {'type': 'const', 'name': 'busy'}, {'type': 'const', 'name': 'channel'}, {'type': 'const', 'name': 'disabled', 'help': 'Defines whether item is ignored or used'}, {'type': 'const', 'name': 'inactive'}, {'type': 'const', 'name': 'local-address'}, {'type': 'const', 'name': 'log-file'}, {'type': 'const', 'name': 'logging-active'}, {'type': 'const', 'name': 'port'}, {'type': 'const', 'name': 'protocol'}, {'type': 'const', 'name': 'remote-address'}, {'type': 'const', 'name': 'tcp-port'}]
Name of the value you want to get
/td

print

Print values of item properties
ParameterTypeDescriptionAdditional Notes
append
Type: switch
value: True
Controls if print to file overwrites or appends to content of an existing file
/td
as-value
Type: switch
interesting: False
value: True
Prints out output as value (used in scripting)
/td
brief
Type: switch
value: True
Displays brief description
/td
count-only
Type: switch
value: True
Shows only the count of special login users
/td
default-config
Type: switch
sysc: 3
value: True
/td
detail
Type: switch
value: True
Displays detailed information
/td
file
Type: string
Print the content of the submenu into specific file
/td
follow
Type: switch
value: True
Updates output in real-time
/td
follow-only
Type: switch
value: True
Will output changes that have occured after invoking command
/td
follow-strict
Type: switch
value: True
¯_(ツ)_/¯ (Requires: Option.npk)
/td
from
Type: arg_node
noexport: True
Print parameters only from specified item
/td
intervaltime [200000000 .. 9223372036854775807] unit: 1000000
Displays information and refreshes it in selected time interval
/td
proplist
Type: obj_arg
+arg: {'producer': 'enum_arg', 'sub': [{'key': '#mapping', 'value': {'producer': '', 'sub': [{'key': '', 'value': {'producer': 'const_mapping', 'sub': [{'key': 'data', 'value': {'producer': '', 'sub': [{'key': 'active', 'value': 17}, {'key': 'allowed-addresses', 'value': 2}, {'key': 'busy', 'value': 18}, {'key': 'channel', 'value': 1}, {'key': 'disabled', 'value': 20}, {'key': 'inactive', 'value': 16}, {'key': 'local-address', 'value': 3}, {'key': 'log-file', 'value': 6}, {'key': 'logging-active', 'value': 19}, {'key': 'port', 'value': 0}, {'key': 'protocol', 'value': 5}, {'key': 'remote-address', 'value': 7}, {'key': 'tcp-port', 'value': 4}]}}, {'key': 'help', 'value': {'producer': '', 'sub': [{'key': 20, 'value': 'Defines whether item is ignored or used'}]}}]}}]}}, {'key': 'acc', 'value': {'producer': '"ufd0007"', 'sub': []}}, {'key': 'hint', 'value': 'Name of the value you want to get'}, {'key': 'setUnsetAcc', 'value': {'producer': '"bfd0008"', 'sub': []}}]}
Names of properties
/td
show-ids
Type: switch
value: True
Prints static IDs for selected submenu (Requires: Option.npk)
/td
terse
Type: switch
interesting: False
value: True
Show details in compact and machine friendly format
/td
value-list
Type: switch
interesting: False
value: True
Show properties one per line
/td
where
Type: query_arg
query: True
Generates output depending on values supplied (used mainly for scripting)
/td
without-paging
Type: switch
value: True
Displays information in one piece
/td

remove

Remove item
ParameterTypeDescriptionAdditional Notes
numbers
Type: arg_node
List of item numbers
/td

set

Change item properties
ParameterTypeDescriptionAdditional Notes
allowed-addresses
Type: ip_range_arg
acc1: {'producer': '"be u3"', 'sub': []}
acc2: {'producer': '"be u4"', 'sub': []}
/td
channelnum [0 .. 4294967295]/td
disabled
Type: bool
Defines whether item is ignored or used
/td
local-address
Type: ipAddr
/td
log-file
Type: string
/td
numbers
Type: arg_node
List of item numbers
/td
port
Type: enum
other_mapping: {'producer': 'remote_mapping', 'sub': [{'key': 'path', 'value': '{52,1}'}]}
Type: enum
mapping: [{'producer': 'remote_mapping', 'sub': [{'key': 'path', 'value': '{52,1}'}]}]
/td
protocol
Type: enum
const_mapping: raw | rfc2217
Type: enum
mapping: [{'type': 'const', 'name': 'raw'}, {'type': 'const', 'name': 'rfc2217'}]
constant: True
/td
tcp-portnum [1 .. 65535]/td

unset

Unsets and removes user-set value to specified submenu object
ParameterTypeDescriptionAdditional Notes
numbers
Type: arg_node
List of item numbers
/td
value-name
Type: enum
const_mapping: local-address
Type: enum
mapping: [{'type': 'const', 'name': 'local-address'}]
Name of property that can be unset
/td