Hewlett-Packard Company makes no warranty o f
any kind with regard to this material, including, but
not limited to, the implied warranties o f merchantability and fitness fo r a partic ular purpose. HewlettPackard shall not be liable fo r erro rs contained
herein or for incidental or c onsequential damages in
connection with the f urnishing, performanc e, or use
of this material.
This do c ument c ontains pro prietary info rmation,
which is protected by co pyright. No part of this
document may be photocopied, reproduced, or
translated into another language witho ut the prior
written consent o f Hew lett-Pac kard. The informatio n contained in this do cument is subje ct to c hange
witho ut notic e.
Warranty
If yo u have any questions abo ut the warranty fo r
this product, contac t yo ur de aler o r lo c al HewlettPackard sales representative.
Denotes
NoteSignific ant concepts or o perating
instructions
this fontText to be typed verbatim: all
commands, path names, file
names, and direc to ry names
this fontText displayed on the screen
<this font>Keys to be pressed, for example,
the <Return> key
Safety Instructions
Service
Any servic ing, adjustment, maintenance, or repair
must be performed o nly by authorized servicetrained perso nnel.
This c hapter introduc es the Co mmand Line Interfac e and describes the essentials for using
the Co mmand Line Interface c o mmands.
Introduction
1
Command Line Interface Overview
The Co mmand Line Interface ( CLI) is a feature that pro vides an alternative to HP EFC
Manager and HP Embedded Web Server (HP EWS) produc ts fo r direc to r and switc h
management capabilities.
The CLI can only be used through a Telnet c lient session in an o ut-o f-band management
environment, using the Ethernet port in the directo r o r switc h. Although the primary use o f
the CLI is in ho st-based scripting environments, the CLI commands can also be entered
directly at a co mmand line. Any hardware platfo rm that supports the Telnet c lient software
can be used.
The primary purpo se o f the CLI is to auto mate management o f a large number o f switc hes
with the use of scripts.
Bec ause the CLI is not an interactive interface, no checking is done fo r pre-existing
conditions and no prompts are displayed to guide the user through a task. If an interactive
interface is needed, the HP EFC Manager or HP EWS products should be used instead of
the CLI.
2 Command Line Interface Overview
Entering Command Line Interface Commands
The Command Line Interface (CLI) commands can be entered directly at the command line
of a terminal or coded in a script.
Note that the CLI co mmands are not case sensitive.
Documentation Conventions
Throughout this public atio n, perio ds are used to separate the compo nents of a c o mmand
name. However, the periods cannot be included when the command is actually entered at
the terminal or coded in a sc ript. (Ho w to enter the commands is explained in Navigatio n of
the CLI Command Tree on page 8.)
Even though the commands cannot be entered with the periods, the command line
prompts do include the periods.
Config.Port>
Navigation Conventions
Basic command line navigatio n c o nventio ns are suppo rted. The fo llowing table inc ludes
the asynchrono us co mmands that are rec o gnized by the Co mmand Line Interface.
Table 1
CLI Co mmand Tree Navigatio n Co nventions
Introduction
Character SequenceCommon NameAction or Description
<CR>Carriage ReturnPass a completed line to the parser.
<DEL>DeleteBackspace one character and delete the
character.
<NL>New LinePass a completed line to the parser.
<SP>SpaceUsed to separate keywords.
?Question MarkProvide help information. (No <CR> required)
“Quotation MarkUsed to surround a single token.
Entering Command Line Interface Commands 3
Table 1 CLI Command Tree Navigation Conventio ns ( c o nt’d)
Character SequenceCommon NameAction or Description
^AControl-APosition the cursor to the start of the line.
^BControl-BPosition the cursor left one character.
^DControl-DDelete the current character.
^EControl-EPosition the cursor to the end of the line.
^FControl-FPosition the cursor right one character.
^HControl-HBackspace one character and delete the
character.
^ITabComplete the current keyword.
^KControl-KDelete to the end of the line.
^LControl-LRedraw the line.
^NControl-NMove down one line in the command history.
^PControl-PMove up one line in the command history.
^RControl-RRedraw the line.
^UControl-UClear the input and reset the line buffer.
^XControl-XClear the input and reset the line buffer.
<ESC>[AUp ArrowMove up one line in the command history.
<ESC>[BDown ArrowMove down one line in the command history.
<ESC>[CRight ArrowPosition the cursor right one character.
<ESC>[DLeft ArrowPosition the cursor left one character.
Command Tree
The command tree of the Command Line Interface begins from the root. The commands in
the fo ur extended branches (co nfig, maint, perf, and show) are described in Chapter 2, CLI
Co mmands.
There are three additio nal commands (login, logo ut, and c o mmaDelim) that are glo bally
available commands. These c ommands are described in this chapter.
4 Entering Command Line Interface Commands
The hierarchy from the root, reading from left to right, is as follows.
Table 2
config -------------------- ip -------------------------- ethernet
maint --------------------- port ----------------------- beacon
reset
system ------------------ beacon
clearSysError
6 Entering Command Line Interface Commands
Table 2Command Line Interface Co mmand Tree
ipl
resetConfig
setOnlineState
perf ----------------------- class2
class3
clearStats
errors
link
traffic
show --------------------- eventLog
frus
ip -------------------------- ethernet
loginServer
nameServer
port ----------------------- config
info
status
technology
Introduction
security ----------------- portBinding
switch
system
zoning
Note that the c o mmands are sho wn, with the exception of the zo ning commands, in
alphabetical order to make them easier to locate. Although the commands can be entered
in any order, depending on the results desired, the order shown in Table 2, Command Line
Interfac e Command Tree for the zo ning commands is a typical order in which the zo ning
commands are e ntered.
Entering Command Line Interface Commands 7
Note that the o rder in which c o mmands are entered determines the o rder in which the
show c ommands display the values. Refer to Chapter 2, CLI Commands for examples of
show commands output.
Navigation of the CLI Command Tree
Once the Administrator or Operator logs in and receives the Root> prompt, the CLI
commands are ac c essed by navigating up and do wn the CLI command tree.
To move from the ro o t through the any o f the four extended branches, enter the name o f
the next branch as shown in Table 2, Command Line Interface Command Tree. For
ex ample, to use the co nfig.port.name c o mmand to configure the name fo r po rt 4 on the
switc h, this series of commands is entered:
config
Ro ot >
Config> port
Config.Port> name 4 "Sam’s Tape Drive"
At this po int, to enter the maint.po rt.beac o n c o mmand to set the be aconing state of po rt 4,
the fo llo wing series o f c ommands is entered:
Config.Port>
Config> ..
Ro ot > maint
Maint> port
Maint.Port> beacon 4 true
Note that you must return all the way to the root of the tree to transition to another
extended branch. When traversing back to the root, the name of each branch cannot be
used. Instead use the double-dot command (two periods) to move back towards the root.
Note that only one double-do t command may be entered at a time.
One approach to making the navigatio n mo re c o nc ise is to use the root command to jump
directly to the roo t of the CLI command tree. The previous example, which shows stepping
back to the ro ot with the double-do t c ommand, is simplified as follows:
8 Entering Command Line Interface Commands
..
Config.Port> root
Ro ot > maint
Maint> port
Maint.Port> beacon 4 true
Ano ther appro ac h to making the navigation more c o nc ise is to use the complete c o mmand
syntax from the Roo t> prompt each time. For example, to issue the config.port.name
command and then the maint.port.beacon command, the co mmands are entered as
fo llows:
config port name 4 "Sam’s Tape Drive"
Ro ot >
Ro ot > maint port beacon 4 true
As shown in this example, use o f the c o mplete c o mmand syntax avo ids navigating up and
down the branches of the CLI command tree, and the prompt stays at the root. The use of
complete c ommand syntax is particularly useful when writing scripts.
When coding a script, remember to code the appropriate character sequences, which are
described in Navigation Conventions.
config port name 4 "Sam’s Tape Drive"<CR>
Ro ot >
Ro ot > maint port beacon 4 true<CR>
Introduction
Limitation on Movements
As the co mmands are entered, they are rec o rded in a history log. Note these limitatio ns on
movement that result f ro m use of the history lo g:
•If a c o mmand has more than 60 characters, the command runs, but the c ommand is not
rec orded in the histo ry log, and the positio n in the tree does not change , as shown in the
fo llo wing example. Because the c o mmand is no t rec o rded in the histo ry, a subsequent
async hronous co mmand ( navigatio n c o mmand) cannot depend on it.
•Whenever the position in the CLI command tree moves to a new branch (for example,
config to maint, config to c onfig.port, or c onfig.po rt to co nfig), the history lo g is cleared.
In this case, any asynchronous commands (fo r example, the up-arrow command
<ESC>[A) or the up-arrow keyboard symbol) cannot move the position back towards
the root, as shown in this example:
config
Ro ot >
Ro ot . Co nf ig> port
Ro ot . Co nf ig. Po rt > <ESC>[A
Ro ot . Co nf ig. Po rt >
Parameters
Some command parameters ac cept character strings that inc lude spac es. Quo tatio n marks
are required when a string includes spaces.
Config.System>
Config.System> location "Building 24 Room 16"
If spac es are no t inc luded in a parameter that accepts a string, the quotatio n marks are not
required around that string.
A null string can be created by using the quo tation marks witho ut any spac e between them.
Config.System>
location Building_24_Room_16
location ""
Output
All o utput fro m the CLI commands is limited to the standard 80 c olumns supported b y mo st
Telnet interfaces. The output is left-justified.
10 Entering Command Line Interface Commands
Logging In and Logging Out
The Command Line Interface allo ws a single Telnet c lient to be c o nnected to the switc h. If
a Telnet client logs o ut, o r if after 15 minutes o f inactivity the client’s access times out,
another Telnet client may log in. Also note that the Telnet c lient ( user) must log in any time
the direc to r o r switch is restarted bec ause the current user’s access is lost. Examples of a
restart include an IPL and any po wer-off situatio n.
User Access Rights
The Command Line Interfac e suppo rts two use r ac c ess rights: Administrator and Operato r.
A user who logs in with Administrator acc ess rights can use all of the commands described
in this publication. However, Operator acc ess rights grant permissio n to use only the perf
and show branc hes o f the CLI command tree (fo r example , the perf.traffic and
show.system c o mmands), as well as the globally available co mmands (login, logout, and
commaDelim).
login
Syntax
login
Purpose
This command allows a Telnet client to co nnec t to the switch.
Introduction
Description
This command allows the user to lo g in with either Administrator or Operator acc ess
rights. The default passwords are password.
After the lo gin co mmand is issued, the Username: pro mpt automatic ally displays. After a
valid user name is entered, the Password: prompt automatically displays. After the
corresponding valid password is entered, the Root> prompt displays. At this prompt the
Logging In and Logging Out 11
user enters any of the commands included in Table 2, Command Line Interface Command
Tre e .
A user name and passwo rd can be set by the Administrato r thro ugh the
config.sec urity.userRights.administrator c ommand o r through the
config.se c urity.userRights.o perato r c o mmand.
The ac c ess rights chosen for the CLI are c o mpletely independent o f the o ther product
interfaces, fo r example, SNMP or HP pro duct interfac e s.
Parameters
This command has no parameters.
Co mmand E x amples
login
User name : Administrator
Pas swo rd: password
login
User name : Operator
Pas swo rd: password
12 Logging In and Logging Out
logout
Syntax
logout
Purpose
This command allows a Telnet client to disconnec t fro m the switch.
Description
This command logs out the single Telnet client co nnec ted to the switch. This c ommand c an
be entered at any point in the command tree.
Parameters
This command has no parameters.
Co mmand E x amples
Ro ot >
logout
Config> logout
Config.Port> logout
Introduction
Logging In and Logging Out 13
Using the commaDelim Command
Note that the o utput examples sho wn in the other sections of this publication presume that
commaDelim is off.
commaDelim
Syntax
commaDelim enable
Purpose
This command enables the user to obtain displayed information ( fro m a show c ommand)
in comma-delimited, rather than tabular, format. Tabular fo rmat is the default.
Description
This c o mmand c an be entered at any po int in the command tree.
Parame ter
This command has one parameter.
enable
Co mmand E x amples
Ro ot >
commaDelim true
Config> commaDelim true
Config.Port> commaDelim true
14 Using the commaDelim Co mmand
Specifies the comma-delineated state for output. Valid values are
and
false. Boolean 1 and 0 may be substituted as values.
true
Output Example
Output displayed in c ommaDelim mode is as fo llo ws:
Two types o f erro rs detec ted by the Co mmand Line Interfac e are:
•An error associated with the interface. For example, a keyword is misspelled or does
not exist.
confg
Ro ot >
Error 234: Invalid Command
•An error associated with fabric or switch issues. For example, a parameter error is
detected by the switch, where port 24 is entered for a switch that supports only 16 ports.
Ro ot >
config port name 24 "Port 24"
Error 13: Invalid Port Number
In either case, the command is ignored. The Command Line Interface remains at the po int
it was before the command was entered.
The erro r messages, inc luding error number and error, are listed in Appendix, Erro r
Messages.
16 Handling Command Line Interface Errors
Using the Command Line Interface Help
The question mark (?) c an be used within a command to obtain certain information:
•If the questio n mark is used in place o f a c o mmand keywo rd, all the ke ywords at that
level of the CLI co mmand tree display.
config system ?
Ro ot >
Command identified
contact - sets the system contact attribute
date - sets the system date and time
description - sets the system information string
location - sets the system location attribute
name - sets the system name attribute
show - displays the system configuration
•If the question mark is used at the end of a rec ognized command, any parameters for
that c o mmand display.
config port name ?
Ro ot >
- name <portNumber> <portName>
•If the question mark is used after one or more characters of a keyword, any keywords
at that level o f the CLI command tree display.
Introduction
config s?
Ro ot >
security snmp switch system
Using the Command Line Interface Help 17
Telnet Session
The CLI can only be used through a Telnet c lient session in an o ut-o f-band management
environment, using the Ethernet port in the directo r o r switc h. Although the primary use o f
the CLI is in ho st-based scripting environments, the CLI commands can also be entered
directly at a co mmand line. Any hardware platfo rm that supports the Telnet c lient software
can be used.
Ethernet Connection Loss
If the Ethernet cable is disco nnected from the director or switch during a Telnet sessio n,
one of three scenarios is possible:
•Replace the Ethernet c able before the c lient c onnec tio n times o ut, and the Telnet
session will continue.
•Wait 10 minutes fo r the client connection times out; then replac e the Ethernet c able and
restart the c o nne c tio n.
•If the client c o nnec tion has already timed o ut, open an HP Embedded Web Server (HP
EWS) or HP Surestore Director FC-64 Product Manager window. Toggle the enabled
state of the Command Line Interface (CLI), thereby clearing the client connection.
Restart the c lient connection.
Once the client connectio n is reestablished, verify your co nfiguration’s completeness and
accuracy.
18 Telnet Session
Loading...
+ 120 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.