Foundry NetIron M2404C and M2404F Metro Access Switches
Using the Command Line Interface (Rev. 03)
Getting Started with the CLI
© 2008 Foundry Networks, Inc.
Page 10 of 12
Command Aliases
The CLI allows the user to associate a contiguous character string as an alias to any command,
optionally including specific arguments. This user-defined alias is then fully equivalent to the
command expression to which the user has associated it, in the CLI mode in which the user has
defined the alias. The user can thus set a substitute name for a command and use this name instead
of typing the command again.
For example, the user can assign an alias to the
show interface 1/1/1 statistics
command, by
typing:
device-name
#
alias sint1 show interface 1/1/1 statistics
Once the alias is assigned, the user can execute the
show interface 1/1/1 statistics
command by
simply typing
sint1
in the mode in which it was assigned (the Privileged mode):
device-name
#
sint1
Octets 24512 In/OutPkts 64 383
Collisions 0 In/OutPkts 65-127 0
Broadcast 0 In/OutPkts 128-255 0
Multicast 0 In/OutPkts 256-511 0
CRCAlignErrors 0 In/OutPkts 512-1023 0
Undersize 0 In/OutPkts 1024-MaxFrameSize 0
Oversize 0 TotalInPkts 383
Fragments 0 TotalIn/OutPkts 383
Jabbers 0 DropCount 0
DropEvents 0
Last5secInPkts 50 Last5secInBps 409
Last1minInPkts 353 Last1minInBps 408
Last5minInPkts 353 Last5minInBps 81
Last5secOutPkts 0 Last5secOutBps 0
Last1minOutPkts 0 Last1minOutBps 0
Last5minOutPkts 0 Last5minOutBps 0
To remove the alias
sint
, type:
device-name
#
no alias sint1
Filtering the Output of a show Command
The CLI allows the filtering of associated sections of output from the
show
commands. Filtering
the output of a
show
command to match a specific regular expression (text string) provides control
over the type and amount of information that is displayed by the system. Filtering is useful, when
displaying large files, for example the configuration file.
The pipe (“|”) character indicates a filtering action. If the
include
or
exclude
keyword is not
specified,
include
is the default.
Syntax Description
device-name
#
show
COMMAND
|
[
include
|
exclude
]
REGEXP
Argument Description
COMMAND
Any CLI command.