MikroTik RouterOS v2.9 Reference Manual page 646

Reference manual
Table of Contents

Advertisement

Console commands are made of the following parts, listed in the order you type them in console:
prefix - indicates whether the command is an ICE, like : in
starts from the root menu level, like / in
[admin@MikroTik] ip firewall mangle> /ping 10.0.0.1
path - a relative path to the desired menu level, like .. filter in
[admin@MikroTik] ip firewall mangle> .. filter print
path_args - this part is required to select some menu levels, where the actual path can vary
across different user inputs, like mylist in
[admin@MikroTik] ip firewall mangle> /routeing prefix-list list mylist
action - one of the actions available at the specified menu level, like add in
[admin@MikroTik] ip firewall mangle> /ip firewall filter add chain=forward action=drop
unnamed parameter - these are required by some actions and should be entered in fixed order
after the action name, like in 10.0.0.1 in
[admin@MikroTik] ip firewall mangle> /ping 10.0.0.1
name[=value] - a sequence of parameter names followed by respective values, if required, like
ssid=myssid in
/interface wireless set wlan1 ssid=myssid
Notes
Variable substitution, command substitution and expressions are allowed only for path_args and
unnamed parameter values. prefix, path, action and name[=value] pairs can be given only
directly, as a word. Therefore,
Example
The parts of internal console commands are futher explained in the following examples:
/ping 10.0.0.1 count=5
unnamed parameter
name[=value]
.. ip firewall rule input
path_args
:for i from=1 to=10 do={:put $i}
Page 632 of 695
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.
:put (1 + 2)
prefix
action
path
is valid and
:("pu" . "t") 3
or that the command path
:put
is not.
/
ping
10.0.0.1
count=5
.. ip firewall rule
input

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents