|| Rate this content|
HP ProCurve Switch 2520 Series - CLI Commands
The CLI is a text-based command interface for configuring and monitoring the switch. The CLI gives access to the switch’s full set of commands while providing the same password protection that is used in the web browser interface and the menu interface.
Accessing the CLI
Like the menu interface, the CLI is accessed through the switch console in the switch’s factory default state. The switch’s factory default state is the default interface when console session is started. The console out-of-band can be accessed by directly connecting a terminal device to the switch, or in-band by using Telnet either from a terminal device or through the web browser interface.
CLI can be accessed by using the menu interface by selecting the Command Line (CLI) option in the Main Menu.
Using the CLI
The CLI offers these privilege levels to help protect the switch from unauthorized access:
NOTE: CLI commands are not case-sensitive.
When the CLI is used to make a configuration change, the switch writes the change to the Running-Config file in volatile memory. This helps to test the configuration changes before making them permanent. To make changes permanent, use the write memory command to save them to the Startup-Config file in non-volatile memory. If the switch is rebooted without first using write memory , all changes made since the last reboot or write memory (whichever is later) will be lost. For more information on switch memory and saving configuration changes, refer to the Switch Memory and Configuration chapter in the Management and Configuration Guide. Click here to go to the Management and Configuration Guide .
Privilege levels at logon
Privilege levels control the type of access to the CLI. To implement this control, the Manager password must be set. Without a Manager password configured, anyone having serial port, telnet, or web browser access to the switch can reach all CLI levels.
When you use the CLI to log on to the switch, and passwords are set, you will be prompted to enter a password. For example:
Figure 1: Example of CLI log-on screen with password(s) set
1 - Password prompt
In the above case, you will enter the CLI at the level corresponding to the password you provide (operator or manager).
If no passwords are set when you log onto the CLI, you will enter at the Manager level. For example:
CAUTION: ProCurve strongly recommends that you configure a Manager password. If a Manager password is not configured, then the Manager level is not password-protected, and anyone having in-band or out-of-band access to the switch may be able to reach the Manager level and compromise switch and network security. Configuring only an Operator password does not prevent access to the Manager level by intruders who have the Operator password.
Pressing the Clear button on the front of the switch removes password protection. For this reason, it is recommended that you protect the switch from physical access by unauthorized persons. If you are concerned about switch security and operation, you should install the switch in a secure location, such as a locked wiring closet.
For more information on privilege level operation refer to the Management and Configuration Guide. Click here to go to the Management and Configuration Guide .
CLI control and editing
Executing a prior command—Redo
The redo command executes a prior command in the history list.
Syntax : redo [number | command-str]
Figure 2: Example of the redo command
1 - Executes the show arp command again.
Repeating execution of a command
The repeat command executes a previous command in the history list.
Syntax : repeat [cmdlist] [count] [delay]
repeat : Repeats execution of a previous command. Repeats the last command by default until a key is pressed.
cmdlist : If a number or range of numbers is specified, the command repeats the nth most recent commands (where n is the position in the history list).
count : Repeats the command for the number of times specified.
delay : The command repeats execution after a delay for the number of seconds specified.
For example : ProCurve(config)# repeat 1-4,7-8,10 count 2 delay 3
CLI control and editing commands