UNDERSTANDING COMMANDS
Command Structure
A command is a single line of text consisting of keywords and parameters, for example:
SWI2210-XXXX# show vlan id 10
...
SWI2210-XXXX# show vlan id 20
...
The keywords are show, vlan, and id. 10 and 20 are parameters that could contain a different value in
another command invocation.
Keywords are case-insensitive, i.e., show, SHOW and Show are identical. Conversely, parameters may
either be case-sensitive or case-insensitive depending on the command and parameter in question. For
example, file names are usually case-sensitive.
Keywords and certain parameters can be truncated to save typing time, as long as they are unambiguous
(unique within that mode or sub-mode) and known to the system (a standard parameter). For example,
these commands are identical:
SWI2210-XXXX# show interface GigabitEthernet 1/5 capabilities
...
SWI2210-XXXX# sh in g 1/5 c
...
This works because:
Many keywords begin with ‘s’ but only one begins with ‘sh’.
Several commands begin with ‘show i’ but only one begins with ‘show in’.
The ‘show interface’ command takes a port type as parameter. Depending on the hardware
capabilities, the options are: FastEthernet, GigabitEthernet, 2.5GigabitEthernet, 5GigabitEthernet
and 10GigabitEthernet. Thus, ‘g’ is a unique abbreviation for ‘GigabitEthernet’.
1/5 identifies the interface as belonging to switch 1, port 5. This parameter cannot be abbreviated.
The ‘show interface’ command can output different kinds of information--capabilities, statistics,
status, and several others. The ‘c’ is a unique abbreviation for ‘capabilities’.
With a bit of practice this allows for highly efficient keyboard entry, in particular when coupled with the
context-sensitive help features of the CLI (see XXXX).
Command Syntax
A command is described by its syntax, for example:
show interface <list> { status | statistics | capabilities | switchport | veriphy }
The conventions are:
Keywords are shown in bold.
<Parameters> are enclosed by angle brackets and shown in bold italics. In the CLI online help,
parameters are marked with angle brackets. Parameters often require a list of values. List items
must be separated by commas with no spaces, and can include ranges such as 3-9.
[ ... ] indicates an optional construct. You can omit it.
{ ... } indicates a grouping; the constructs within belong together somehow.
‘|’ indicates a choice between two or more alternatives, e.g., a | b | c reads as “a or b or c”.
In the show interface example, the syntax is simple. You must enter a list of interfaces and then choose
one of ‘status’, ‘statistics’, ‘capabilities’, ‘switchport’ or ‘veriphy’.