Command Structure and Syntax

A command is a single line of text consisting of keywords and parameters, for example:

my-device# show vlan id 10
...
my-device# show vlan id 20
...

The keywords are show, vlan, and id; whereas 10 and 20 are parameters, something that could contain another value in another command invocation. Keywords are not case sensitive, thus show, SHOW, and Show are identical. Conversely, parameters may either be case-sensitive or not, depending on the command and parameter in question. Keywords and certain parameters can be abbreviated as long as they are unambiguous. For example, these commands are identical:

my-device# show interface GigabitEthernet 1/5 capabilities
...
my-device# sh in g 1/5 c
...

This works because:

  • • There are many keywords that begin with ‘s’ but only one that begins with ‘sh’

  • There are several commands that begin with ‘show i’ but only one that 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 and has to be written out in full

  • The show interface GigabitEthernet 1/5 command can output different kinds of information: Capabilities, statistics, status, and several other. In this case, ‘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 ICLI

Last updated