Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Table of Contents

Table of Contents

Chapter 1 Basic Configurations...... 1-1 1.1 Basic Configurations...... 1-1 1.1.1 Entering/Exiting System View ...... 1-1 1.1.2 Configuring the Device Name ...... 1-2 1.1.3 Configuring the System Clock...... 1-2 1.1.4 Configuring a Banner ...... 1-2 1.1.5 Configuring CLI Hotkeys ...... 1-4 1.1.6 Configuring User Levels and Levels...... 1-5 1.1.7 Displaying and Maintaining Basic Configurations ...... 1-7 1.2 CLI Features ...... 1-8 1.2.1 Online Help with Command Lines...... 1-8 1.2.2 Display Features ...... 1-10 1.2.3 History Command ...... 1-11 1.2.4 Command Line Error Information...... 1-11 1.2.5 Edit Features...... 1-12

i Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

Chapter 1 Basic Configurations

While performing basic configurations of the system, go to these sections for information you are interested in:

z Basic Configurations

z CLI Features

1.1 Basic Configurations

This section covers the following topics:

z Entering/Exiting System View

z Configuring the Device Name

z Configuring the System Clock

z Configuring a Banner

z Configuring CLI Hotkeys

z Configuring User Levels and Command Levels

z Displaying and Maintaining Basic Configurations

1.1.1 Entering/Exiting System View

To do… Use the command… Remarks Enter system view from system-view — user view Return to user view from quit — system view

Note: With the quit command, you can return to the previous view. You can execute the return command or press the hot key to return to user view.

1-1 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

1.1.2 Configuring the Device Name

To do… Use the command… Remarks Enter system view system-view — Optional Configure the device sysname sysname name The default device name is H3C.

1.1.3 Configuring the System Clock

To do… Use the command… Remarks Set the standard clock datetime time date Optional clock timezone Set the time zone zone-name { add | Optional minus } time

clock summer-time zone-name { one-off | Set a daylight summer repeating } start-time Optional time scheme start-date end-time end-date offset-time

1.1.4 Configuring a Banner

I. Introduction to banners

Banners are prompt information displayed by the system when users are connected to the device, perform login authentication, and start interactive configuration. The administrator can set corresponding banners as needed. present, the system supports the following four kinds of welcome information.

z banner, also called session banner, displayed when a non TTY Modem user enters user view.

z incoming banner, also called user interface banner, displayed when a user interface is activated by a TTY Modem user.

z login banner, welcome information at login authentications, displayed when password and scheme authentications are configured.

z legal banner, also called authorization information. The system displays some copyright or authorization information, and then displays the legal banner before a user logs in, waiting for the user to confirm whether to continue the authentication or login. If entering Y or pressing the Enter key, the user enters the authentication or login process; if entering N, the user quits the authentication or login process. Y and N are case insensitive.

1-2 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

II. Configuring a banner

When you configure a banner, the system supports two input modes. One is to input all the banner information right after the command keywords. The start and end characters of the input text must be the same but are not part of the banner information. In this case, the input text, together with the command keywords, cannot exceed 510 characters. The other is to input all the banner information in multiple lines by pressing the Enter key. In this case, up to 2000 characters can be input. The latter input mode can be achieved in the following three ways:

z Press the Enter key directly after the command keywords, and end the setting with the % character. The Enter and % characters are not part of the banner information.

z Input a character after the command keywords at the first line, and then press the Enter key. End the setting with the character input at the first line. The character at the first line and the end character are not part of the banner information.

z Input multiple characters after the command keywords at the first line (with the first and last characters being different), then press the Enter key. End the setting with the first character at the first line. The first character at the first line and the end character are not part of the banner information. Follow these steps to configure a banner:

To do… Use the command… Remarks Enter system view system-view — Configure the banner to be displayed at login (TTY header incoming text Optional Modem login) Configure the authorization information header legal text Optional before login Configure the banner to be displayed at login header login text Optional authentication Configure the banner to be displayed when a user header shell text Optional enters user view (Non-TTY Modem login)

1-3 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

1.1.5 Configuring CLI Hotkeys

To do… Use the command… Remarks Enter system view system-view — Optional hotkey { CTRL_G | CTRL_L | CTRL_O | The , Configure CLI hotkeys CTRL_T | CTRL_U } and hotkeys are command specified with command lines by default. Available in any view. Refer to Table 1-1 for Display hotkeys display hotkey hotkeys reserved by the system.

Note: By default, the , and hotkeys are configured with command line and the and commands are NULL.

z corresponds to the display current-configuration command.

z corresponds to the display ip routing-table command.

z corresponds to the undo debugging all command.

Table 1-1 Hotkeys reserved by the system

