Page 3
Preface The H3C S5120-EI documentation set includes 10 command references, which describe the commands and command syntax options for the S5120-EI Series Ethernet Switches, Release2208. The Fundamentals Command Reference describes commands for configuring command line interface (CLI), logging in to your switch, configuring FTP and TFTP, file system management, configuration file management, device management, and software upgrade.
Page 4
Command reference Added and modified commands Added commands: • • time at Device Management • time delay • view • temperature-limit Conventions This section describes the conventions used in this documentation set. Command conventions Convention Description Boldface Bold text represents commands and keywords that you enter literally as shown. Italic Italic text represents arguments that you replace with actual values.
Page 5
An alert that calls attention to essential information. IMPORTANT An alert that contains additional or supplementary information. NOTE An alert that provides helpful information. About the H3C S5120-EI documentation set The H3C S5120-EI documentation set includes: Category Documents Purposes Marketing brochures Describe product specifications and benefits.
Page 6
Obtaining documentation You can access the most up-to-date H3C product documentation on the World Wide Web at http://www.h3c.com. Click the links on the top navigation bar to obtain different categories of product documentation: [Technical Support & Documents > Technical Documents] –...
CLI configuration commands CLI configuration commands command-alias enable Syntax command-alias enable undo command-alias enable View System view Default level 2: System level Parameters None Description Use the command-alias enable command to enable the command alias function. Use the undo command-alias enable command to disable the command alias function. By default, the command alias function is disabled.
Parameters cmdkey: The complete form of the first keyword of a command. alias: Specifies the command alias, which cannot be the same as the first keyword of an existing command. Description Use the command-alias mapping command to configure command aliases. Use the undo command-alias mapping command to delete command aliases.
Level changes can cause maintenance, operation, and security problems. H3C recommends that • you use the default command level or that you modify the command level under the guidance of professional staff. • The command specified in the command-privilege command must be complete, and has valid arguments.
Description Use the display clipboard command to view the contents of the clipboard. To copy the specified content to the clipboard: Move the cursor to the starting position of the content and press the <Esc+Shift+,> combination. • Move the cursor to the ending position of the content and press the <Esc+Shift+.> combination. •...
View Any view Default level 1: Monitor level Parameters None Description Use the display history-command command to display commands saved in the history command buffer. By default, the system saves the last 10 executed commands in the history command buffer. To set the size of the history command buffer, use the history-command max-size command.
=Undefined hotkeys= Hotkeys Command CTRL_T NULL CTRL_U NULL =System hotkeys= Hotkeys Function CTRL_A Move the cursor to the beginning of the current line. CTRL_B Move the cursor one character left. CTRL_C Stop current command function. CTRL_D Erase current character. CTRL_E Move the cursor to the end of the current line.
Page 17
CTRL_T: Associates hot key Ctrl+T to the specified command. CTRL_U: Associates hot key Ctrl+U to the specified command. command: The command line associated with the hot key. Description Use the hotkey command to associate a hot key to a command. Use the undo hotkey command to restore the default.
CTRL_X Delete all characters up to the cursor. CTRL_Y Delete all characters after the cursor. CTRL_Z Return to the user view. CTRL_] Kill incoming connection or redirect connection. ESC_B Move the cursor one word back. ESC_D Delete remainder of word. ESC_F Move the cursor forward one word.
Description Use the return command to return to user view, which can also be done with the hot key Ctrl+Z. Related commands: quit. Examples # Return to user view from GigabitEthernet 1/0/18 view. [Sysname-GigabitEthernet1/0/18] return <Sysname> screen-length disable Syntax screen-length disable undo screen-length disable View User view...
Parameters level: User level, which ranges from 0 to 3 and defaults to 3. Description Use the super command to switch from the user privilege level to a specified user privilege level. If a level is not specified, the command switches the user privilege level to 3. Command levels include four privileges: visit (0), monitor (1), system (2), and manage (3).
If no password is set for the user logged in through any of the VTY user interfaces, the AAA authentication is performed. scheme local: First scheme and then local, which authenticates a user by performing the AAA authentication first. If the AAA configuration is invalid (the domain parameters or authentication scheme are not configured) or the server does not respond, the local password authentication is performed.
By default, no password is set for switching to a higher privilege level. • Use the simple keyword to set a simple-text password. Use the cipher keyword to set a cipher-text password. A cipher-text password is recommended. • During authentication, you must input a cipher-text password regardless of the password type you •...
one VTY user interface. The match order is basic/advanced ACL, Ethernet frame header ACL. At most one ACL of each type can be referenced in the same VTY user interface, and the last configured one takes effect. Examples # Allow only the user with the IP address of 192.168.1.26 to access the device through Telnet or SSH. <Sysname>...
• Log in to the console port again. The following message appears. ****************************************************************************** * Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved. * Without the owner's prior written consent, * no decompiling or reverse-engineering shall be allowed.
Telnet to 192.168.1.40. The device automatically telnets to 192.168.1.41. The following output is displayed: C:\> telnet 192.168.1.40 ****************************************************************************** * Copyright (c) 2004-2010 Hangzhou H3C Tech. Co., Ltd. All rights reserved. * Without the owner's prior written consent, * no decompiling or reverse-engineering shall be allowed. ****************************************************************************** <Sysname>...
View User interface view Default level 3: Manage level Parameters none: Performs no authentication. password: Performs local password authentication. scheme: Performs AAA authentication. For more information about AAA, see the Security Configuration Guide. Description Use the authentication-mode command to set the authentication mode for the user interface. Use the undo authentication-mode command to restore the default.
View User interface view Default level 3: Manage level Parameters None Description Use the command accounting command to enable command accounting. Use the undo command accounting command to restore the default. By default, command accounting is disabled. The accounting server does not record the commands that users have executed.
Examples # Enable command accounting for VTY 0 so that users logging in from VTY 0 can perform only the commands authorized by the HWTACACS server. <Sysname> system-view [Sysname] user-interface vty 0 [Sysname-ui-vty0] command authorization databits Syntax databits { 5 | 6 | 7 | 8 } undo databits View User interface view...
View Any view Default level 1: Monitor level Parameters |: Filters command output by specifying a regular expression. For more information about regular expressions, see the chapter “CLI configuration.” 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.
Parameters |: Filters command output by specifying a regular expression. For more information about regular expressions, see the chapter “CLI configuration.” 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.
Page 32
Parameters num1: Absolute number of a user interface. The value range varies with devices, and typically starts from num2: Relative number of a user interface. The value range from 0 to 15. summary: Displays summary about user interfaces. |: Filters command output by specifying a regular expression. For more information about regular expressions, see the chapter “CLI configuration.”...
Whether the modem is allowed to dial in (in), dial out (out), or both (inout) Modem By default, the character - is displayed to indicate that this function is disabled. Privi Indicates the command level of a user under that user interface Authentication mode for the users: •...
Page 34
1: Monitor level Parameters all: Displays information about all user interfaces that the device supports. |: Filters command output by specifying a regular expression. For more information about regular expressions, see the chapter “CLI configuration.” 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.
display web users Syntax display web users [ | { begin | exclude | include } regular-expression ] View Any view Parameter |: Filters command output by specifying a regular expression. For more information about regular expressions, see the chapter “CLI configuration.” begin: Displays the first line that matches the specified regular expression and all lines that follow.
Default level 3: Manage level Parameters character: Specifies the shortcut key for aborting a task, a single character (or its ASCII code value in the range 0 to 127) or a string of 1 to 3 characters. Only the first character of a string functions as the shortcut key.
Syntax flow-control { hardware | none | software } undo flow-control View User interface view Default level 2: System level Parameters hardware: Performs hardware flow control. none: Disables flow control. software: Performs software flow control. flow-control-type1, flow-control-type2: Sets the direction of flow control, in or out. If in is specified, the local device receives flow information from the remote device.
3: Manage level Parameters num1: Absolute number of a user interface. The value range varies with devices, and typically starts from num2: Relative number of a user interface. The value ranges from 0 to 15. Description Use the free user-interface command to release the connection(s) established on the specified user interface.
history-command max-size Syntax history-command max-size size-value undo history-command max-size View User interface view Default level 2: System level Parameters size-value: Specifies the maximum number of history commands that the buffer can store. The value ranges from 0 to 256. Description Use the history-command max-size command to set the size of the history command buffer of the current user interface.
seconds: Specifies timeout time in seconds, which ranges from 0 to 59, and defaults to 0 seconds. Description Use the idle-timeout command to set the idle-timeout timer. Use the undo idle-timeout command to restore the default. The default idle-timeout is 10 minutes. NOTE: The system automatically terminates the connection if no information interaction occurs between the •...
Examples # Associate the HTTP service with ACL 2001 to only allow the clients within the 10.10.0.0/16 network to access the device through HTTP. <Sysname> system-view [Sysname] acl number 2001 [Sysname-acl-basic-2001] rule permit source 10.10.0.0 0.0.255.255 [Sysname-acl-basic-2001] quit [Sysname] ip http acl 2001 ip http enable Syntax ip http enable...
Description Use the ip http port command to configure the port number of the HTTP service. Use the undo ip http port command to restore the default. By default, the port number of the HTTP service is 80. Verify that the port number is not used by another service, because this command does not check for conflicts with configured port numbers.
<Sysname> system-view [Sysname] acl number 2001 [Sysname-acl-basic-2001] rule permit source 10.10.0.0 0.0.255.255 [Sysname-acl-basic-2001] quit [Sysname] ip https acl 2001 ip https certificate access-control-policy Syntax ip https certificate access-control-policy policy-name undo ip https certificate access-control-policy View System view Default level 3: Manage level Parameters policy-name: Name of the certificate attribute access control policy, a string of 1 to 16 characters.
Parameters None Description Use the ip https enable command to enable the HTTPS service. Use the undo ip https enable command to disable the HTTPS service. By default, the HTTPS service is disabled. The device can act as the HTTP server if the HTTP service is enabled. Enabling the HTTPS service triggers an SSL handshake negotiation process.
<Sysname> system-view [Sysname] ip https port 6000 ip https ssl-server-policy Syntax ip https ssl-server-policy policy-name undo ip https ssl-server-policy View System view Default level 3: Manage level Parameters policy-name: Name of an SSL server policy, which is a string of 1 to 16 characters. Description Use the ip https ssl-server-policy command to associate the HTTPS service with an SSL server-end policy.
When entering the lock command, you must input a password (up to 16 characters) and then confirm it by inputting the password again. To set the password, input the same passwords. After locking the user interface, the next time you access the user interface, you are required to press Enter and input the correct password.
Default level 2: System level Parameters screen-length: Number of lines on the next screen, which ranges from 0 to 512. The value of 0 disables pausing between screens of output. Description Use the screen-length command to set the number of lines on the next screen. Use the undo screen-length command to restore the default.
# Send message hello abc to the user interface of console port 0. <Sysname> send aux 0 Enter message, end with CTRL+Z or Enter; abort with CTRL+C: hello abc^Z Send message? [Y/N]:y <Sysname> ***Message from aux0 to aux0 hello abc <Sysname>...
# Set the local authentication password for the user interface of console port 0 to hello. <Sysname> system-view [Sysname] user-interface aux 0 [Sysname-ui-aux0] authentication-mode password [Sysname-ui-aux0] set authentication password cipher hello Next time you enter the system, the password is required. shell Syntax shell...
2: System level Parameters speed-value: Transmission rate in bps. The transmission rates available with asynchronous serial interfaces include the following values: 300 bps • 600 bps • 1200 bps • • 2400 bps 4800 bps • 9600 bps • 19200 bps •...
1: One stop bit. 1.5: One and a half stop bits. 2: Two stop bits. Description Use the stopbits command to set the number of stop bits transmitted per byte. Use the undo stopbits command to restore the default. By default, the stop bit is one. NOTE: •...
The source IPv4 address or source interface specified by this command is applicable to the current Telnet connection only. Examples # Telnet to the remote host 1.1.1.2, specifying the source IP address of Telnet packets as 1.1.1.1. <Sysname> telnet 1.1.1.2 source ip 1.1.1.1 telnet ipv6 Syntax telnet ipv6 remote-host [ -i interface-type interface-number ] [ port-number ]...
By default, the terminal display type is ANSI. The device supports two types of terminal display: ANSI and VT100. H3C recommends you to set the display type to VT100 on both the device and the client to avoid anomalies when the total number of characters of the edited command line exceeds 80.
User interface view Default level 3: Manage level Parameters level: Specifies a user privilege level, which ranges from 0 to 3. NOTE: User privilege levels include visit, monitor, system, and manage, represented by the numbers 0, 1, 2 and 3, respectively. The administrator can change the user privilege level when necessary. Description Use the user privilege level command to configure the user privilege level.
Page 56
first-num1: Absolute number of the first user interface. The value range varies with devices, and typically starts from 0. last-num1: Absolute number of the last user interface. The value range varies with devices, and typically starts from 0, but cannot be smaller than the first-num1. first-num2: Relative number of the first user interface.
FTP configuration commands FTP server configuration commands display ftp-server Syntax display ftp-server [ | { begin | exclude | include } regular-expression ] View Any view Default level 3: Manage level Parameters |: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
connection will be disconnected. File update method of the FTP server, including: • Put Method fast: Fast update • normal: Normal update display ftp-user Syntax display ftp-user [ | { begin | exclude | include } regular-expression ] View Any view Default level 3: Manage level Parameters...
Idle Duration time of the current FTP connection, in minutes HomeDir Authorized path of the present logged-in user free ftp user Syntax free ftp user username View User view Default level 3: Manage level Parameters username: Username. You can use the display ftp-user command to view the logged-in user name of the current FTP connection.
By default, no ACL is used to control FTP clients’ access to the device. Associated with an ACL, the FTP server can deny the FTP requests of some FTP clients and only permit the access of clients allowed by the ACL rules. This configuration only filters the FTP connections to be established, and has no effect on the established FTP connections and operations.
Default level 3: Manage level Parameters minute: Idle-timeout timer in minutes, in the range 1 to 35791. Description Use the ftp timeout command to set the idle-timeout timer. Use the undo ftp timeout command to restore the default. By default, the FTP idle time is 30 minutes. You can set an idle-timeout timer so that the FTP server can disconnect from the user if no information is received or transmitted before the timer expires.
For example, to indicate the end of a line and transfer to the next line, the H3C device system and Windows system use characters /r/n, and the Linux system uses characters /n.
Parameters None Description Use the binary command to set the file transfer mode to binary (flow) mode. By default, the transfer mode is ASCII mode. Related commands: ascii. Examples # Set the file transfer mode to binary. [ftp] binary 200 Type set to I. Syntax View FTP client view...
Parameters directory: Name of the target directory, in the format of [drive:][/]path, where drive represents the storage medium name, typically flash or cf. If no drive information is provided, the argument represents a folder or subfolder in the current directory. For more information about the drive and path arguments, see the Fundamentals Configuration Guide.
200 CDUP command successful. [ftp] pwd 257 "/ftp" is current directory. close Syntax close View FTP client view Default level 3: Manage level Parameters None Description Use the close command to terminate the connection to the FTP server, but remain in FTP client view. This command is equal to the disconnect command.
Page 66
Examples # The device serves as the FTP client. Enable FTP client debugging and use the active mode to download file sample.file from the current directory of the FTP server. <Sysname> terminal monitor <Sysname> terminal debugging <Sysname> ftp 192.168.1.46 Trying 192.168.1.46 ... Press CTRL+K to abort Connected to 192.168.1.46.
delete Syntax delete remotefile View FTP client view Default level 3: Manage level Parameters remotefile: File name. Description Use the delete command to permanently delete a specified file on the remote FTP server. You cannot do this only if you have delete permissions on the FTP server. Examples # Delete file temp.c.
created. Examples # View the detailed information of the files and subdirectories under the current directory on the remote FTP server. [ftp] dir 227 Entering Passive Mode (192,168,1,46,5,68). 125 ASCII mode data connection already open, transfer starting for /*. drwxrwxrwx 1 noone nogroup 0 Aug 08...
[ftp] disconnect 221 Server closing. display ftp client configuration Syntax display ftp client configuration [ | { begin | exclude | include } regular-expression ] View Any view Default level 1: Monitor level Parameters |: Filters command output by specifying a regular expression. For more information about regular expressions, see the the Fundamentals Configuration Guide.
service-port: TCP port number of the remote FTP server, in the range 0 to 65535. The default value is 21. source { interface interface-type interface-number | ip source-ip-address } ]: Specifies the source address used to establish an FTP connection. interface interface-type interface-number: Specifies the source interface by its type and number.
Parameters interface interface-type interface-number: Source interface for the FTP connection, including interface type and interface number. The primary IP address configured on the source interface is the source IP address of the packets sent by FTP. If no primary IP address is configured on the source interface, the connection fails.
source ipv6 source-ipv6-address: Specifies a source IPv6 address for transmitted FTP packets. This address must be an IPv6 address that has been configured on the device. -i interface-type interface-number: Specifies the type and number of the egress interface. This parameter can only be used when the FTP server address is a link local address and the specified egress interface has a link local address.
Examples # Download file testcfg.cfg and save it as aa.cfg. [ftp] get testcfg.cfg aa.cfg 227 Entering Passive Mode (192,168,1,50,17,163). 125 ASCII mode data connection already open, transfer starting for /testcfg.cfg..226 Transfer complete. FTP: 5190 byte(s) received in 7.754 second(s), 669.00 byte(s)/sec. # Download file testcfg.cfg to the root directory of the storage medium of the master, and save it as newest.cfg.
Page 74
Syntax ls [ remotefile [ localfile ] ] View FTP client view Default level 3: Manage level Parameters remotefile: Filename or directory on the remote FTP server. localfile: Name of a local file used to save the displayed information. Description Use the ls command to view the information of all the files and subdirectories in the current directory of the remote FTP server.
# View the content of file aa.txt. [ftp] quit <Sysname> more aa.txt logfile.log mkdir Syntax mkdir directory View FTP client view Default level 3: Manage level Parameters directory: Name of the directory to be created. Description Use the mkdir command to create a subdirectory in the current directory on the remote FTP server. You can do this only if you have permissions on the FTP server.
If you have logged in to the IPv4 FTP server currently, you cannot use the open command to log in to another server. You need to disconnect with the current server first, and then try to connect with another one. Related commands: close.
Parameters localfile: Name of the local file to be uploaded. remotefile: File name used after a file is uploaded and saved on the FTP server. Description Use the put command to upload a file on the client to the remote FTP server. By default, if no name is assigned to the file to be saved on the FTP server, the name of the source file is used.
Examples # Display the currently accessed directory on the remote FTP server. [ftp] cd servertemp [ftp] pwd 257 "/servertemp" is current directory. The above information indicates that the servertemp folder under the root directory of the remote FTP server is being accessed by the user. quit Syntax quit...
Page 80
SYST STAT* HELP NOOP* XCUP XCWD XMKD XPWD XRMD 214 Direct comments to H3C company. # Display the help information for the user command. [ftp] remotehelp user 214 Syntax: USER <sp> <username>. [ftp] Table 10 Output description Field Description USER...
Delete a folder Create a folder Print working directory LIST List files NLST List file description SITE* Locate a parameter SYST Display system parameters STAT* State HELP Help NOOP* No operation XCUP Extension command, the same meaning as CUP XCWD Extension command, the same meaning as CWD XMKD Extension command, the same meaning as MKD...
verbose Syntax verbose undo verbose View FTP client view Default level 3: Manage level Parameters None Description Use the verbose command to enable the protocol information function to display detailed prompt information. Use the undo verbose command to disable the protocol information function. By default, the protocol information function is enabled.
View System view Default level 3: Manage level Parameters ipv6: References an IPv6 ACL. If it is not specified, an IPv4 ACL is referenced. acl-number: Number of a basic ACL, in the range 2000 to 2999. Description Use the tftp-server acl command to control the device’s access to a specific TFTP server using an ACL. Use the undo tftp-server acl command to restore the default.
Page 86
get: Downloads a file in normal mode. put: Uploads a file. sget: Downloads a file in secure mode. source-filename: Source file name. destination-filename: Destination file name. source: Configures parameters for source address binding. interface interface-type interface-number: Specifies the source interface by its type and number. The primary IP address configured on the source interface is the source IP address of the packets sent by TFTP.
<Sysname> tftp 192.168.1.26 get newest.bin slot2#flash:/startup.bin File will be transferred in binary mode Downloading file from remote TFTP server, please wait...| TFTP: 2737556 bytes received in 14 second(s) File downloaded successfully. // Download the file from the TFTP server to the root directory on the flash of the slave switch. tftp client source Syntax tftp client source { interface interface-type interface-number | ip source-ip-address }...
File management commands NOTE: In the following examples, the working directory is the root directory of the storage medium on the device. Fundamentals Configuration Guide For the qualified filename formats, see the File management commands Syntax cd { directory | .. | / } View User view Default level...
<Sysname> cd slot2#flash:/ # Change the current directory from the file system of the slave to the test folder in the root directory of the master. <Sysname> cd flash:/ copy Syntax copy fileurl-source fileurl-dest View User view Default level 3: Manage level Parameters fileurl-source: Name of the source file.
Parameters /unreserved: Permanently deletes the specified file, and the deleted file can never be restored. file-url: Name of the file to be deleted. Asterisks (*) are acceptable as wildcards. For example, to remove files with the extension of .txt in the current directory, you may use the delete *.txt command. Description Use the delete file-url command to temporarily delete a file.
Page 92
Parameters /all: Displays all files. file-url: Name of the file or directory to be displayed. Asterisks (*) are acceptable as wildcards. For example, to display files with the .txt extension in the current directory, you may use the dir *.txt command.
Table 11 Output description Field Description Directory of The current working directory Indicates a directory. If this field does not exist, it indicates a file. Indicates that the file or directory is readable. Indicates that the file or directory is writable. Indicates that the file or directory is hidden.
Default level 3: Manage level Parameters alert: Enables the system to warn you about operations that may bring undesirable results such as file corruption or data loss. quiet: Disables the system from warning you about any operation. Description Use the file prompt command to set a prompt mode for file operations. By default, the prompt mode is alert, which is recommended to avoid misoperations.
Default level 3: Manage level Parameters device: Name of a storage medium. Description Use the format command to format a storage medium. CAUTION: When you format a storage medium, the files are lost and cannot be restored, including the startup configuration file.
..%Created dir flash:/test/subtest # Create folder test on a slave (with the member ID 2). <Sysname> mkdir slot2#flash:/test ..%Created dir slot2#flash:/test. more Syntax more file-url View User view Default level 3: Manage level Parameters file-url: File name. Description Use the more command to display the contents of the specified file.
sysname Test ---- More ---- move Syntax move fileurl-source fileurl-dest View User view Default level 3: Manage level Parameters fileurl-source: Name of the source file. fileurl-dest: Name of the target file or folder. Description Use the move command to move a file. If you specify a target folder, the system will move the source file to the specified folder, with the file name unchanged.
Parameters None Description Use the pwd command to display the current path. Examples # Display the current path. <Sysname> pwd flash: rename Syntax rename fileurl-source fileurl-dest View User view Default level 3: Manage level Parameters fileurl-source: Name of the source file or folder. fileurl-dest: Name of the target file or folder.
Page 99
Description Use the reset recycle-bin command to permanently delete the files in the recycle bin in the directory. If a file is corrupted, you may not be able to delete the file using the reset recycle-bin command. To delete the corrupted file in the recycle bin forcibly, use the reset recycle-bin /force command. The delete file-url command only moves a file to the recycle bin, and the file still occupies the memory space.
15240 KB total (6734 KB free) flash:/b.cfg // The output shows that file is deleted permanently. rmdir Syntax rmdir directory View User view Default level 3: Manage level Parameters directory: Name of the folder. Description Use the rmdir command to remove a folder. The folder must be an empty one.
Page 101
Examples # Restore file a.cfg in directory flash: from the recycle bin. <Sysname> undelete a.cfg Undelete flash:/a.cfg?[Y/N]:y ..%Undeleted file flash:/a.cfg. # Restore file b.cfg in directory flash:/test from the recycle bin. <Sysname> undelete flash:/test/b.cfg Undelete flash:/test/b.cfg?[Y/N]:y ..%Undeleted file flash:/test/b.cfg. Or, you can use the following steps to restore file flash:/test/b.cfg.
Configuration file management commands Configuration file management commands archive configuration Syntax archive configuration View User view Default level 3: Manage level Parameters None Description Use the archive configuration command to save the running configuration manually. After the execution of this command, the system saves the running configuration with the specified filename—filename prefix + serial number—to the specified path.
If the configuration of the switch does not change frequently, H3C recommends that you save the running configuration manually. If you use a low-speed storage media, such as a Flash, H3C recommends that you save the running • configuration manually, or configure automatic saving with an interval longer than 1,440 minutes (24 hours).
Parameters directory: The path of the folder for saving configuration files, a string of 1 to 63 case-insensitive characters, in the format of storage media name:/[folder name]/subfolder name. The folder must be created before the configuration. filename-prefix: The filename prefix for saving configuration files, a case insensitive string of 1 to 30 characters (can include letters, numbers, _, and - only).
undo archive configuration max View System view Default level 3: Manage level Parameters file-number: The maximum number of configuration files that can be saved, in the range 1 to 10. The value of the file-number argument is determined by the memory space. If the available memory space is small, set a comparatively small value for this argument.
Parameters dest-addr: IP address or name of a TFTP server. The address cannot be an IPv6 address. dest-filename: Target filename used to save the startup configuration file for the next system startup on the server. Description Use the backup startup-configuration command to back up the startup configuration file for the next system startup to a specified TFTP server.
Examples # Roll back from the running configuration to a previous configuration state based on a saved configuration file my_archive_1.cfg. <Sysname> system-view [Sysname] configuration replace file my_archive_1.cfg Info: Now replacing the current configuration. Please wait... Info: Succeeded in replacing current configuration with the file my_archive_1.cfg. display archive configuration Syntax display archive configuration [ | { begin | exclude | include } regular-expression ]...
Filename prefix Filename prefix of the saved configuration files Configuration file saving interval, in minutes. Archive interval in minutes If the automatic saving is disabled, this field is not displayed. Filename Filename of the saved configuration files, with path excluded. display current-configuration Syntax display current-configuration [ [ configuration [ configuration ] | interface [ interface-type ]...
configured on a Loopback interface. If you execute the display current-configuration command, IP address 1 1.1 1.1 1.1 1 255.255.255.255 is displayed, meaning the validated subnet mask is 32 bits. Related commands: save, reset saved-configuration, and display saved-configuration. Examples # Display the configuration from the line containing “user-interface” to the last line in the current validated configuration.
Examples # Display the factory defaults of the device. <Sysname> display default-configuration domain default enable system telnet server enable undo ip redirects undo ip ttl-expires undo ip unreachables vlan 1 radius scheme system server-type extended primary authentication 127.0.0.1 1645 primary accounting 127.0.0.1 1646 user-name-format without-domain domain system access-limit disable...
Page 111
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. regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters. Description Use the display saved-configuration command to display the contents of the configuration file saved for the next system startup.
self-service-url disable interface NULL0 ---- More ---- # Display the contents of the configuration file saved for the next system startup with a number identifying each line. <Sysname> display saved-configuration by-linenum version 5.20, Test 5310 sysname Sysname domain default enable system telnet server enable multicast routing-enable vlan 1...
exclude: Displays all lines that do not match the specified regular expression. include: Displays all lines that match the specified regular expression. regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters. Description Use the display startup command to display the configuration file for the system startup and the configuration file(s) for the next system startup.
Page 114
View Any view Default level 1: Monitor level Parameters by-linenum: Specifies to display the number of each line. |: Filters command output by specifying a regular expression. For more information about regular expressions, see CLI configuration in the Fundamentals Configuration Guide. begin: Displays the first line that matches the specified regular expression and all lines that follow.
restore startup-configuration Syntax restore startup-configuration from src-addr src-filename View User view Default level 3: Manage level Parameters src-addr: IP address or name of a TFTP server. The address cannot be an IPv6 address. src-filename: Filename of the configuration file to be downloaded from the specified server. Description Use the restore startup-configuration command to download a configuration file from the specified TFTP server to the switch, and specify it as the startup configuration file for the next system startup.
Page 117
Default level 2: System level Parameters file-url: File path, where the extension of the file name must be .cfg. When used with the keyword all or slot, this argument cannot include a member ID. If the file path includes a folder name, you must first create the folder on the member device;...
Page 118
Current startup saved-configuration file: NULL Next main startup saved-configuration file: flash:/aa.cfg Next backup startup saved-configuration file: NULL Slot 2: Current startup saved-configuration file: NULL Next main startup saved-configuration file: flash:/aa.cfg Next backup startup saved-configuration file: NULL // The output indicates that the main startup configuration file for the next startup of all the member aa.cfg devices is <Sysname>...
Configuration is saved to device successfully. slave auto-update config Syntax slave auto-update config undo slave auto-update config View System view Default level 2: System level Parameters None Description Use the slave auto-update config command to enable the configuration file auto-save function. Use the undo slave auto-update config command to disable the function.
Page 120
Use both of them to specify the main startup configuration file. The main and backup startup configuration files can be specified as the same file. However, H3C recommends that you use different files, or, save the same configuration as two files using different file names, one specified as the main startup configuration file, and the other specified as the backup.
Software upgrade commands Software upgrade commands boot-loader Syntax boot-loader file file-url slot { all | slot-number } { main | backup } View User view Default level 3: Manage level Parameters file file-url: Specifies a file name, a string of 1 to 63 characters. If you enter a relative path here, the system automatically converts it to an absolute path.
file • When you specify the boot file of the master, the argument cannot contain the member ID of the slot-number device, and should be specified as the member ID of the master. file When you specify the boot file of the slave switch, the argument must contain the member ID •...
slot: Specifies the member ID of a device. • slot-number: Specifies to upgrade the boot file of a member switch. slot-number is the ID of a member switch of the current IRF virtual device. all: Specifies to upgrade boot files for or all member switches of an IRF virtual device. •...
• To execute the bootrom command, save the Boot ROM program under the root directory of the storage media on a member switch. If the storage media is on the master, specify the storage media by giving its name, such as flash. •...
After the validity check function is enabled, the device will strictly check whether the Boot ROM upgrade files are valid and can match the hardware. Examples # Enable the validity check function when upgrading Boot ROM. <Sysname> system-view [Sysname] bootrom-update security-check enable display boot-loader Syntax display boot-loader [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]...
The backup boot app is Backup boot file used for the next device boot of the device display patch information Syntax display patch information [ | { begin | exclude | include } regular-expression ] View Any view Default level 3: Manage level Parameters |: Filters command output by specifying a regular expression.
Active Number of patches in the ACTIVE state. Start-Address Starting address of the memory patch area in the memory. patch active Syntax patch active patch-number slot slot-number View System view Default level 3: Manage level Parameters patch-number: Sequence number of a patch. The valid values of this argument depend on the patch file used.
Description Use the patch deactive command to stop running the specified patch and all the ACTIVE patches after the specified patch, and the system will run at the original software version. NOTE: • All the ACTIVE patches (including the specified patch) turn to the DEACTIVE state. This command is not applicable to the patches in the RUNNING state.
Default level 3: Manage level Parameters patch-location: A string consisting of 1 to 64 characters. It specifies the directory where the patch file locates. It can be a root directory of a storage media or be in the format of "root directory + patch file name".
NOTE: Before executing the command, save the patch files to root directories in the storage media of the member switches. Examples # Load the patch file for the device with member ID of 1. <Sysname> system-view [Sysname] patch load slot 1 patch location Syntax patch location patch-location...
Description Use the patch run command to confirm the running of the specified patch and all the ACTIVE patches before the specified patch. With the slot keyword specified, the command confirms the running state of all the qualified patches on a member switch, including patches on the OAM CPU.
Examples # Set the current system time to 14:10:20 08/01/2005. <Sysname> clock datetime 14:10:20 8/1/2005 # Set the current system time to 00:06:00 01/01/2007. <Sysname> clock datetime 0:6 2007/1/1 clock summer-time one-off Syntax clock summer-time zone-name one-off start-time start-date end-time end-date add-time undo clock summer-time View System view...
Examples # For daylight saving time in abc1 between 06:00:00 on 08/01/2006 and 06:00:00 on 09/01/2006, set the system clock ahead one hour. <Sysname> system-view [Sysname] clock summer-time abc1 one-off 6 08/01/2006 6 09/01/2006 1 clock summer-time repeating Syntax clock summer-time zone-name repeating start-time start-date end-time end-date add-time undo clock summer-time View System view...
from 00:00:00 of June 6 to 00:00:00 of October 1 each year from 2007—2007 inclusive. The daylight saving time adds one hour to the standard time of the device. NOTE: To view the result after the configuration takes effect, use the display clock command. The time •...
If a user logs in to the device through Telnet, the following information is displayed: • ************************************************************************** * Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.* * Without the owner's prior written consent, * no decompiling or reverse-engineering shall be allowed.
User interface aux0 is available. Please press ENTER. # Disable the display of copyright information. <Sysname> system-view [Sysname] undo copyright-info enable If a user logs in to the device through Telnet, the following information is displayed: • <Sysname> If a user has already logged in through the console port, and then quits user view, the following •...
Examples # Display the current time and date. <Sysname> display clock 09:41:23 UTC Thu 12/15/2005 display cpu-usage Syntax display cpu-usage [ slot slot-number [ cpu cpu-number ] ] [ | { begin | exclude | include } regular-expression ] display cpu-usage entry-number [ offset ] [ verbose ] [ slot slot-number [ cpu cpu-number ] ] [ from-device ] View Any view...
Page 138
Description Use the display cpu-usage command to display the CPU usage statistics. The system takes statistics of CPU usage at intervals—usually every 60 seconds—and saves the statistical results in the history record area. The maximum number of records that can be saved depends on your device model.
Slot 2 CPU usage The CPU usage of the device with the member ID of 2). Information of CPU usage records (no: The (no+1)th record is currently displayed. no numbers from 0, a smaller number equals a newer record. idx: CPU usage info (no: idx:) index of the current record in the history record table).
Page 140
include: Displays all lines that match the specified regular expression. regular-expression: Specifies a regular expression, which is a case-sensitive string of 1 to 256 characters. Description Use the display cpu-usage history command to display the history statistics of the CPU usage in a chart. The system takes statistics of the CPU usage at an interval and saves the statistical results in the history record area.
5%: 16 and 17 minutes ago • • 10%: 18 minutes ago 5%: 19 minutes ago • 2% or lower than 2%: other time • # Display the CPU usage statistics of task 6. <Sysname> display cpu-usage history task 6 100%| 95%| 90%|...
Parameters slot slot-number: Displays information of the specified member device. The slot-number argument is the ID of a member device of the current IRF virtual device. subslot subslot-number: Displays information of the specified subcard. The subslot-number represents the subslot of a subcard. verbose: Displays detailed information.
include: Displays all lines that match the specified regular expression. regular-expression: Specifies a regular expression, which is a case-sensitive string of 1 to 256 characters. Description Use the display diagnostic-information command to display or save the statistics of the running status of multiple modules in the system.
Parameters slot slot-number: Displays the temperature information of the sensors on the specified member device. The slot-number argument is the ID of a member device of the current IRF virtual device. |: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
fan-id: Displays the operating state of the specified fan, where fan-id represents the built-in fan number. Support for this argument and the value range depend on your device model. |: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
Examples # Display the usage of the memory of a device. <Sysname> display memory System Total Memory(bytes): 431869088 Total Used Memory(bytes): 71963156 Used Rate: 16% Table 21 Output description Field Description System Total Memory(bytes) Total size of the system memory in bytes Total Used Memory(bytes) Size of the memory used in bytes Used Rate...
Slot 2 Power State : Normal Type : AC Table 22 Output description Field Description Slot 1 PSU information of the member device. The member ID is 1 in this output. Power PSU number PSU state: • Normal State • Absent •...
The output shows that the last reboot mode of the device is Cold boot—the cold boot will restart a device by powering it on. The display of Warm represents a warm boot, which means to restart a device by using the commands like reboot. display rps Syntax display rps [ slot slot-number [ rps-id ] ] [ | { begin | exclude | include } regular-expression ]...
View Any view Default level 1: Monitor level Parameters |: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide. 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.
Parameters |: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide. 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.
: 1000_BASE_SX_SFP Connector Type : LC Wavelength(nm) : 850 Transfer Distance(m) : 550(50um),270(62.5um) Digital Diagnostic Monitoring : YES Vendor Name : H3C Ordering Name : SFP-GE-SX-MM850 Table 24 Output description Field Description transceiver information Pluggable transceiver information Transceiver Type Pluggable transceiver type...
NO: not supported Vendor name or name of the vendor who customizes the transceiver: Vendor Name • H3C customized anti-spoofing transceiver: H3C is displayed. • Other transceivers: The vendor name is displayed. Ordering Name Pluggable transceiver model display transceiver alarm...
Page 155
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. regular-expression: Specifies a regular expression, which is a case-sensitive string of 1 to 256 characters. Description Use the display transceiver alarm command to display the current alarm information of a single or all transceivers.
Page 156
TX CDR loss of lock TX clock cannot be recovered. TX bias high TX bias current is high. TX bias low TX bias current is low. TX power high TX power is high. TX power low TX power is low. Module not ready Module is not ready.
H3C customized anti-spoofing pluggable optical transceiver plugged in the specified interface. interface-type interface-number represents interface type and interface number. If it is not specified, the command displays the currently measured value of digital diagnosis parameters of H3C customized anti-spoofing pluggable optical transceivers in all the interfaces.
{ interface [ interface-type interface-number ] } [ | { begin | exclude | include } regular-expression ] View Any view Default level 2: System level Parameters interface [ interface-type interface-number ]: Displays part of the electrical label information of the H3C customized anti-spoofing pluggable transceiver plugged in the specified interface. interface-type...
If it is not specified, the command displays part of the electrical label information of the H3C customized anti-spoofing pluggable transceiver(s) in all the interfaces. |: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
H3C Comware Platform Software Comware Software, Version 5.20, Feature 2206L16 Copyright (c) 2004-2010 Hangzhou H3C Tech. Co., Ltd. All rights reserved. H3C S5120-52C-PWR-EI uptime is 0 week, 1 day, 2 hours, 1 minute H3C S5120-52C-PWR-EI with 1 Processor 128M bytes SDRAM...
Page 161
# Test the configuration by using Telnet. The login banner can be displayed only when login authentication is configured. ****************************************************************************** * Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved. * Without the owner's prior written consent, * no decompiling or reverse-engineering shall be allowed.
Login authentication Password: Welcome to shell(header shell) <Sysname> Syntax job job-name undo job job-name View System view Default level 3: Manage level Parameters job-name: Name of a scheduled task, which is a string of 1 to 32 characters. Description Use the job command to create a scheduled task or enter scheduled task view. Use the undo job command to remove a scheduled task.
Parameters slot slot-number: Specifies a device by its member ID of the IRF virtual device. Description Use the reboot command to reboot a member device, a subcard, or all member devices. You can use the reboot [ slot slot-number ] command on the master to reboot the master device or a slave device.
Description Use the reset unused porttag command to clear the 16-bit index saved but not used in the current systems of all member devices. A confirmation is required when you carry out this command. If you fail to make a confirmation within 30 seconds or enter “N”...
If you provide both the time1 and date arguments, the execution time must be a future time. If you only provide the time1 argument, when time1 is earlier than the current system time, the specified command is executed at time1 of the next day; when time1 is later than the current system time, the specified command is executed at time1 of the current day.
Page 166
date: Reboot date for the device, in the MM/DD/YYYY or YYYY/MM/DD format. The YYYY value ranges from 2000 to 2035, the MM value ranges from 1 to 12, and the DD value ranges from 1 to 31. Description Use the schedule reboot at command to enable the scheduled reboot function on all member devices and specify a specific reboot time and date.
schedule reboot delay Syntax schedule reboot delay { hh:mm | mm } undo schedule reboot View User view Default level 3: Manage level Parameters hh:mm: Device reboot wait time, in the hh:mm format. The hh value ranges from 0 to 720, and the mm value ranges from 0 to 59.
%Jun 6 11:48:44:860 2006 Sysname CMD/4/REBOOT: vty0(192.168.1.54): Set schedule reboot parameters at 11:48:44 06/06/2006, and system will reboot at 13:16 06/06/2006. shutdown-interval Syntax shutdown-interval time undo shutdown-interval View System view Default level 2: System level Parameters time: Detection interval in seconds, which ranges from 0 to 300. Description Use the shutdown-interval command to set a detection interval.
Use the sysname command to set the name of the device. Use the undo sysname demand to restore the device name to the default. The default name is H3C. Changing device name affects the prompt of the CLI configuration. For example, if the device name is Sysname, the prompt of user view is <Sysname>.
[R2000] system-failure Syntax system-failure { maintain | reboot } undo system-failure { maintain | reboot } View System view Default level 3: Manage level Parameters maintain: Specifies that when the system detects any software abnormality, it maintains the current situation, and does not take any measure to recover itself. reboot: Specifies that when the system detects any software abnormality, it recovers itself through automatic reboot.
lowerlimit: Lower temperature limit in Celsius degrees. The value range from 0 to 70. warninglimit: Warning temperature threshold in Celsius degrees. The value range from 20 to 1 10. Description Use the temperature-limit command to set the temperature alarm thresholds for a device. Use the undo temperature-limit command to restore the default.
week-day week-daylist: Executes a specified command on a specified day or the specified days of a week. week-daylist represents a day or multiple days in a week, taking the value of Mon, Tue, Wed, Thu, Fri, Sat, or Sun. Multiple days must be separated by spaces, and you can set at most seven days. month-date month-day: Executes a specified command on a specified day of a month, where month-day represents the day, an integer in the range 1 to 31.
delay time: Specifies the delay time for executing the command, in the hh:mm format or mm format. • When the time argument is in the hh:mm format, the hh value ranges from 0 to 720, and the mm value ranges from 0 to 59. When the hh value is 720, the mm value can be only 00. When the time argument is in the mm format, the mm value ranges from 1 to 43,200.
Page 174
Only one view can be specified for a scheduled task. That is, all the commands in the task are automatically executed in the specified view. If different views are specified by executing the view view-name command repeatedly, only the last configuration takes effect. Examples # Specify system view where the specified commands are to be executed.
Index A B C D E F G H I J L M O P Q R S T U V databits,19 debugging,55 acl (user interface view),13 delete,80 activation-key,14 delete,57 archive configuration,92 dir,81 archive configuration interval,92 dir,57 archive configuration location,93 disconnect,58 archive configuration max,94...