This document describes the software features for the HP 5820X & 5800 Series products and guides you
through the software configuration procedures. These configuration guides also provide configuration
examples to help you apply software features to different network scenarios.
This documentation is intended for network planners, field technical support and servicing engineers, and
network administrators working with the HP 5820X & 5800 Series products.
Part number: 5998-1620
Software version: Release 1211
Document version: 6W10
t of this documentation may be reproduced or transmitted in any form or by any means without prior
written consent of Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained herein or for
incidental or consequential damages in connection with the furnishing, performance, or use of this material.
The only warranties for HP products and services are set forth in the express warranty statements
accompanying such products and services. Nothing herein should be construed as constituting an additional
warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
Contents
Configuring the CLI ······················································································································································ 1
Entering the CLI ································································································································································· 1
Command conventions ····················································································································································· 2
Undo form of a command ················································································································································ 3
CLI view description ·························································································································································· 3
Entering system view ················································································································································ 4
Exiting the current view ··········································································································································· 4
Returning to user view ·············································································································································· 4
Using online help ······························································································································································ 5
Entering commands ·························································································································································· 6
Redisplaying entered but not submitted commands ····························································································· 8
Checking command line errors ······································································································································· 9
Using command history ···················································································································································· 9
Accessing history commands ·································································································································· 9
Configuring the history buffer size ······················································································································ 10
Controlling the CLI display ············································································································································ 10
Filtering output information ·································································································································· 11
Configuring user privilege and command levels ········································································································ 14
Configuring a user privilege level ······················································································································· 15
Switching user privilege level ······························································································································· 18
Modifying the level of a command ····················································································································· 20
Saving the current configuration ·································································································································· 21
Displaying and maintaining CLI ··································································································································· 21
Users and user interfaces ·············································································································································· 23
Numbering user interfaces ··································································································································· 24
Logging in through the console port ···························································································································· 25
Configuring none authentication for console login ··························································································· 29
Configuring password authentication for console login ··················································································· 30
Configuring scheme authentication for console login ······················································································· 32
Configuring common settings for console login (optional) ··············································································· 35
Logging in through Telnet ·············································································································································· 36
Configuring none authentication for Telnet login ······························································································ 38
Configuring password authentication for Telnet login ······················································································ 40
Configuring scheme authentication for Telnet login ·························································································· 41
Configuring common settings for VTY user interfaces (optional)······································································ 44
Configuring the device to log in to a Telnet server as a Telnet client ······························································ 46
Logging in through SSH ················································································································································ 47
iii
Configuring the SSH server ·································································································································· 47
Configuring the SSH client to log in to the SSH server ····················································································· 50
Logging in through modems ········································································································································· 51
Configuring none authentication for modem login ···························································································· 55
Configuring password authentication for modem login ···················································································· 56
Configuring scheme authentication for modem login ······················································································· 58
Configuring common settings for modem login (optional) ················································································ 61
Displaying and maintaining CLI login ························································································································· 63
Web login ·································································································································································· 64
Overview········································································································································································· 64
Configuring HTTP login ················································································································································· 65
Configuring HTTPS login ··············································································································································· 66
Displaying and maintaining web login ······················································································································· 68
Web login example ······················································································································································· 68
HTTP login example ·············································································································································· 68
HTTPS login example ············································································································································ 69
Configuring SNMPv1 and SNMPv2c settings ··································································································· 73
Configuring SNMPv3 settings ······························································································································ 74
NMS login example ······················································································································································ 74
User login control ······················································································································································· 77
Overview········································································································································································· 77
Configuring login control over Telnet users ················································································································· 77
Configuring source IP-based login control over Telnet users ············································································ 77
Configuring source and destination IP-based login control over Telnet users ················································ 78
Configuring source MAC-based login control over Telnet users ······································································ 78
Source MAC-based login control configuration example ················································································· 79
Configuring source IP-based login control over NMS users ······················································································ 80
Configuring source IP-based login control over NMS users ············································································· 80
Source IP-based login control over NMS users configuration example ·························································· 81
Configuring source IP-based login control over web users ······················································································· 82
Configuring source IP-based login control over web users ··············································································· 82
Logging off online web users ······························································································································· 83
Source IP-based login control over web users configuration example ···························································· 83
Operation ······························································································································································· 84
Configuring the FTP client ············································································································································· 85
Establishing an FTP connection ···························································································································· 85
Operating FTP server directories ························································································································· 87
Operating FTP server files ···································································································································· 87
Using another username to log in to an FTP server ··························································································· 88
Maintaining and debugging an FTP connection ································································································ 89
Terminating an FTP connection ···························································································································· 89
FTP client configuration example ························································································································· 89
iv
FTP client configuration example ························································································································· 91
Configuring the FTP server ············································································································································ 92
Configuring FTP server operating parameters ··································································································· 92
Configuring authentication and authorization on the FTP server ····································································· 93
FTP server configuration example ························································································································ 94
FTP server configuration example ························································································································ 96
Displaying and maintaining FTP ··································································································································· 98
Displaying directory information ······················································································································· 106
Displaying the current working directory ·········································································································· 106
Changing the current working directory ··········································································································· 106
Creating a directory ············································································································································ 106
Removing a directory ·········································································································································· 106
Performing file operations ··········································································································································· 107
Displaying file information ································································································································· 107
Renaming a file···················································································································································· 107
Copying a file ······················································································································································ 107
Moving a file························································································································································ 107
Deleting a file ······················································································································································ 108
Restoring a file from the recycle bin ·················································································································· 108
Emptying the recycle bin ···································································································································· 108
Performing batch operations ······································································································································· 108
Performing storage media operations ······················································································································· 109
Managing storage media space ······················································································································· 109
Displaying and maintaining the NAND flash memory ··················································································· 109
Setting prompt modes ·················································································································································· 110
File operation example ················································································································································ 111
Types of configuration ········································································································································ 112
Configuration file format and content ··············································································································· 113
Coexistence of multiple configuration files ······································································································· 113
Startup with the configuration file ······················································································································ 114
Saving the running configuration ······························································································································· 114
Selecting save mode for the configuration file ································································································· 114
Setting configuration rollback ····································································································································· 117
Configuration task list ········································································································································· 117
Configuring parameters for saving the running configuration ······································································· 118
Enabling automatic saving of the running configuration ················································································ 119
Manually saving the running configuration ······································································································ 120
Setting configuration rollback ···························································································································· 120
Specifying a startup configuration file to be used at the next system startup ························································ 121
v
Backing up the startup configuration file ··················································································································· 121
Deleting a startup configuration file to be used at the next startup ········································································ 122
Restoring a startup configuration file ························································································································· 122
Displaying and maintaining a configuration file ······································································································ 123
Overview······································································································································································· 124
Software upgrade methods ········································································································································· 125
Upgrading the boot ROM program through a system reboot················································································· 126
Upgrading the boot file through a system reboot ····································································································· 127
Upgrading IRF member switch boot file ···················································································································· 128
Software upgrade by installing hotfixes ···················································································································· 129
Patch and patch file ············································································································································ 129
Patch status ··························································································································································· 129
Step-by-step patch uninstallation ························································································································ 134
Displaying and maintaining the software upgrade ·································································································· 134
Software upgrade configuration examples ··············································································································· 134
Immediate upgrade configuration example ····································································································· 134
Hotfix configuration example ····························································································································· 136
ISSU process ························································································································································ 139
Boot file version rollback ···································································································································· 140
Configuring ISSU ························································································································································· 141
Configuration task list ········································································································································· 141
Prerequisites for performing ISSU ······················································································································ 141
Enabling version compatibility check ················································································································ 142
Overview······································································································································································· 157
Configuring the device name ····································································································································· 157
Configuring the system clock ······································································································································ 157
Displaying the system clock ······························································································································· 158
Enabling the display of copyright information ·········································································································· 161
Configuring banners ···················································································································································· 161
Banner configuration example ··························································································································· 162
Configuring the exception handling method ············································································································ 163
Rebooting the device ··················································································································································· 163
Configuring scheduled tasks ······································································································································· 165
Configuring a scheduled task—Approach 1 ··································································································· 165
vi
Configuring a scheduled task—Approach 2 ··································································································· 166
Configuring the fan ventilation direction ··················································································································· 167
Configuring the detection timer ·································································································································· 167
Configuring temperature alarm thresholds for a member device ··········································································· 167
Clearing the 16-bit interface indexes not used in the current system ····································································· 169
Identifying and diagnosing pluggable transceivers ································································································· 169
Overview······································································································································································· 173
Typical automatic configuration network ·················································································································· 173
How automatic configuration works ·························································································································· 174
Work flow ···························································································································································· 174
Using DHCP to obtain an IP address and other configuration information ·················································· 175
Obtaining the configuration file from the TFTP server ····················································································· 176
Executing the configuration file ·························································································································· 178
Support and other resources ·································································································································· 179
Contacting HP ······························································································································································ 179
Subscription service ············································································································································ 179
Related information ······················································································································································ 179
Index ········································································································································································ 182
vii
Configuring the CLI
CLI enables you to interact with your device by typing text commands. At the CLI, instruct your device to
perform a given task by typing a text command and then pressing Enter. Compared with the graphical user
interface (GUI) where you can use a mouse to perform configurations, the CLI allows you to enter more
information in one command line.
Figure 1 CLI example
Entering the CLI
HP devices provide multiple methods for entering the CLI, such as through the console port, through Telnet,
or through SSH. For more information, see “Login methods.”
1
Command conventions
p
Command conventions help you understand command meanings. Commands in HP product manuals
comply with the conventions listed in Table 1.
Table 1 Command conventions
Convention Descri
Boldface Bold text represents commands and keywords you enter literally as shown.
ItalicItalic text represents arguments you replace with actual values.
[ ] Square brackets enclose syntax choices (keywords or arguments) that are optional.
{ x | y | ... }
[ x | y | ... ]
{ x | y | ... } *
[ x | y | ... ] *
&<1-n>
# A line that starts with a pound (#) sign is comments.
Braces enclose a set of required syntax choices separated by vertical bars, from which
you select one.
Square brackets enclose a set of optional syntax choices separated by vertical bars, from
which you select one or none.
Asterisk marked braces enclose a set of required syntax choices separated by vertical
bars, from which you select at least one.
Asterisk marked square brackets enclose optional syntax choices separated by vertical
bars, from which you select one choice, multiple choices, or none.
The argument or keyword and argument combination before the ampersand (&) sign can
be entered 1 to n times.
tion
NOTE:
The keywords of HP command lines are case insensitive.
Use clock datetimetime date as an example to understand the meaning of the command line parameters
according to Figure 2.
Figure 2 Read command line parameters
For example, enter the following at the CLI of your device and press Enter to set the device system time to 10
o’clock 30 minutes 20 seconds, February 23, 2010.
<sysname> clock datetime 10:30:20 2/23/2010
Read any command that is more complicated by referring to Table 1.
2
Undo form of a command
The undo form of a command restores the default, disables a function, or removes a configuration.
Almost all configuration commands have an undo form. For example, info-center enable enables the
information center and undo info-center enable disables the information center.
CLI view description
Commands are grouped into different classes by function. To use a command, you must enter the class view
of the command.
CLI views adopt a hierarchical structure. See Figure 3.
• A
ter logging in to the switch, you are in user view. The prompt of user view is <device name>. In user
f
view, perform display, debugging, and file management operations, set the system time, restart your
device, and perform FTP and Telnet operations.
• Enter system view from user view. In system view, configure parameters such as daylight saving time,
banners, and short-cut keys.
• From system view, enter different function views. For example, enter interface view to configure interface
parameters, create a VLAN and enter its view, enter user interface view to configure login user
attributes, create a local user and enter local user view to configure the password and level of the local
user, and enter OSPF view to configure OSPF parameters.
NOTE:
Enter ? in any view to display all commands that can be executed in this view.
Figure 3 Command line views
……
3
Entering system view
p
When you log in to the device, you automatically enter user view, where <Device name> is displayed.
Perform limited operations in user view, for example, display operations, file operations, and Telnet
operations.
To perform further configuration for the device, enter system view.
Step Command
1. Enter system view from user
view.
Exiting the current view
The CLI is divided into different command views. Each view has a set of specific commands and defines the
effective scope of the commands. The commands available to you at any given time depend on the view you
are in.
Follow the step below to exit the current view:
Task Command
1. Return to the parent view from the
current view.
In public key code view, use public-key-code end to return to the parent view (public key view).
In public key view, use peer-public-key end to return to system view.
system-view
quit
Remarks
Required
Available in user view
Remarks
Required.
Available in any view.
In user view, quit stops the current connection
between the terminal and the device.
Returning to user view
This feature allows you to return to user view from any other view, without using quit command repeatedly.
Alternately, press Ctrl+Z to return to user view from the current view.
Follow the step below to exit to user view:
Ste
Command
1. Return to user view.
return
Remarks
Required.
Available in any view except user view.
4
Using online help
Enter a question mark (?) to obtain online help. See the following examples.
1. Enter ? in any view to display all commands available in this view and brief descriptions of these
commands. For example:
<sysname> ?
User view commands:
archive Specify archive settings
backup Backup next startup-configuration file to TFTP server
boot-loader Set boot loader
bootrom Update/read/backup/restore bootrom
cd Change current directory
…Omitted…
2. Enter part of a command and a ? separated by a space.
If ? is at the position of a keyword, the CLI displays all possible keywords with a brief description for
each keyword. For example:
<sysname> terminal ?
debugging Send debug information to terminal
logging Send log information to terminal
monitor Send information output to current terminal
trapping Send trap information to terminal
If ? is at the position of an argument, the CLI displays a description about this argument. For example:
Table 2 lists some shortcut keys you can use to edit command lines.
Table 2 Editing functions
Ke
Function
Common keys
Backspace
Left arrow key or Ctrl+BThe cursor moves one character space to the left.
Right arrow key or Ctrl+FThe cursor moves one character space to the right.
Tab
If the edit buffer is not full, pressing a common key inserts the character at the
position of the cursor and moves the cursor to the right.
Deletes the character to the left of the cursor and moves the cursor back one
character.
If you press Tab after entering part of a keyword, the system automatically
completes the keyword:
• If finding a unique match, the system substitutes the complete keyword for
the incomplete one and displays it in the next line.
• If there is more than one match, press Tab repeatedly to view in cycles all
keywords starting with the character string you entered.
• If there is no match, the system does not modify the incomplete keyword
and displays it again in the next line.
Entering incomplete keywords
Enter a command comprising incomplete keywords that uniquely identify the complete command.
In user view, for example, commands starting with an s include startup saved-configuration and system-view.
• To enter system view, enter sy.
• To set the configuration file for next startup, enter st s.
Press Tab to have an incomplete keyword automatically completed.
Configuring command aliases
The command alias function allows you to replace the first keyword of a command with your preferred
keyword. For example, if you configure show as the replacement for the display keyword, then to run display xx, enter the command alias show xx.
The following guidelines apply when configuring a command alias:
• Define and use a command alias. The command is not restored in its alias format.
• When you define a command alias, the cmdkey and alias arguments must be in their complete form.
• When you enter an incomplete keyword that partially matches both a defined alias and the keyword of
a command, the alias takes effect. To execute the command whose keyword partially matches your
entry, enter the complete keyword. When you enter a character string that partially matches multiple
aliases, the system gives you prompts.
6
•If you press Tab after you enter the keyword of an alias, the original format of the keyword is displayed.
p
• Replace only the first keyword of a non-undo command instead of the complete command; and replace
only the second keyword of undo commands.
To configure command aliases:
Ste
Command
Remarks
1. Enter system view.
2. Enable the command alias
function.
3. Configure a command alias.
Configuring CLI hotkeys
Step Command
1. Enter system view. system-view —
hotkey { CTRL_G |
2. Configure CLI
hotkeys.
3. Display hotkeys. display hotkey
CTRL_L | CTRL_O |
CTRL_T | CTRL_U } command
system-view —
Required
command-alias enable
command-alias mapping
cmdkey alias
Disabled by default, which means you
cannot configure command aliases.
Required
Not configured by default.
Remarks
Optional
By default, the Ctrl+G, Ctrl+L and Ctrl+O hotkeys
are associated with pre-defined commands and
the Ctrl+T and Ctrl+U hotkeys are not.
•
Ctrl+G corresponds to display
current-configuration.
• Ctrl+L corresponds to display ip routing-table.
• Ctrl+O corresponds to undo debugging all.
Available in any view.
See Table 3 for hotkeys reserved by the system.
Table 3 Hotkeys reserved by the system
The hotkeys in this table above are defined by the switch. If the same hotkeys are defined by the terminal
software you use to interact with the switch, the hotkeys defined by the terminal software take effect.
Hotkey Function
Ctrl+A Moves the cursor to the beginning of the current line.
Ctrl+B Moves the cursor one character to the left.
Ctrl+C Stops performing a command.
Ctrl+D Deletes the character at the current cursor position.
Ctrl+E Moves the cursor to the end of the current line.
Ctrl+F Moves the cursor one character to the right.
Ctrl+H Deletes the character to the left of the cursor.
Ctrl+K Terminates an outgoing connection.
Ctrl+N Displays the next command in the history command buffer.
7
Hotkey Function
Ctrl+P Displays the previous command in the history command buffer.
Ctrl+R Redisplays the current line information.
Ctrl+V Pastes the content in the clipboard.
Ctrl+W Deletes all characters in a continuous string to the left of the cursor.
Ctrl+X Deletes all characters to the left of the cursor.
Ctrl+Y Deletes all characters to the right of the cursor.
Ctrl+Z Exits to user view.
Ctrl+] Terminates an incoming connection or a redirect connection.
Esc+B Moves the cursor to the leading character of the continuous string to the left.
Esc+D
Esc+F Moves the cursor to the front of the next continuous string to the right.
Esc+N Moves the cursor down by one line (available before you press Enter)
Esc+P Moves the cursor up by one line (available before you press Enter)
Esc+< Specifies the cursor as the beginning of the clipboard.
Esc+> Specifies the cursor as the ending of the clipboard.
Deletes all characters of the continuous string at the current cursor position and to
the right of the cursor.
Redisplaying entered but not submitted commands
If your command input is interrupted by output system information, use this feature to redisplay the previously
entered but not submitted commands.
If you have no input at the command line prompt and the system outputs system information such as logs, the
system will not display the command line prompt after the output.
If the system outputs system information when you are typing interactive information (not YES/NO for
confirmation), the system will not redisplay the prompt information but a line break after the output and then
display what you have entered.
To enable redisplaying of entered but not submitted commands:
Step Command Remarks
1. Enter system view.
2. Enable redisplaying of
entered but not submitted
commands.
system-view —
Required.
Disabled by default.
info-center synchronous
8
For more information about info-center
synchronous, see Network Management and
Monitoring Configuration Guide.
Checking command line errors
If a command contains syntax errors, the CLI reports error information.
Table 4 Common command line errors
Error information Cause
% Unrecognized command found at '^' position. The command was not found.
% Incomplete command found at '^' position. Incomplete command
% Ambiguous command found at '^' position. Ambiguous command
Too many parameters Too many parameters
% Wrong parameter found at '^' position. Wrong parameters
Using command history
The CLI automatically saves the commands recently used in the history command buffer. Access and execute
them again.
Accessing history commands
Task Command
Display history commands.
Display the previous history
command.
Display the next history command.
NOTE:
Use arrow keys to access history commands in Windows 200X and XP Terminal or Telnet. However, the
up and down arrow keys are invalid in Windows 9X HyperTerminal, because they are defined differently.
Use Ctrl+P or Ctrl+N instead.
• The commands saved in the history command buffer are in the same format in which you entered the
commands. If you enter an incomplete command, the command saved in the history command buffer
is also an incomplete one.
• If you execute the same command repeatedly, the switch saves only the earliest record. However, if you
execute the same command in different formats, the system saves them as different commands. For
example, if you run display cu repeatedly, the system saves only one command in the history command
buffer. If you execute the command in the format of display cu and display current-configuration
respectively, the system saves them as two commands.
display historycommand
Up arrow key or
Ctrl+P
Down arrow key or
Ctrl+N
Result
Displays valid history commands you used.
Displays the previous history command, if any.
Displays the next history command, if any.
• By default, the CLI can save up to 10 commands for each user. To set the capacity of the history
command buffer for the current user interface, use history-command max-size. (For more information
about history-command max-size, see “Logging in to the switch commands.”
Set the maximum number of
commands that can be saved in the
history buffer
history-commandmax-sizesize-value
NOTE:
For more information about user-interface and history-commandmax-size, see “Logging in to the switch
commands.”
Controlling the CLI display
Multi-screen display
Controlling multi-screen display
If the output information spans multiple screens, each screen pauses after it is displayed. Perform one of the
following operations to proceed.
Action Function
Press SpaceDisplays the next screen.
Press EnterDisplays the next line.
Optional
By default, the history buffer can
save up to 10 commands.
Press Ctrl+CStops the display and the command execution.
Press <PageUp> Displays the previous page.
Press <PageDown> Displays the next page.
By default, each screen displays up to 24 lines. To change the maximum number of lines displayed on the
next screen, use screen-length. For more information about screen-length, see “Logging in to the switch
commands.”
10
Disabling multi-screen display
p
Use the following command to disable the multi-screen display function. All of the output information is
displayed at one time and the screen is refreshed continuously until the last screen is displayed.
Ste
Command
Disable the multi-screen display
function
screen-length disable
Filtering output information
Use regular expressions in display commands to filter output information.
Remarks
Required
By default, a login user uses the
settings of the screen-length. The
default settings of the screen-length
command are: multiple-screen
display is enabled and up to 24
lines are displayed on the next
screen.
This command is executed in user
view, and takes effect for the current
user only. When the user re-logs into
the switch, the default configuration
is restored.
The following methods are available for filtering output information:
•Enter the begin, exclude, or include keyword plus a regular expression in the display to filter the output
information.
• When the system displays the output information in multiple screens, use the slash (/), hyphen (-), or plus
(+) with a regular expression to filter subsequent output information. The slash character (/) equals the
keyword begin, the character hyphen (-) equals the keyword exclude, and the character plus (+) equals
the keyword include.
The following definitions apply to the begin, exclude, and include keywords:
• begin: Displays the first line that matches the specified regular expression and all lines that follow.
• exclude: Displays all lines that do not match the specified regular expression.
• include: Displays all lines that match the specified regular expression.
11
A regular expression is a case-sensitive string of 1 to 256 characters. It supports the following special
g
characters.
Character Meanin
^string
string$
.
*
+
|
_
Starting sign. string appears only at
the beginning of a line.
Ending sign. string appears only at
the end of a line.
Matches any single character, such
as a single character, a special
character, and a blank.
Matches the preceding character or
character group zero or multiple
times.
Matches the preceding character or
character group one or multiple
times
Matches the preceding or
succeeding character string
If it is at t he beg i nning or t he end of a
regular expression, it equals ^ or $.
In other cases, it equals comma,
space, round bracket, or curly
bracket.
Remarks
For example, regular expression “^user” only
matches a string beginning with “user," not
“Auser."
For example, regular expression "user$” only
matches a string ending with “user," not “userA."
For example, “.s” matches “as” and “bs."
For example, “zo*” matches “z” and “zoo”;
“(zo)*” matches “zo” and “zozo."
For example, “zo+” matches “zo” and “zoo," but
not “z."
For example, “def|int” only matches a character
string containing “def” or “int."
For example, “a_b” matches “a b” or “a(b”; “_ab”
only matches a line starting with “ab”; “ab_” only
matches a line ending with “ab."
-
[ ]
()
\index
It connects two values (the smaller
one before it and the bigger one
after it) to indicate a range together
with [ ].
Matches a single character
contained within the brackets.
A character group. It is usually used
with “+” or “*."
Repeats the character string
specified by the index. A character
string refers to the string within ()
before \. index refers to the
sequence number (starting from 1
from left to right) of the character
group before \. If only one character
group appears before \, index can
only be 1; if n character groups
appear before index, index can be
any integer from 1 to n.
For example, “1-9” means 1 to 9 (inclusive); “a-h”
means a to h (inclusive).
For example, [16A] matches a string containing
any character among 1, 6, and A; [1-36A] matches
a string containing any character among 1, 2, 3, 6,
and A (- is a hyphen).
“]” can be matched as a common character only
when it is put at the beginning of characters within
the brackets, for example [ ]string]. There is no such
limit on “[."
For example, (123A) means a character group
“123A”; “408(12)+” matches 40812 or
408121212. But it does not match 408.
For example, (string)\1 repeats string, and a
matching string must contain stringstring.
(string1)(string2)\2 repeats string2, and a
matching string must contain string1string2string2.
(string1)(string2)\1\2 repeats string1 and string2
respectively, and a matching string must contain
string1string2string1string2.
12
Character Meaning Remarks
For example, [^16A] means to match a string
containing any character except 1, 6 or A, and the
[^]
Matches a single character not
contained within the brackets.
matching string can also contain 1, 6 or A, but
cannot contain these three characters only. For
example, [^16A] matches “abc” and “m16," but
not 1, 16, or 16A.
\<string
string\>
Matches a character string starting
with string.
Matches a character string ending
with string.
Matches character1character2.
\bcharacter2
character1 can be any character
except number, letter or underline,
and \b equals [^A-Za-z0-9_].
Matches a string containing
\Bcharacter
character and no space is allowed
before character.
Matches character1character2.
character1\w
character2 must be a number, letter,
or underline, and \w equals
[^A-Za-z0-9_].
\W Equals \b.
Escape character. If a special
\
character listed in this table follows
\, the specific meaning of the
character is removed.
For example, “\<do” matches word “domain” and
string “doa."
For example, “do\>” matches word “undo” and
string “abcdo."
For example, “\ba” matches “-a” with “-“ being
character1, and “a” being character2, but it does
not match “2a” or “ba."
For example, “\Bt” matches “t” in “install," but not
“t” in “big top."
For example, “v\w” matches “vlan," with “v” being
character1, and “l” being character2. v\w also
matches “service," with “i” being character2.
For example, “\Wa” matches “-a," with “-” being
character1, and “a” being character2, but does not
match “2a” or “ba."
For example, “\\” matches a string containing “\,"
“\^” matches a string containing “^," and “\\b”
matches a string containing “\b."
13
Example of filtering output information
g
1. Example of using the begin keyword
# Display the configuration from the line containing “user-interface” to the last line in the current
configuration (the output information depends on the current configuration).
<Sysname> display current-configuration | begin user-interface
user-interface aux 0
user-interface vty 0 15
authentication-mode none
user privilege level 3
#
return
2. Example of using the exclude keyword
# Display the non-direct routes in the routing table (the output depends on the current configuration).
<Sysname> display ip routing-table | exclude Direct
Routing Tables: Public
Destination/Mask Proto Pre Cost NextHop Interface
10.1.1.0/24 OSPF 10 2 10.1.1.2 Vlan2
3. Example of using the include keyword
# Display the route entries that contain Vlan in the routing table (the output depends on the current
configuration).
<Sysname> display ip routing-table | include Vlan
Routing Tables: Public
Destination/Mask Proto Pre Cost NextHop Interface
192.168.1.0/24 Direct 0 0 192.168.1.42 Vlan999
Configuring user privilege and command levels
To avoid unauthorized access, the switch defines user privilege levels and command levels. User privilege
levels correspond to command levels. When a user at a specific privilege level logs in, the user can only use
commands at that level, or lower levels.
All commands are categorized into four levels: visit, monitor, system, and manage, and are identified from
low to high, respectively by 0 through 3. Table 2 de
Table 2 Default command levels
Level Privile
0 Visit
e Description
Involves commands for network diagnosis and accessing an external device.
Configuration of commands at this level cannot survive a device restart. Upon
device restart, the commands at this level are restored to the default settings.
Commands at this level include ping, tracert, telnet and ssh2.
scribes the command levels.
14
Level Privilege Description
p
Involves commands for system maintenance and service fault diagnosis.
Commands at this level are not allowed to be saved after being configured. After
1 Monitor
2 System
3 Manage
the switch is restarted, the commands at this level are restored to the default
settings.
Commands at this level include debugging, terminal, refresh, reset, and send.
Involves service configuration commands, such as routing configuration
commands and commands for configuring services at different network levels.
By default, commands at this level include all configuration commands except for
those at the manage level.
Involves commands that influence the basic operation of the system and
commands for configuring system support modules.
By default, commands at this level involve the configuration commands of file
system, FTP, TFTP, Xmodem download, user management, level setting, and
parameter settings within a system (which are not defined by any protocols or
RFCs).
Configuring a user privilege level
A user privilege level can be configured by using AAA authentication parameters or under a user interface.
Configuring user privilege level by using AAA authentication parameters
If the authentication mode of a user interface is scheme, the user privilege level of users logging into the user
interface is specified in AAA authentication configuration.
To configure the user privilege level by using AAA authentication parameters:
Ste
Command
Enter system view system-view —
user-interface { first-num1
Enter user interface view
Specify the scheme authentication
mode
Return to system view quit —
Configure the authentication mode
for SSH users as password
Configure the
user privilege
level by using
AAA
authentication
Using local
authentication
[ last-num1 ] | { aux | vty }
first-num2 [ last-num2 ] }
authentication-mode scheme
For more information about SSH,
see Security Configuration Guide.
• Use local-user to create a local
user and enter local user view.
•Use level keyword in the
authorization-attribute to
configure the user privilege
level.
Remarks
—
Required
By default, the authentication
mode for VTY users is password,
and no authentication is needed
for AUX login user.
Required if users use SSH to log in,
and username and password are
needed at authentication
Use either approach
• For local authentication, if you
do not configure the user
privilege level, the user
privilege level is 0.
15
Step Command
p
parameters
Using remote
authentication
(RADIUS,
HWTACACS,
and LDAP
authentications)
Configure the user privilege level
on the authentication server
Remarks
• For remote authentication, if
you do not configure the user
privilege level, the user
privilege level depends on the
default configuration of the
authentication server.
Example of configuring a user privilege level by using AAA authentication parameters
# You are required to authenticate the users that Telnet to the switch through VTY 1, verify their username and
password, and specify the user privilege level as 3.
When users Telnet to the switch through VTY 1, they must enter username test and password 12 34 5 678 . After
passing the authentication, the users can only use the commands of level 0. If the users want to use
commands of levels 0, 1, 2 and 3, the following configuration is required:
Configuring the user privilege level under a user interface
•If the authentication mode of a user interface is scheme, and SSH publickey authentication type (only a
username is needed for this authentication type) is adopted, the user privilege level of users logging
into the user interface is the user interface level.
• If the authentication mode of a user interface is none or password, the user privilege level of users
logging into the user interface is the user interface level.
To configure the user privilege level under a user interface (SSH publickey authentication type):
Ste
Command
Configure the authentication type
for SSH users as publickey
Enter system view system-view —
Enter user interface view
Configure the authentication mode
for any user who uses the current
user interface to log in to the switch
For more information about SSH,
see Security Configuration Guide.
Required if the SSH login mode is
adopted, and only username is
needed during authentication.
After the configuration, the
authentication mode of the
corresponding user interface must
be set to scheme.
—
Required
By default, the authentication
mode for VTY users is password,
and no authentication is needed
for AUX users.
16
Step Command
p
Configure the privilege level for
users that log in through the current
user interface
user privilege level level
Remarks
Optional
By default, the user privilege level
for users logged in through the
AUX user interface is 3, and that
for users logged in through the VTY
interfaces is 0.
To configure the user privilege level under a user interface (none or password authentication mode):
Ste
Command
Enter system view system-view —
user-interface { first-num1
Enter user interface view
Configure the authentication mode
for any user who uses the current
user interface to log in to the switch
Configure the privilege level of
users logged in through the current
user interface
[ last-num1 ] | { aux | vty }
first-num2 [ last-num2 ] }
authentication-mode { none |
password }
user privilege level level
Remarks
—
Optional
By default, the authentication
mode for VTY user interfaces is
password, and no authentication is
needed for AUX login user.
Optional
By default, the user privilege level
for users logged in through the
AUX user interface is 3, and that
for users logged in through the VTY
interfaces is 0.
Example of configuring a user privilege level under a user interface
# Authenticate users logged in to the switch through Telnet, verify their password, and specify their user
privilege level as 2.
By default, Telnet users can use the commands of level 0 after passing authentication. After the configuration
above is completed, when users log in to the switch through Telnet, they must enter password 12 3 , and then
they can use commands of levels 0, 1, and 2.
NOTE:
• For more information about user interfaces, see “Logging in to the switch configuration.” For more
information about user-interface, authentication-mode, and user privilege level, see “Logging in to
the switch commands.”
• For more information about AAA authentication, see Security Configuration Guide. For more
information about local-user and authorization-attribute, see Security Command Reference.
• For more information about SSH, see Security Configuration Guide.
17
Switching user privilege level
g
Users can switch to a different user privilege level temporarily without logging out and terminating the current
connection. After the privilege level switch, users can continue to configure the switch without the must re-log
in, but the commands that they can execute have changed. For example, if the current user privilege level is
3, the user can configure system parameters. After switching to user privilege level 0, the user can only
execute simple commands, like ping and tracert, and only a few display commands. The switching
operation is effective for the current login. After the user relogs in, the user privilege restores to the original
level.
• To avoid problems, HP recommends that administrators log in to the switch by using a lower privilege
level and view switch operating parameters, and when they have to maintain the switch, they can
switch to a higher level temporarily
• If the administrators need to leave for a while or ask someone else to manage the switch temporarily,
they can switch to a lower privilege level before they leave to restrict the operation by others.
Setting the authentication mode for user privilege level switch
CAUTION:
• If no user privilege level is specified when you configure the password for switching the user privilege
level with super password, the user privilege level defaults to 3.
• If you specify the simple keyword, the password is saved in the configuration file in plain text, which is
easy to be stolen. If you specify the cipher keyword, the password is saved in the configuration file in
cipher text, which is safer.
• If the user logs in from the AUX user interface (the console port), the user can switch the privile
e level
to a higher level even if the authentication mode is local and no password for user privilege level switch
is configured.
• A user can switch to a privilege level equal to or lower than the current one unconditionally and is not
required to enter a password (if any).
• For security, a user is required to enter the password (if any) to switch to a higher privilege level. The
authentication falls into one of the following four categories:
Authentication
mode
local
scheme
Meaning Description
The switch authenticates a user by using the privilege level switch
Local password
authentication
Remote AAA
authentication
through
HWTACACS or
RADIUS
password entered by the user.
When this mode is applied, you must set the password for privilege
level switch with super password.
The switch sends the username and password for privilege level
switch to the HWTACACS or RADIUS server for remote
authentication.
When this mode is applied, you must perform the following
configurations:
• Configure HWTACACS or RADIUS scheme and reference the
created scheme in the ISP domain. For more information, see
Security Configuration Guide.
• Create the corresponding user and configure password on the
HWTACACS or RADIUS server.
18
Authentication
p
g
p
mode
Meaning Description
local scheme
scheme local
Performs the local
password
authentication first
and then the
remote AAA
authentication
Performs remote
AAA
authentication first
and then the local
password
authentication
The switch authenticates a user by using the local password first. If
no local password is set, the privilege level is switched directly for
the users logged in from the Console port, and remote AAA
authentication is performed on the users logged in from VTY user
interfaces.
AAA authentication is performed first, and if the remote
HWTACACS or RADIUS server does not respond or AAA
configuration on the switch is invalid, the local password
authentication is performed.
To set the authentication mode for user privilege level switch:
Ste
Command
Enter system view system-view —
Set the authentication mode for
user privilege level switch
Configure the password for user
privilege level switch
Required if the authentication
mode is set to local.
By default, no privilege level switch
password is configured.
Switching the user privilege level
CAUTION:
• When the authentication mode is set to local, configure the local password before switching to a hi
user privilege level.
• When the authentication mode is set to scheme, configure AAA related parameters before switching to
a higher user privilege level.
• The privilege level switch fails after three consecutive unsuccessful password attempts.
• For more information about user interface authentication, see “Logging in to the switch configuration.”
Follow the step to switch the user privilege level:
Ste
Command
Switch the user privilege level super [ level ]
her
Remarks
Required
When logging in to the switch, a
user has a user privilege level,
which depends on user interface or
authentication user level.
Available in user view.
19
When you switch the user privilege level, the information you must provide varies with combinations of the
user interface authentication mode and the super authentication mode.
Table 3 Information input for user privilege level switch
User interface
authentication
mode
none/password
User privilege level
switch
authentication
mode
local
local scheme
scheme
scheme local
local
local scheme
Information entered for
the first authentication
mode
Local user privilege level
switch password (configured
on the switch)
Local user privilege level
switch password
Username and password for
privilege level switch
Username and password for
privilege level switch
Local user privilege level
switch password
Local user privilege level
switch password
Information entered after the
authentication mode changes
—
Username and password for
privilege level switch (configured
on the AAA server)
—
Local user privilege level switch
password
—
Password for privilege level
switch (configured on the AAA
server). The system uses the
username used for logging in as
the privilege level switch
username.
Password for privilege level
scheme
scheme
scheme local
switch (configured on the
AAA server). The system uses
the username used for
logging in as the privilege
level switch username.
Password for privilege level
switch (configured on the
AAA server). The system uses
the username used for
logging in as the privilege
level switch username.
Modifying the level of a command
CAUTION:
HP recommends using the default command level or modify the command level under the guidance of
professional staff. An improper change of the command level may bring inconvenience to your
maintenance and operation, or even potential security problems.
All commands in a view default to different levels. The administrator can change the default level of a
command to a lower level or a higher level as needed.
—
Local user privilege level switch
password
20
To modify the command level:
p
Ste
Command
Enter system view system-view —
Remarks
Configure the command level in a
specified view
command-privilege level level view
view command
Saving the current configuration
On the device, enter the save command in any view to save all submitted and executed commands into the
configuration file. Commands saved in the configuration file can survive a reboot. The save command does
not take effect on one-time commands, such as display commands, which display specified information, and
reset commands, which clear specified information. The one-time commands executed are never saved.
Displaying and maintaining CLI
Task Command Remarks
Display defined command aliases and
the corresponding commands.
Display the clipboard information.
display command-alias [ | { begin |
exclude | include } regular-expression ]
display clipboard [ | { begin | exclude |
include } regular-expression ]
Required
See Table 1 for the default settings.
Available in any view
Available in any view
21
g
Login methods
Log in to the switch by using the following methods.
Table 4 Login methods
Lo
in method Default state
CLI login
Logging in
through the
console po
Logging in
through Telnet
Logging in
through SSH
Logging in
through modems
rt
By default, log in to a device through the console port, the
authentication mode is None (no username or password required),
and the user privilege level is 3.
By default, you cannot log in to a device through Telnet. To do so, log
in to the device through the console port, and complete the following
configuration:
• Enable the Telnet function.
• Configure the IP address of the VLAN interface, and make sure that
your device and the Telnet client can reach each other (by default,
the device does not have an IP address.).
• Configure the authentication mode of VTY login users (password
by default).
• Configure the user privilege level of VTY login users (0 by default).
By default, you cannot log in to a device through SSH. To do so, log
in to the device through the console port, and complete the following
configuration:
• Enable the SSH function and configure SSH attributes.
• Configure the IP address of the VLAN interface, and make sure that
your device and the SSH client can reach each other (by default,
your device does not have an IP address.).
• Configure the authentication mode of VTY login users as scheme
(password by default).
• Configure the user privilege level of VTY login users (0 by default).
By default, log in to a device through modems. The default user
privilege level of modem login users is 3.
Web login
By default, you cannot log in to a device through web. To do so, log
in to the device through the console port, and complete the following
configuration:
• Configure the IP address of the VLAN interface (by default, your
device does not have an IP address.).
• Configure a username and password for web login (not configured
by default).
• Configure the user privilege level for web login (not configured by
default).
• Configure the Telnet service type for web login (not configured by
default).
22
Login method Default state
By default, you cannot log in to a device through a network
management station (NMS). To do so, log in to the device through the
console port, and complete the following configuration:
NMS login
• Configure the IP address of the VLAN interface, and make sure the
device and the NMS can reach each other (by default, your device
does not have an IP address.).
• Configure SNMP basic parameters.
Users and user interfaces
User interface, also called “line," allows you to manage and monitor sessions between the terminal and
device when you log in to the device through the console port directly, or through Telnet or SSH.
One user interface corresponds to one user interface view where you can configure a set of parameters, such
as whether to authenticate users at login, whether to redirect the requests to another device, and the user
privilege level after login. When the user logs in through a user interface, the parameters set for the user
interface apply.
The system supports the following CLI configuration methods:
• Local configuration via the console port
• Local/Remote configuration through Telnet or SSH
The methods correspond to the following user interfaces.
• AUX user interface: Used to manage and monitor users that log in via the Console port. The type of the
Console port is EIA/TIA-232 DCE.
• VTY (virtual type terminal) user interface: Used to manage and monitor users that log in via VTY. A VTY
port used for Telnet or SSH access.
Only one user can use a user interface at a time. The configuration made in a user interface view applies to
any login user. For example, if user A uses the console port to log in, the configuration in the AUX user
interface view applies to user A; if user A logs in through VTY 1, the configuration in VTY 1 user interface
view applies to user A.
A device can be equipped with one AUX user interface and 16 VTY user interfaces. These user interfaces do
not associate with specific users. When a user initiates a connection request, the system automatically
assigns an idle user interface with the smallest number to the user based on the login method. During the
login, the configuration in the user interface view takes effect. The user interface varies depending on the
login method and the login time.
23
Loading...
+ 170 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.