- Table of Contents
-
- H3C S3600 Series Ethernet Switches Command Manual-Release 1510(V1.04)
- 00-1Cover
- 01-CLI Command
- 02-Login Command
- 03-Configuration File Management Command
- 04-VLAN Command
- 05-IP Address and Performance Configuration Command
- 06-Management VLAN Command
- 07-Voice VLAN Command
- 08-GVRP Command
- 09-Port Basic Configuration Command
- 10-Link Aggregation Command
- 11-Port Isolation Command
- 12-Port Security-Port Binding Command
- 13-DLDP Command
- 14-MAC Address Table Command
- 15-Auto Detect Command
- 16-MSTP Command
- 17-Routing Protocol Command
- 18-Multicast Command
- 19-802.1x Command
- 20-AAA-RADIUS-HWTACACS-EAD Command
- 21-VRRP Command
- 22-Centralized MAC Address Authentication Command
- 23-ARP Command
- 24-DHCP Command
- 25-ACL Command
- 26-QoS-QoS Profile Command
- 27-Web Cache Redirection Command
- 28-Mirroring Command
- 29-IRF Fabric Command
- 30-Cluster Command
- 31-PoE-PoE Profile Command
- 32-UDP Helper Command
- 33-SNMP-RMON Command
- 34-NTP Command
- 35-SSH Terminal Service Command
- 36-File System Management Command
- 37-FTP and TFTP Command
- 38-Information Center Command
- 39-System Maintenance and Debugging Command
- 40-VLAN-VPN Command
- 41-HWPing Command
- 42-DNS Command
- 43-Access Management Command
- 44-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
36-File System Management Command | 159 KB |
Table of Contents
Chapter 1 File System Management Configuration Commands
1.1 File Attribute Configuration Commands
1.1.3 boot boot-loader backup-attribute
1.1.6 startup bootrom-access enable
1.2 File System Configuration Commands
1.3 Configuration File Backup and Restore Commands
1.3.1 backup current-configuration
1.3.2 restore startup-configuration from
Chapter 2 FTP/TFTP Lighting Configuration Commands
2.1 FTP Configuration Commands
2.1.3 local-user password-display-mode
2.2 TFTP Configuration Commands
Chapter 1 File System Management Configuration Commands
For Ethernet switches that support intelligent resilient framework (IRF), you can specify a file path and file name in one of the following ways:
l In universal resource locator (URL) format and starting with “unit[No.]>flash:/” ( [No.] represents the unit ID of the switch). This method is used to specify a file on a specified unit. For example, if the unit ID of the switch is 1, the URL of a file named text.txt and residing in the root directory must be “unit1>flash:/text.txt”.
l In URL format and starting with “flash:/”. This method can be used to specify a file in the Flash memory of the current unit.
l Using the path name or file name directly. This method can be used to specify a path or a file in the current directory.
1.1 File Attribute Configuration Commands
1.1.1 boot attribute-switch
Syntax
boot attribute-switch { all | app | configuration | web } fabric
View
User view
Parameter
all: Specifies all the files, including app files, configuration files and Web files.
app: Specifies app files.
configuration: Specifies configuration files.
web: Specifies Web files.
fabric: Specifies to apply the configuration to the whole fabric.
Description
Use the boot attribute-switch command to switch between the main and backup attribute for all the files or a specified type of files. That is, change a file with the main attribute to one with the backup attribute, or vice versa.
Example
# Switch the attributes of all the files in the fabric.
<H3C> boot attribute-switch all fabric
The boot, web and configuration file's backup-attribute and main-attribute will exchange.
Are you sure? [Y/N] y
The boot, web and configuration file's backup-attribute and main-attribute successfully exchanged on unit 1!
The boot, web and configuration file's backup-attribute and main-attribute successfully exchanged on unit 2!
1.1.2 boot boot-loader
Syntax
boot boot-loader file-url [ fabric ]
View
User view
Parameter
file-url: Path or the name of the app file in the Flash memory, a string comprising 1 to 64 characters.
fabric: Specifies to apply the configuration to the whole fabric.
Description
Use the boot boot-loader command to configure an app file of the fabric or of a device in the fabric to be with the main attribute. The app file specified by this command becomes the main startup file when the device starts up next time.
If you execute the boot boot-loader command without the fabric keyword, the configuration applies to the local unit only.
Caution:
Before configuring the main or backup attribute for a file in the fabric, make sure the file already exists on all devices in the fabric. This is because Ethernet switches do not allows you to specify an app file in other unit’s Flash memory as the app startup file of the local unit.
Example
# Configure the file named boot.bin to be the main startup file of the fabric.
<H3C> boot boot-loader boot.bin fabric
The specified file will be booted next time on unit 1!
The specified file will be booted next time on unit 2!
1.1.3 boot boot-loader backup-attribute
Syntax
boot boot-loader backup-attribute file-url [ fabric ]
View
User view
Parameter
file-url: Path or the name of the app file in the Flash memory, a string comprising 1 to 64 characters.
fabric: Specifies to apply the configuration to the whole fabric.
Description
Use the boot boot-loader backup-attribute command to configure an app file of the fabric or of a device in the fabric to be with the backup attribute. The app file specified by this command becomes the backup startup file when the device starts up next time. When the main startup file is unavailable, the backup startup file is used to start the switch.
If you execute the boot boot-loader backup-attribute command without the fabric keyword, the configuration applies to the local unit only.
Caution:
Before configuring the main or backup attribute for a file in the fabric, make sure the file already exists on all devices in the fabric. This is because Ethernet switches do not allows you to specify an app file in other unit’s Flash memory as the app startup file of the local unit.
Example
# Configure the file named backup.bin to be the backup startup file of the fabric.
<H3C> boot boot-loader backup-attribute backup.bin fabric
Set boot file backup-attribute successfully on unit 1!
Set boot file backup-attribute successfully on unit 2!
1.1.4 boot web-package
Syntax
boot web-package webfile { backup | main }
View
User view
Parameter
webfile: Name of a Web file, a string comprising 5 to 127 characters.
main: Specifies the file to be with the main attribute.
backup: Specifies the file to be with the backup attribute.
Description
Use the boot web-package command to configure a Web file in the fabric to be with the main or backup attribute.
Caution:
l Before configuring the main or backup attribute for a Web file in the fabric, make sure the file exists on all devices in the fabric.
l The configuration of the main or backup attribute for a Web file takes effect immediately without restarting the device.
l After you upgrade a Web file, you need to specify the new Web file in the Boot menu after restarting the switch. Otherwise, the Web server cannot function normally.
Example
# Configure the Web file named boot.web to be with the main attribute.
<H3C> boot web-package boot.web main
1.1.5 display boot-loader
Syntax
display boot-loader [ unit unit-id ]
View
Any view
Parameter
unit unit-id: Specifies the unit ID of a switch.
Description
Use the display boot-loader command to display the information about the app startup files of the fabric or of a specific device in the fabric. Displayed information includes the current app startup file name, and the main and backup app startup files to be used when the switch starts up next time.
If you execute the display boot-loader command without unit unit-id, the information of all app startup files of the fabric will be displayed.
Example
# Display the information about the app startup files of unit 1.
<H3C> display boot-loader unit 1
Unit 1
The current boot app is: s3600.bin
The main boot app is: s3600.bin
The backup boot app is: s3600bak.bin
1.1.6 startup bootrom-access enable
Syntax
startup bootrom-access enable
undo startup bootrom-access enable
View
User view
Parameter
None
Description
Use the startup bootrom-access enable command to specify a switch to prompt users to use customized password to enter the BOOT menu.
Use the undo startup bootrom-access enable command to disable the above function.
By default, users have to use customized passwords to enter the BOOT menu.
You can use the display startup command to view the execution results of these two commands.
Example
# Specify to prompt users to use customized passwords to enter the BOOT menu.
<H3C> startup bootrom-access enable
1.2 File System Configuration Commands
& Note:
Note to limit the lengths of device name, directory name, file path and file name within the following ranges regulated for the switch.
l A directory name should be no more than 91 characters.
l A file name plus its local path name should be no more than 127 characters.
l A device name should be no more than 14 characters.
l A file name plus its complete path name should be no more than 142 characters.
1.2.1 cd
Syntax
cd directory
View
User view
Parameter
directory: Target directory.
Description
Use the cd command to enter a specified directory on the Ethernet switch.
The default directory is the root directory of Flash memory.
Example
# Enter the directory named test.
<H3C> cd test
<H3C> pwd
unit1>flash:/test
1.2.2 copy
Syntax
copy fileurl-source fileurl-dest
View
User view
Parameter
fileurl-source: Path name or file name of the source file in the Flash memory.
fileurl-dest: Path name or file name of the target file in the Flash memory.
Description
Use the copy command to copy a file.
If the fileurl-dest argument identifies an existing file, the system prompts you for the confirmation to overwrite the existing file.
Example
# Copy the file from flash:/config.cfg into flash:/test/1.cfg.
<H3C> copy flash:/config.cfg flash:/test/1.cfg
Copy unit1>flash:/config.cfg to unit1>flash:/test/1.cfg?[Y/N]:y
...
%Copy file unit1>flash:/config.cfg to unit1>flash:/test/1.cfg...Done.
1.2.3 delete
Syntax
delete [ /unreserved ] file-url
delete { running-files | standby-files } [ /fabric ] [ /unreserved ]
View
User view
Parameter
/unreserved: Specifies to delete a file completely.
file-url: Path name or file name of a file in the Flash memory. You can use the * character in this argument as a wildcard. For example, the delete *.txt command deletes all the files with txt as their extensions.
running-files: Specifies to delete all the files with the main attribute.
standby-files: Specifies to delete all the files with the backup attribute.
/fabric: Specifies to delete all the specified files in the fabric.
Description
Use the delete command to delete a specified file from the Flash memory on a switch.
You can use the * character in the argument as a wildcard.
If you execute the delete command with the /unreserved keyword specified, the specified file is permanently deleted. That is, the file cannot be restored.
You can delete files based on file attribute. If you execute the delete running-files command, all the files with the main attribute will be deleted. If you execute the delete standby-files command, all the files with the backup attribute will be deleted.
For a file that has both the main and backup attributes, the delete running-files deletes its main attribute only instead of deleting the file itself, and the delete standby-files command deletes its backup attribute only instead of deleting the file itself.
Following are the notes concerning with the deleted files:
l The deleted files are moved to the recycle bin.
l The dir command cannot display the information about deleted files.
l To display the information about deleted files, use the dir /all command.
l To restore a deleted file, use the undelete command.
l To restore the deleted files from the recycle bin, use the undelete command; to delete the files permanently from the recycle bin, use the reset recycle-bin command.
When you use the delete running-file or delete standby-file command, you will be prompted to confirm whether to delete all files with the main/backup attribute. If you choose yes, the corresponding files are deleted. If you choose no, the system will further to prompt you to confirm the following items orderly:
1) Delete the image files with the main/backup attribute?
2) Delete the configuration files with the main/backup attribute?
3) Delete the Web files with the main/backup attribute?
The corresponding messages are displayed as follows:
Delete the running image file? [Y/N]:n
Delete the running config file? [Y/N]:n
Delete the running web file? [Y/N]:n
Delete the backup image file? [Y/N]:n
Delete the backup config file? [Y/N]:n
Delete the backup web file? [Y/N]:n
The corresponding files will be deleted after you choose yes.
Caution:
For deleted files whose names are the same, only the latest deleted file is stored in the recycle bin and can be restored.
Example
# Delete the file test/test.txt on the local unit.
<H3C> delete test/test.txt
Delete unit1>flash:/test/test.txt?[Y/N]:y
.
%Delete file unit1>flash:/test/test.txt...Done.
# Delete the files with the main attribute in the fabric.
<H3C> delete running-files /fabric
Delete the running files ? [Y/N]:y
Start deleting ..........
Unit1 delete success!
Unit2 delete success!
%Apr 4 11:25:40:973 2000 H3C VFS/6/OPLOG:- 1 - Unit1 delete success!
%Apr 4 11:25:41:56 2000 H3C VFS/6/OPLOG:- 1 – Unit2 delete success!
Deleting ... done
1.2.4 dir
Syntax
dir [ /all ] [ /fabric | file-url ]
View
User view
Parameter
/all: Specifies to display the information about all the files, including those in the recycle bin.
/fabric: Specifies to display the information about all the specified files in the fabric.
file-ur: Path name or the name of a file in the Flash memory. You can use the * character as a wildcard. For example, the dir *.txt command displays the information about all the files with the extension of txt in the current directory.
Description
Use the dir command to display the information about the specified files or directories in the Flash memory on a switch.
You can use the * character as a wildcard.
In the output information, files with the main, backup or main/backup attribute are tagged.
& Note:
In the output information of the dir /all command, deleted files (that is, those in the recycle bin) are embraced in brackets.
Example
# Display the information about all the ordinary files in the root directory of the file system on the local unit.
<H3C> dir
Directory of unit1>flash:/
1 (*) -rw- 5792495 Apr 02 2000 00:06:50 s3600.bin
2 (*) -rw- 1965 Apr 01 2000 23:59:13 3comoscfg.cfg
3 -rw- 5841301 Apr 02 2000 21:42:13 s3600d8.bin
4 -rw- 224 Apr 02 2000 01:36:30 s3800.bin
5 -rw- 279296 Apr 02 2000 00:22:01 test.abc
15367 KB total (3720 KB free)
(*) -with main attribute (b) -with backup attribute
(*b) -with both main and backup attribute
# Display the information about all the files (including the files in the recycle bin) in the root directory of the file system of the fabric.
<H3C> dir /all /fabric
Directory of unit1>flash:/
1 (*) -rw- 5792495 Apr 02 2000 00:06:50 s3600.bin
2 -rwh 4 Apr 01 2000 23:55:26 snmpboots
3 -rwh 151 Apr 02 2000 00:05:53 private-data.txt
4 (*) -rw- 1965 Apr 01 2000 23:59:13 3comoscfg.cfg
5 -rw- 5841301 Apr 02 2000 21:42:13 s3600d8.bin
6 -rw- 224 Apr 02 2000 01:36:30 s3800.bin
7 -rw- 279296 Apr 02 2000 00:22:01 test.abc
8 -rw- 2370 Apr 02 2000 02:49:12 [1.cfg]
15367 KB total (3720 KB free)
Directory of unit2>flash:/
0 -rwh 4 Apr 01 2000 23:55:24 snmpboots
1 (*) -rw- 4724347 Apr 01 2000 23:59:45 s3600.bin
2 (*) -rw- 1475 Apr 01 2000 23:59:53 3comoscfg.cfg
3 -rw- 1737 Apr 02 2000 00:46:21 cfg.cfg
4 -rw- 279296 Apr 02 2000 00:21:55 love.rar
5 -rw- 428 Apr 02 2000 13:07:11 hostkey
6 -rwh 151 Apr 01 2000 23:58:39 private-data.txt
7 -rw- 572 Apr 02 2000 13:07:20 serverkey
8 -rw- 1589 Apr 02 2000 00:58:20 1.cfg
15367 KB total (10475 KB free)
(*) -with main attribute (b) -with backup attribute
(*b) -with both main and backup attribute
# Display the information about all the files whose names begin with the character t (including those in the recycle bin) in the local directory unit1>flash:/test/.
Directory of unit1>flash:/test/
0 -rw- 279296 Apr 04 2000 14:45:19 test.txt
15367 KB total (3720 KB free)
(*) -with main attribute (b) -with backup attribute
(*b) -with both main and backup attribute
1.2.5 execute
Syntax
execute filename
View
System view
Parameter
filename: Batch file, with the extension .bat.
Description
Use the execute command to execute the specified batch file.
This command executes command lines in the batch file in sequence. Note that the batch file cannot contain any invisible character. If any invisible character is found, the command will quit the current execution process and the executed operations are not cancelled automatically.
The batch execution command is the automation of executing commands in a batch file. However it
l Does not guarantee that every command in the file is executed.
l Does not perform hot backup.
l Does not restrict the forms and contents of commands in the file.
Example
# Execute the batch file named test.bat under the directory flash:/.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] execute test.bat
<H3C>
....
%Created dir unit1>flash:/test3.
1.2.6 file prompt
Syntax
file prompt { alert | quiet }
View
System view
Parameter
alert: Specifies to prompt for confirmation before performing file-related operations that have potential risks.
quiet: Specifies to disable prompts for file-related operations.
Description
Use the file prompt command to configure the prompt mode for file-related operations.
By default, alert mode is used, by which a switch prompts for confirmation before performing file-related operations that have potential risks.
If you set the prompt mode of the file-related operations to quiet, the switch does not prompt for confirmation before performing file-related operations. In this case, the system is more likely to operate improperly if irretrievable file-related operations are performed. For example, if the prompt mode is set to alert, the following messages will be displayed when you delete a file:
<H3C> delete unit1>flash:/te.txt
Delete unit1>flash:/te.txt?[Y/N]:y
......
%Delete file unit1>flash:/te.txt...Done.
If the prompt mode is set to quiet, the following messages will be displayed when you delete a file:
<H3C> delete unit1>flash:/te.txt
....
%Delete file unit1>flash:/te.txt...Done.
Example
# Set the prompt mode to quiet for file-related operations.
System View: return to User View with Ctrl+Z.
[H3C] file prompt quiet
1.2.7 fixdisk
Syntax
fixdisk device
View
User view
Parameter
device: Name of a device.
Description
Use the fixdisk command to restore space on the Flash memory.
In case that space on the Flash memory may become unavailable for reasons such as abnormal operations, you can run this command to restore the space.
Example
# Restore space on the Flash memory.
<H3C> fixdisk flash:
Fixdisk flash: may take some time to complete.
%Fixdisk unit1>flash: completed.
1.2.8 format
Syntax
format device
View
User view
Parameter
device: Name of a device.
Description
Use the format command to format the Flash memory.
Caution:
The format operation leads to the loss of all the files on the Flash memory, and the operation is irretrievable.
Example
# Format the Flash memory.
All data on unit1>flash: will be lost , proceed with format ? [Y/N]:y
..............................
%Format unit1>flash: completed.
1.2.9 mkdir
Syntax
mkdir directory
View
User view
Parameter
directory: Name of a directory.
Description
Use the mkdir command to create a directory in the specified directory of a Flash memory.
Note that the names of the directories and files in the same directory must be unique.
Example
# Create a directory in the current directory, with the name being dd.
....
%Created dir unit1>flash:/dd.
1.2.10 more
Syntax
more file-url
View
User view
Parameter
file-url: Path name or file name of a file in the Flash memory.
Description
Use the more command to display the contents of a specified file.
Currently, the contents of a file can only be displayed in text.
Example
# Display the content of the file named test.txt.
AppWizard has created this test application for you.
This file contains a summary of what you will find in each of the files that make up your test application.
Test.dsp
This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally.
1.2.11 move
Syntax
move fileurl-source fileurl-dest
View
User view
Parameter
fileurl-source: Path name or file name of the source file in the Flash memory.
fileurl-dest: Path name or file name of the target file in the Flash memory.
Description
Use the move command to move a file to a specified directory.
If the target file name is the same as an existing file, the system prompts you for the confirmation to overwrite the existing file.
Example
# Move the file named 1.txt from flash:/ to flash:/a/ within unit1, with the name unchanged.
<H3C>move unit1>flash:/1.txt unit1>flash:/a/
Move unit1>flash:/1.txt to unit1>flash:/a/1.txt?[Y/N]:y
.
%Moved file unit1>flash:/1.txt to unit1>flash:/a/1.txt.
1.2.12 pwd
Syntax
pwd
View
User view
Parameter
None
Description
Use the pwd command to display the current path.
Example
# Display the current path.
<H3C> pwd
unit1>flash:
1.2.13 rename
Syntax
rename fileurl-source fileurl-dest
View
User view
Parameter
fileurl-source: Original path name or file name of a file in the Flash memory.
fileurl-dest: Target path name or file name.
Description
Use the rename command to rename a file or a directory.
If the target file name or directory name is the same with any existing file name or directory name, you will fail to perform the rename operation.
Example
# Rename the file named config.txt to config.bak.
<H3C>rename config.txt config.bak
Rename unit1>flash:/config.txt to unit1>flash:/config.bak?[Y/N]:y
.
%Renamed file unit1>flash:/config.txt to unit1>flash:/config.bak.
1.2.14 reset recycle-bin
Syntax
reset recycle-bin [ file-url ] [ /force ]
reset recycle-bin [ /fabric ]
View
User view
Parameter
file-url: Path name or file name of a file in the Flash memory. This argument supports the wildcard “*”.
/force: Specifies not to prompt for confirmation before deleting files.
/fabric: Specifies to clear the recycle bins of all Flash memories in the fabric.
Description
Use the reset recycle-bin command to clear the recycle bin in the Flash memory.
The files deleted by the delete command are moved to the recycle bin. To delete them permanently, you can use the reset recycle-bin command.
& Note:
The system will not prompt you to confirm deletion of each file when you clear recycle bins throughout the fabric.
Example
# Clear the recycle bin in unit 1 of the fabric.
<H3C>reset recycle-bin unit1>flash:/
Clear unit1>flash:/te.txt ?[Y/N]:y
Clearing files from flash may take a long time. Please wait...
.....
%Cleared file unit1>flash:/~/te.txt.
1.2.15 rmdir
Syntax
rmdir directory
View
User view
Parameter
directory: Name of a directory.
Description
Use the rmdir command to delete a directory.
As only empty directories can be deleted, you need to clear a directory before deleting it.
Example
# Delete the directory named dd.
Rmdir unit1>flash:/dd?[Y/N]:y
....
%Removed directory unit1>flash:/dd.
1.2.16 undelete
Syntax
undelete file-url
View
User view
Parameter
file-url: Path name or file name of a file in the Flash memory.
Description
Use the undelete command to restore a deleted file from the recycle bin.
If the name of the file to be restored is the same as that of an existing file, the system prompts you for the confirmation to overwrite the latter.
Example
# Restore the deleted file named sample.bak.
Undelete unit1>flash:/sample.bak ?[Y/N]:y
% Undeleted file unit1>flash:/sample.bak.
1.2.17 update fabric
Syntax
update fabric file-name
View
User view
Parameter
file-name: Name of the file to be upgraded, a string comprising 1 to 64 characters.
Description
Use the update fabric command to use an app file, Boot ROM or Web file on a device in the fabric to upgrade all the units in the fabric.
Caution:
Use the update fabric command after all traffics are stopped.
Global upgrade to app, Web and Boot ROM files is supported currently. The types of files to be upgraded can be distinguished by the file extension. For example, S3600.bin, S3600.btm and S3600.web represents host software, Boot ROM files and Web files respectively.
& Note:
l You can upgrade files with such extensions as web, bin and btm.
l The file used for upgrading must exist in the root directory of a unit in the fabric.
l After the upgrade is completed, the file used for upgrading will be copied to the root directories of other units in the fabric.
l When you execute the update fabric command, the system first collects the free space information of each unit and then decides whether the available Flash memory space is enough on each unit. The available space should be at least 1 K larger than the size of file used for upgrading. If any space inefficiency is found, the system will prompt the user to provide enough space on the Flash memory of the unit. Otherwise, the upgrade cannot be implemented.
l Before the file is copied to all units, the system collects version information of files in the corresponding type, compares the version compatibility, and outputs the result. If the file used for upgrading cannot replace the corresponding file on any unit, the command fails and a message is given, describing the failure reason.
Example
# Upgrade all units in the fabric with the app file named s3600.bin on the local unit.
Fabric name is 3600, system mode is L3.
Fabric authentication : no authentication, number of units in stack: 1.
Unit Name Unit ID
First 1(*)
First 2
First 8
<H3C>update fabric s3600.bin
This will update the Fabric. Continue? [Y/N] y
The software is verifying ...
The result of verification is :
Unit ID Free space(bytes) Enough Version comparison
1 2126848 Y Y
2 2125824 Y Y
8 1439744 Y Y
warning: the verification is completed, start the file transmission [Y/N] y
The fabric is being updated, 100%
The s3600.bin is stored on unit 1 successfully
The s3600.bin is stored on unit 2 successfully
The s3600.bin is stored on unit 8 successfully
Do you want to set s3600.bin to be running agent next time to boot[Y/N] y
The s3600.bin is configured successfully
1.3 Configuration File Backup and Restore Commands
1.3.1 backup current-configuration
Syntax
backup { unit unit-id | fabric } current-configuration to { dest-addr | dest-hostname } filename.cfg
View
User view
Parameter
unit-id: Unit ID of a switch.
fabric: Specifies to back up the configuration of the whole fabric system.
dest-addr: IP address of a TFTP server.
dest-hostname: Host name of a TFTP server.
filename.cfg: Name of the configuration file to which the current configuration will be backed up, a string of 5 to 56 characters (including the extension .cfg).
Description
Use the backup unit current-configuration to command to back up the current configuration of a specified switch to a file on a TFTP server.
Use the backup fabric current-configuration to command to back up the current configurations of all the switches in the fabric to a file on a TFTP server.
Example
# Back up the current configuration of unit 8 to the file aaa.cfg on the TFTP server whose IP address is 1.1.1.253.
<H3C> backup unit 8 current-configuration to 1.1.1.253 aaa.cfg
Backup current configuration to 1.1.1.253. Please wait...
File will be transferred in binary mode.
Copying file to remote tftp server. Please wait...
TFTP: 1958 bytes sent in 2 second(s).
File uploaded successfully.
Unit 8: Backup current configuration finished!
# Back up the current configuration of the whole fabric to the file aaa.cfg on the TFTP server whose IP address is 1.1.1.253.
<H3C> backup fabric current-configuration to 1.1.1.253 aaa.cfg
Backup current configuration to 1.1.1.253. Please wait...
File will be transferred in binary mode.
Copying file to remote tftp server. Please wait...
TFTP: 2029 bytes sent in 2 second(s).
File uploaded successfully.
Unit 7: Backup current configuration finished!
Unit 8: Backup current configuration finished!
1.3.2 restore startup-configuration from
Syntax
restore { unit unit-id | fabric } startup-configuration from { source-addr | source-hostname } filename.cfg
View
User view
Parameter
unit-id: Unit ID of a switch.
fabric: Specifies to restore the configuration of the whole fabric system.
source-addr: IP address of a TFTP server.
source-hostname: Host name of a TFTP server
filename.cfg: Name of the configuration file to be restored to, a string of 5 to 56 characters (including the extension .cfg).
Description
Use the restore unit startup-configuration from command to restore the startup configuration of a specified switch from a file on a TFTP server.
Use the restore fabric startup-configuration from command to restore the startup configuration of the whole fabric from a file on a TFTP server.
Example
# Restore the startup configuration of unit 7 from the file aaa.cfg on the TFTP server with the IP address 1.1.1.253.
<H3C> restore unit 7 startup-configuration from 1.1.1.253 aaa.cfg
Restore startup configuration from 1.1.1.253. Please wait...
File will be transferred in binary mode.
Downloading file from remote tftp server, please wait...
TFTP: 1958 bytes sent in 0 second(s).
File downloaded successfully.
Unit 7: Restore startup current configuration finished!
# Restore the startup configuration of the whole fabric from the file bbb.cfg on the TFTP server with the IP address 1.1.1.253.
<H3C> restore fabric startup-configuration from 1.1.1.253 bbb.cfg
Restore startup configuration from 1.1.1.253. Please wait...
File will be transferred in binary mode.
Downloading file from remote tftp server, please wait...
TFTP: 2029 bytes sent in 0 second(s).
File downloaded successfully.
Unit 7: Restore startup current configuration finished!
Unit 8: Restore startup current configuration finished!
Chapter 2 FTP/TFTP Lighting Configuration Commands
2.1 FTP Configuration Commands
2.1.1 ftp server enable
Syntax
ftp server enable
undo ftp server
View
System view
Parameter
None
Description
Use the ftp server enable command to enable FTP server and allow FTP users to log in.
Use the undo ftp server command to disable FTP server and deny FTP users to log in.
By default, FTP server is disabled.
You can use the commands here to enable or disable FTP server. Disabling FTP server can ensure secure operating of the device.
Example
# Disable FTP server.
System View: return to User View with Ctrl+Z.
[H3C] undo ftp server
% Close FTP server
2.1.2 local-user
Syntax
local-user user-name
undo local-user { user-name | all [ service-type { telnet | ftp | lan-access | ssh | terminal } ] }
View
System view
Parameter
user-name: Local user name, a character string of no more than 80 characters. This string cannot contain the following characters: /:*?<>. It can contain no more than one "@" character; the pure user name (the part before "@", that is, the user ID) cannot be longer than 55 characters. The user name is case-insensitive; that is, the system considers UserA and usera as the same user.
service-type: Specifies a user type. You can specify one of the following user types: telent, ftp, lan-access (this type of users are mainly Ethernet access users, for example, 802.1x users), ssh, and terminal (this type of users can use terminal service, that is, the users can log into the switch through Console port, AUX port, or Asynchronous serial port).
all: Specifies all users.
Description
Use the local-user command to add a local user and enter local user view.
Use the undo local-user command to delete the specified local user(s).
Example
# Add a local user named hello1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] local-user hello1
New local user added.
[H3C-luser-hello1]
2.1.3 local-user password-display-mode
Syntax
local-user password-display-mode { auto | cipher-force }
undo local-user password-display-mode
View
System view
Parameter
auto: Specifies to display passwords in the modes adopted when the passwords are set. If a password is set in cipher mode, the password will be displayed in cipher text; or else, the password will be displayed in plain text.
cipher-force: Specifies to display passwords in cipher text forcibly.
Description
Use the local-user password-display-mode command to set the password display mode when the switch displays the local users.
Use the undo local-user password-display-mode command to restore the default password display mode.
If the cipher-force mode is adopted, the passwords will be displayed in cipher text even though the password command is used to specify the password display mode to simple.
By default, the password display mode of local users is auto.
Example
# Set the password display mode when the switch displays local users to cipher-force.
System View: return to User View with Ctrl+Z.
[H3C] local-user password-display-mode cipher-force
2.1.4 password
Syntax
password { simple | cipher } password
undo password
View
Local user view
Parameter
simple: Specifies to display password in plain text.
cipher: Specifies to display password in cipher text.
password: Password to be set. In simple mode, it is a string of 1 to 63 characters; in cipher mode, it is a character string of 1 to 63 characters or fixed 88 characters.
Description
Use the password command to set a password for the local user.
Use the undo password command to cancel the password setting.
Note that, after the local-user password-display-mode cipher-force command is used, the user password will be displayed in cipher text even though the password command is used to specify the password display mode to simple.
Example
# Set the password of user hello1 to 20030422 in plain text.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] local-user hello1
[H3C-luser-hello1] password simple 20030422
2.1.5 ftp
Syntax
ftp [ ipaddress [ port ] ]
View
User view
Parameter
ipaddress: IP address of a remote FTP server.
port: Port number of the remote FTP server. If the port argument is not specified, the default port number will be used.
Description
Use the ftp command to establish a control connection with a remote FTP server and enter FTP client view.
Example
# Connect to the remote FTP server whose IP address is 1.1.1.1.
Trying ...
Press CTRL+K to abort
Connected.
220 FTP service ready.
User(none):hello
331 Password required for hello.
Password:
230 User logged in.
2.1.6 get
Syntax
get remotefile [ localfile ]
View
FTP client command view
Parameter
localfile: Local file name.
remotefile: File name on the remote FTP server.
Description
Use the get command to download a remote file and save the file to the local device.
If no local file name is specified, the switch will save the remote file locally with the same file name as that on the remote FTP server
Example
# Download the file temp1.c and save it as local file temp.c .
Trying ...
Press CTRL+K to abort
Connected.
220 FTP service ready.
User(none):hello
331 Password required for hello.
Password:
230 User logged in.
[ftp] get temp1.c temp.c
200 Port command okay.
150 Opening ASCII mode data connection for temp1.c.
..226 Transfer complete.
FTP: 1709 byte(s) received in 2.176 second(s) 0.00 byte(s)/sec.
[ftp]
2.2 TFTP Configuration Commands
2.2.1 tftp get
Syntax
tftp tftp-server get source-file [ dest-file ]
View
User view
Parameter
tftp-server: IP address or host name of a TFTP server.
source-file: Name of the file which will be downloaded from the TFTP server.
dest-file: Name of the file to which the downloaded file will be saved on the switch.
Description
Use the tftp get command to download a file from a TFTP server to this switch.
Example
# Download the file LANSwitch.bin from the TFTP server, whose IP address is 1.1.3.214, to this switch and save it to the file vs.bin.
<H3C> tftp 1.1.3.214 get LANSwitch.bin vs.bin