Hotkey Function Moves the cursor to the beginning of the current line. Moves the cursor one character to the left. Stops performing a command. Deletes the character at the current cursor position. Moves the cursor to the end of the current line. Moves the cursor one character to the right. Deletes the character to the left of the cursor. Terminates an outgoing connection. Displays the next command in the history command buffer. Displays the previous command in the history command buffer. Redisplays the current line information.

Pastes the content in the clipboard.

1-4 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

Hotkey Function Deletes all the characters in a continuous string to the left of the cursor. Deletes all the characters to the left of the cursor. Deletes all the characters to the right of the cursor. Exits to user view. Terminates an incoming connection or a redirect connection. Moves the cursor to the leading character of the continuous string to the left. Deletes all the characters of the continuous string at the current cursor position and to the right of the cursor. Moves the cursor to the front of the next continuous string to the right. Moves the cursor down by one line (available before you press the Enter key) Moves the cursor up by one line (available before you press the Enter key) Specifies the cursor as the beginning of the clipboard. > Specifies the cursor as the ending of the clipboard.

Note: These hotkeys are defined by the system. When you interact with the device from terminal software, these keys may be defined to perform other operations. If so, the definition of the terminal software will dominate.

1.1.6 Configuring User Levels and Command Levels

All the commands are defaulted to different views and categorized into four levels: visit, monitor, system, and manage, identified respectively by 0 through 3. If you want to acquire a higher privilege, you must switch to a higher user level, and it requires password to do so for AUX and VTY user interfaces for the security’s sake. The following table describes the default level of the commands.

Table 1-2 Default command levels

Level Privilege Command 0 Visit ping, tracert, telnet 1 Monitor refresh, reset, send

1-5 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

Level Privilege Command All configuration 2 System commands except for those at manage level FTP, TFTP, XMODEM, 3 Manage and system operation commands

Follow these steps to configure user level and command level:

To do… Use the command… Remarks Switch the user level super [ level ] Optional

Enter system view system-view — Optional Configure the password super password [ level for switching the user user-level ] { simple | By default, no password is level cipher } password needed for switching the user level.

command-privilege Configure the command level level view view Optional level in system view command

Note: The commands available depend on your user level when you log onto a device. For example, if your user level is 3 and the command level of VTY 0 interface is 1, you can use commands below level 3 (inclusive).

Caution:

z When you configure the password for switching user level with the super password command, the user level is defaulted to 3 if no user level is specified.

z You can switch to a lower user level unconditionally. To switch to a higher user level, however, you need to enter the password needed (The password can be set with the super password command.). If the entered password is incorrect or no password is configured, the switch fails. Therefore, before switching to a higher user level, you should configure the password needed.

z You are recommended to use the default user level; otherwise the change of user level may bring inconvenience to your maintenance and operation.

1-6 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

1.1.7 Displaying and Maintaining Basic Configurations

To do… Use the command… Remarks Display information on display version system version Display information on the display clock system clock Display information on display users [ all ] terminal users Display the configuration display saved-configuration files saved in the device [ by-linenum ] storage medium.

display current-configuration [ interface [ interface- [ interface-number ] ] | Display the current configuration [ configuration ] | configurations [ by-linenum ] | [ | { begin | exclude | include } Available in any regular-expression ] ] * view display debugging [ interface Display debugging interface-type interface-number ] information [ module-name ] Display the valid configuration under display this [ by-linenum ] current view Display clipboard display clipboard information Display and save statistics of each module’s display diagnostic-information running status Display the usage of the display memory current system memory

During daily maintenance or when the system is operating abnormally, you need to view each module’s running status to the problem. Therefore, you are required to execute the corresponding display commands one by one. To collect information one time, you can execute the display diagnostic-information command in any view to display statistics of each module’s running status. Use the display diagnostic-information command to collect at one time the information displayed by each of the following commands:

z display clock

z display version

z display device

z display current-configuration

1-7 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

z display saved-configuration

z display interface

z display controller

z display fib

z display ip interface

z display ip statistics

z display memory

z display logbuffer

z display history all

Note:

z For the detailed description of the display users command, refer to User Interface Commands in the System Volume.

z The display commands discussed above are for the global configuration. Refer to the corresponding section for the display command for specific protocol and interface.

z If no configuration file is enabled when the device is started, no information is displayed by the display saved-configuration command; otherwise, the information of the configuration file is displayed. For the detailed information of the display saved-configuration command, refer to File System Management Commands in the System Volume.

z You are recommended to execute the display diagnostic-information command for at least two consecutive times, so that you can compare the differences between output running information to locate the fault. However, you should use this command only when necessary because execution of the command will continuously print lots of information, affecting the system operation.

