EasyManua.ls Logo

MikroTik RouterOS v2.9 - Page 646

MikroTik RouterOS v2.9
709 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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 :put or that the command path
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, :put (1 + 2) is valid and :("pu" . "t") 3 is not.
Example
The parts of internal console commands are futher explained in the following examples:
/ping 10.0.0.1 count=5
prefix /
action ping
unnamed parameter 10.0.0.1
name[=value] count=5
.. ip firewall rule input
path .. ip firewall rule
path_args input
: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.

Table of Contents