![]() ![]() Warning: Do not use Item numbers in scripts, it is not a reliable way to edit items in the scheduler. Almost everywhere, where you can write the number of item, you can also write a list of > interface printįlags: X - disabled, D - dynamic, R - runningģ R ether4 ether > interface set 0,1,2 > interface print You can specify multiple items as targets to some commands. Numbers will be assigned just as if the print command was executed. Since version 3 it is possible to use item numbers without running print command. ![]() Also, numbers are assigned separately for every item list, so the ip address print will not change the numbering of the interface list. Item numbers are assigned on a per session basis, they will remain the same until you quit the console or until the next print command is executed. 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 (since version 3, move operation does not renumber items). Item numbers are assigned by the print command and are not constant - it is possible that two successive print commands will order items differently. Generally, item names are more "stable" than the numbers, and also more informative, so you should prefer them to numbers when writing console scripts. However, there are all kinds of obscure situations possible when several users are changing router's configuration at the same time. Thus, they would not change on their own. ![]() You do not have to use the print command before accessing items by their names, which, as opposed to numbers, are not assigned by the console internally, but are properties of the items. There you can use item names instead of item numbers. Some lists have items with specific names assigned to each of them. To change properties of an item, you have to use set command and specify name or number of the item. All items in the list have an item number followed by flags and parameter values. Such arrays are displayed in similarly looking lists. Many of the command levels operate with arrays of items: interfaces, routes, users, etc. service-port printĥ ip firewall nat> Item Names and Numbers 2 packets transmitted, 0 packets received, 100% packet ip firewall nat>. ![]()
0 Comments
Leave a Reply. |