1.2 CLI Features

This section covers the following topics:

z Online Help with Command Lines

z Display Features

z History Command

z Command Line Error Information

z Edit Features

1.2.1 Online Help with Command Lines

The following are the types of online help available with the CLI:

z Full help

1-8 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

z Fuzzy help To obtain the desired help information, you can: 1) Enter in any view to access all the commands in this view and brief description about them as well. ? User view commands: backup Backup next startup-configuration file to TFTP server boot-loader Set boot loader bootrom Update/read/backup/restore bootrom Change current directory clock Specify the system clock cluster Run cluster command copy Copy from one file to another debugging Enable system debugging functions delete Delete a file dir List files on a file system display Display current system information .. 2) Enter a command and a separated by a space. If is at the position of a keyword, all the keywords are given with a brief description. 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 3) Enter a command and a separated by a space. If is at the position of a parameter, the description about this parameter is given. system-view [Sysname] interface vlan-interface ? <1-4094> VLAN interface number

<1-4094> indicates that you need to input a VLAN interface number at this position. The VLAN interface is in the range 1 to 4094.

[Sysname] interface vlan-interface 1 ? [Sysname] interface vlan-interface 1

indicates that there is no parameter at this position. The command is then repeated in the next command line and executed if you press .

[Sysname] sysname ? TEXT Host name (1 to 30 characters)

TEXT indicates that you need to input a string whose type is TEXT at this position. The string is in the range 1 to 30 characters.

1-9 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

[sysname-mpls-ldp] md5-password cipher 1.1.1.1 ? STRING<1-16> Enter the Secret password STRING<24-24> Enter the secret encrypted password

STRING<1-16> indicates that you need to input a string whose type is STRING at this position. The string is in the range 1 to 16 characters.

Caution:

A string whose type is STRING cannot contain spaces.

4) Enter a character string followed by a . All the commands starting with this string are displayed. pi? ping 5) Enter a command followed by a character string and a . All the keywords starting with this string are listed. display ver? version 6) Press after entering the first several letters of a keyword to display the complete keyword, provided these letters can uniquely identify the keyword in this command.

1.2.2 Display Features

CLI offers the following feature: When the information displayed exceeds one screen, you can pause using one of the methods shown in Table 1-3.

Table 1-3 Display functions

Action Function Enter when information display Stops the display and the command pauses execution. Press when information Continues to display information of the display pauses next screen page. Press when information display Continues to display information of the pauses next line. Moves the cursor to the end of the current line.

1-10 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

1.2.3 History Command

The CLI can automatically save the commands that have been used. You can invoke and repeatedly execute them as needed. By default, the CLI can save up to ten commands for each user. You can use the history-command max-size command to set the capacity of the history commands log buffer for the current user interface (For the detailed description of the history-command max-size command, refer to User Interface Commands in the System Volume). The following table lists the operations that you can perform. Follow these steps to access history commands:

To do… Use the key/command… Result

View the history display Displays the commands commands history-command that you have entered Displays the earlier Access the previous Up-arrow key or history command, if there history command is any. Access the next history Down-arrow key or Displays the next history command command, if there is any.

Note: You may use arrow keys to access history commands in Windows 200X and XP Terminal or Telnet. However, the up-arrow and down-arrow keys are invalid in Windows 9X HyperTerminal, because they are defined in a different way. You can use and instead.

1.2.4 Command Line Error Information

The commands are executed only if they have no syntax error. Otherwise, error information is reported. Table 1-4 lists some common errors.

Table 1-4 Common command line errors

Error information Cause The command was not found. The keyword was not found. Unrecognized command Parameter type error The parameter value is beyond the allowed range. Incomplete command Incomplete command

1-11 Operation Manual – Basic System Configuration H3C S9500 Series Routing Switches Chapter 1 Basic Configurations

Error information Cause Ambiguous command Ambiguous command Too many parameters Too many parameters Wrong parameter Wrong parameter

1.2.5 Edit Features

The CLI provides the basic command edit functions and supports multi-line editing. The maximum length of each command is 256 characters. Table 1-5 lists these functions.

Table 1-5 Edit functions

Key Function If the editing buffer is not full, insert the character at Common keys the position of the cursor and move the cursor to the right. Deletes the character to the left of the cursor and key move the cursor back one character. Left-arrow key or The cursor moves one character space to the left.

Right-arrow key or The cursor moves one character space to the right. Up-arrow key or Displays history commands Down-arrow key or Pressing after entering part of a keyword enables the fuzzy help function. If finding a unique match, the system substitutes the complete keyword for the incomplete one and displays it in key the next line. If there are several matches or no match at all, the system does not modify the incomplete keyword and displays it again in the next line.

1-12