C H A P T E R 2 |
Command Structure |
The command-line interface (CLI) syntax, conventions, and terminology are described in this chapter. Each CLI command referenced in this document is illustrated using the structure outlined below.
This chapter includes the following topics:
Some commands, such as show inventory or clear vlan, do not require parameters. Other commands, such as network parms, have parameters for which you must supply a value. Parameters are positional--you must type the values in the correct order. Optional parameters will follow required parameters. Following are two examples.
In the preceding example, <ipaddr> and <netmask> are the required values for the command, and [gateway] is the optional value for the command.
In the second example, <loc> is the required parameter for the command.
The following conventions apply to the command name:
The following conventions apply to parameters:
The following conventions apply to the values of the common parameters:
This parameter is a valid IP address. You can enter an IP address in the following formats:
In addition to these formats, decimal, hexadecimal, and octal formats are supported through the following input formats (where n is any valid hexadecimal, octal, or decimal number):
The MAC address format is six hexadecimal numbers separated by colons -- for example, 00:06:29:32:81:40.
You can enter Area IDs in dotted-decimal notation (for example, 0.0.0.1). An area ID of 0.0.0.0 is reserved for the backbone. Area IDs have the same form as IP addresses, but are distinct from IP addresses. You can use the IP network number of the sub-netted network for the area ID.
You must enter the value of <router id> in 4-digit, dotted-decimal notation (for example, 0.0.0.1). A router ID of 0.0.0.0 is invalid.
Enter a valid slot and port number separated by forward slashes. For example, 0/1 represents slot number 0 and port number 1.
The logical slot and port number value is applicable in the case of a port-channel (LAG). The operator can use the logical slot/port to configure the port-channel.
Use double quotation marks to identify character strings--for example, “System Name with Spaces”. An empty string (“”) is not valid.
Network addresses define a link to a remote host, workstation, or network. Network addresses use the syntax shown in TABLE 2-1.
Command completion finishes spelling the command when you have typed enough letters of a command to uniquely identify the command word. You can execute the command by pressing the Enter key (command abbreviation) or you can complete the command word by pressing the Tab or spacebar keys (command completion).
The value “Er” designates that the requested value was not internally accessible. This should not happen and indicates that the software is not handling this instance correctly.
The value of “-----” designates that the value is unknown.
The CLI enables the user to type single-line annotations at the command prompt for use when writing test or configuration scripts and for better readability. The exclamation point (!) character flags the beginning of a comment. The comment flag character can begin a word anywhere on the command line and all input following this character is ignored. Any command line that begins with the character ! is recognized as a comment line and ignored by the parser.
Some examples of comments are provided in the following code.
Certain key combinations speed up use of the CLI. They are listed in this section. Help for the CLI is available by typing HELP.
Copyright © 2009 Sun Microsystems, Inc. All rights reserved.