![]() INDEX TOC |
|
![]() |
Configure Using Command Line Interface The command line interface (CLI), or shell as it also often is called, is a text based administration interface, which is used as an alternative or a complement to the web based interface. The CLI is accessible by using the Telnet protocol, provided that access has been enabled in the security profile configuration. Access to the CLI is granted through a login (authentication) procedure, requesting a username and a password. (Note that Telnet transmits this information in cleartext, i.e. not encrypted in any way.) The CLI uses the same user database as the web interface for authentication. Overview Once a user has logged in, a prompt is displayed and the CLI waits for the user to type a line of input. All command lines follow the same format: a command name, possibly followed by a number of arguments. Depending on which command is specified some arguments are required, while others are optional. Most commands display usage information if the first argument is -h (help). There is also a help command which displays a short description of what the specified command does. More than one "line" of input can be entered on the same line, using a semicolon as a separator, e.g. ls /tmp ; cat /tmp/foo.txt The /proc filesystem The /proc filesystem is a virtual filesystem which contains (virtual) files. These files contain information about the current state of the system. It works like a "normal" filesystem in the sense that the same commands can be used, e.g. cat , ls , etc. However, the illusion isn't perfect so sometimes the result isn't what one might expect. The /proc/cfg directory offers access to "live" configuration parameters either by specifying a parameter name or a configuration context. Specific parameters are accessible as /proc/cfg/<parameter name>, while contexts are accessed as /proc/cfg/<context name>/[<sub context name>/]all. Use ls to find out which contexts that are available. Note!
Examples Example 1 - A simple command admin@ix66# ls /usr Lists the contents of the directory /usr. Example 2 - Issuing multiple commands admin@ix66# ls /usr ; cat /usr/net.cfg Lists the contents of the directory /usr and then display the contents of the file /usr/net.cfg Example 3 - Displaying a live configuration parameter value admin@ix66# cat /proc/cfg/net.et1.ip= Display the IP-address of interface et1. Example 4 - Configure a subsystem admin@ix66# save /usr/net.cfg Perform a configuration of the network susbsystem by "saving" the file /usr/net.cfg. Example 5 - Upgrade the firmware admin@ix66# tftpupgrade 192.168.0.10 66X122__.tar Upgrade the firmware using the file 66X122__.tar located at the TFTP-server with the IP-address 192.168.0.10. Example 6 - Execute a shell script admin@ix66# source /tmp/script.txt Read commands from the file /tmp/script.txt and execute them as if they had been entered by the operator. Command reference table Note!
|