Setup guide
numbers, names are not assigned by the console internally, but are one of the items' properties.
Thus, they would not change on their own. However, there are all kinds of obscure situations
possible when several users are changing router's configuration at the same time. Generally, item
names are more "stable" than the numbers, and also more informative, so you should prefer them to
numbers when writing console scripts.
Notes
Item numbers are assigned by print command and are not constant - it is possible that two
successive print commands will order items differently. But the results of last print commands are
memorized and thus, once assigned, item numbers can be used even after add, remove and move
operations (after move operation item numbers are moved with the items). Item numbers are
assigned on per session basis, they will remain the same until you quit the console or until the next
print command is executed. Also, numbers are assigned separately for every item list, so ip
address print would not change numbers for interface list.
Example
[admin@Wandy] interface> set 0 mtu=1200
ERROR: item number must be assigned by a print command
use print command before using an item number in a command
[admin@Wandy] interface> print
Flags: X - disabled, D - dynamic, R - running
# NAME TYPE RX-RATE TX-RATE MTU
0 R Public ether 0 0 1500
1 R Local ether 0 0 1500
2 R wlan1 wlan 0 0 1500
[admin@Wandy] interface> set 0
disabled mtu name rx-rate tx-rate
[admin@Wandy] interface> set 0 mtu=1200
[admin@Wandy] interface> set wlan1 mtu=1300
[admin@Wandy] interface> print
Flags: X - disabled, D - dynamic, R - running
# NAME TYPE RX-RATE TX-RATE MTU
0 R Public ether 0 0 1200
1 R Local ether 0 0 1500
2 R wlan1 wlan 0 0 1300
[admin@Wandy] interface>
Quick Typing
Description
There are two features in the console that help entering commands much quicker and easier - the
[Tab] key completions, and abbreviations of command names. Completions work similarly to the
bash shell in UNIX. If you press the [Tab] key after a part of a word, console tries to find the
command within the current context that begins with this word. If there is only one match, it is
automatically appended, followed by a space:
/inte[Tab]_
becomes
/interface _
If there is more than one match, but they all have a common beginning, which is longer than that
what you have typed, then the word is completed to this common part, and no space is appended:
/interface set e[Tab]_
becomes
/interface set ether_