- Table of Contents
-
- H3C S3600 Series Ethernet Switches Operation Manual-Release 1510(V1.04)
- 00-1Cover
- 00-2Product Overview
- 01-CLI Operation
- 02-Login Operation
- 03-Configuration File Management Operation
- 04-VLAN Operation
- 05-IP Address and Performance Configuration Operation
- 06-Management VLAN Operation
- 07-Voice VLAN Operation
- 08-GVRP Operation
- 09-Port Basic Configuration Operation
- 10-Link Aggregation Operation
- 11-Port Isolation Operation
- 12-Port Security-Port Binding Operation
- 13-DLDP Operation
- 14-MAC Address Table Operation
- 15-Auto Detect Operation
- 16-MSTP Operation
- 17-Routing Protocol Operation
- 18-Multicast Operation
- 19-802.1x Operation
- 20-AAA-RADIUS-HWTACACS-EAD Operation
- 21-VRRP Operation
- 22-Centralized MAC Address Authentication Operation
- 23-ARP Operation
- 24-DHCP Operation
- 25-ACL Operation
- 26-QoS-QoS Profile Operation
- 27-Web Cache Redirection Operation
- 28-Mirroring Operation
- 29-IRF Fabric Operation
- 30-Cluster Operation
- 31-PoE-PoE Profile Operation
- 32-UDP Helper Operation
- 33-SNMP-RMON Operation
- 34-NTP Operation
- 35-SSH Terminal Service Operation
- 36-File System Management Operation
- 37-FTP and TFTP Operation
- 38-Information Center Operation
- 39-System Maintenance and Debugging Operation
- 40-VLAN-VPN Operation
- 41-HWPing Operation
- 42-DNS Operation
- 43-Access Management Operation
- 44-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
36-File System Management Operation | 129 KB |
Table of Contents
Chapter 1 File System Management Configuration
1.1 File Attribute Configuration
1.1.1 Introduction to File Attributes
1.1.2 Configuring File Attributes
1.2.1 Introduction to File System
1.2.2 Introduction to Configuration Tasks on the File System
1.2.6 Prompt Mode Configuration
1.2.7 File System Configuration Example
1.3 Configuration File Backup and Restoration
Chapter 2 FTP/TFTP Lighting Configuration
2.1 FTP Lighting Configuration
2.2 TFTP Lighting Configuration
Chapter 1 File System Management Configuration
1.1 File Attribute Configuration
1.1.1 Introduction to File Attributes
An app file is an executable file, with .bin as the extension. A configuration file is used to store and restore configuration, with .cfg as the extension. A Web file is used for Web-based network management, with .web as the extension.
The app file, configuration file, and Web file have three kinds of attributes: main, backup and none, as described in Table 1-1.
Table 1-1 Descriptions on file attributes
Attribute name |
Description |
Feature |
Identifier |
main |
Identifies main startup files. The main startup file is used first for a switch to start up. |
In the Flash memory, there can be only one app file, one configuration file and one Web file with the main attribute. |
(*) |
backup |
Identifies backup startup files. The backup startup file is used after a switch fails to start up using the main startup file. |
In the Flash memory, there can be only one app file, one configuration file and one Web file with the backup attribute. |
(b) |
none |
Identifies files that are neither of main attribute nor backup attribute. |
— |
None |
& Note:
A file can have both the main and backup attributes. Files of this kind are labeled *b.
If a newly created file is configured to be with the main attribute, the existing file with the main attribute in the Flash memory will be changed to other attribute. This ensures that there can be only one app file, one configuration file and one Web file with the main attribute in the Flash memory. This circumstance also applies to the file with the backup attribute in the Flash memory.
File operations and file attribute operations are independent. For example, if you delete a file with the main attribute from the Flash memory, the other files in the flash memory will not possess the main attribute. If you download a file with the same name as the original file with the main attribute to the flash memory, the file will possess the main attribute.
After the BootROM of a switch is upgraded, the original default APP startup file has the main attribute.
1.1.2 Configuring File Attributes
You can configure and view the main attribute or backup attribute of the startup file used for the next startup of a switch, and change the main or backup attribute of the file.
Perform the configuration listed in Table 1-2 in user view. The display commands can be executed in any view.
Table 1-2 Configure file attributes
To do… |
Use the command… |
Remarks |
Configure the app file with the main attribute for the next startup |
boot boot-loader file-url [ fabric ] |
Optional |
Set the app file with the backup attribute for the next startup |
boot boot-loader backup-attribute file-url [ fabric ] |
Optional |
Configure the Web file and its attribute |
boot web-package webfile { backup | main } |
Optional |
Switch the file attributes between main and backup |
boot attribute-switch { all | app | configuration | web } fabric |
Optional |
Specify to enable user to use the customized password to enter the BOOT menu |
startup bootrom-access enable |
Optional By default, the user is enabled to use the customized password to enter the BOOT menu. |
Display the information about the app file used as the startup file |
display boot-loader [ unit unit-id ] |
Optional This command can be executed in any view. |
Caution:
l 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.
l The configuration of the main or backup attribute of a Web file takes effect immediately without restarting the switch.
l After upgrading 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.
l Currently, a configuration file has the extension of cfg and resides in the root directory of the Flash memory.
1.2 File System Configuration
1.2.1 Introduction to File System
To facilitate management on the Flash memory, Ethernet switches provide the file system module. The file system allows users to create/delete a directory, display the current work directory, display the contents of a directory, and access files.
By default, a switch prompts for confirmation before executing the commands which have potential risks (for example, deleting and overwriting files).
1.2.2 Introduction to Configuration Tasks on the File System
Table 1-3 Configuration tasks on the file system
Configuration task |
Description |
Related section |
Directory operation |
Optional |
Section 1.2.3 “Directory Operations” |
File operation |
Optional |
Section 1.2.4 “File Operations” |
Flash memory operation |
Optional |
Section 1.2.5 “Flash Memory Operations” |
Prompt mode configuration |
Optional |
Section 1.2.6 “Prompt Mode Configuration” |
& Note:
For Ethernet switches that support intelligent resilient framework (IRF), you can input a file path and file name in one of the following ways:
l In URL (universal resource locator) format and starting with “unit[No.]>flash:/” ([No.] represents the unit ID of a switch). This method is used to specify a file on a specified unit. For example, if the unit ID of a 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 Entering the path name or file name directly. This method can be used to specify a path or a file in the current work directory.
1.2.3 Directory Operations
The file system provides directory-related functions, such as:
l Creating/deleting a directory
l Displaying the current work directory, or contents in a specified directory
Table 1-4 describes the directory-related operations.
Perform the following configuration in user view.
Table 1-4 Directory operations
To do… |
Use the command… |
Remarks |
Create a directory |
mkdir directory |
Optional |
Delete a directory |
rmdir directory |
Optional Only empty directories can be deleted. |
Display the current work directory |
pwd |
Optional |
Display the information about specific directories and files |
dir [ /all ] [ /fabric | file-url ] |
Optional |
Enter a specified directory |
cd directory |
Optional |
& Note:
In the output information of the dir /all command, deleted files (that is, those in the recycle bin) are embraced in brackets.
1.2.4 File Operations
The file system also provides file-related functions, such as:
l Deleting a file
l Restoring a deleted file
l Deleting a file permanently
l Managing a configuration file
l Renaming a file
l Copying a file
l Moving a file
l Displaying the content of a file
l Displaying the information about a file
l Checking file system
Perform the following configuration in user view. Note that the execute command should be executed in system view, and the display command can be executed in any view.
To do… |
Use the command… |
Remarks |
Delete a file |
delete [ /unreserved ] file-url delete { running-files | standby-files } [ /fabric ] [ /unreserved ] |
Optional A deleted file can be restored if you delete it by executing the delete command without specifying the /unreserved keyword. You can use the undelete command to restore a deleted file of this kind. |
Delete a file from the recycle bin |
reset recycle-bin [ file-url ] [ /force ] reset recycle-bin [ /fabric ] |
Optional |
Upgrade the software of the whole fabric |
update fabric file-name |
Optional Use this command only after all traffics are stopped. |
Rename a file |
rename fileurl-source fileurl-dest |
Optional |
Copy a file |
copy fileurl-source fileurl-dest |
Optional |
Move a file |
move fileurl-source fileurl-dest |
Optional |
Display the content of a file |
more file-url |
Optional Currently, the file system only supports displaying the contents of a file in texts. |
Display the information about a directory or a file |
dir [ /all ] [ /fabric | file-url ] |
Optional |
Execute the specified batch file |
execute filename |
Optional This command should be executed in system view. |
Caution:
l For deleted files whose names are the same, only the latest deleted file is kept in the recycle bin and can be restored.
l The files which are deleted by the delete command without the /unreserved keyword are actually moved to the recycle bin and thus still take storage space. You can clear the recycle bin by using the reset recycle-bin command.
l Use the update fabric command after all traffic flows are stopped.
l The dir /all command displays the files in the recycle bin in square brackets.
l If the configuration files are deleted, the switch adopts the default configuration parameters when it starts up next time.
1.2.5 Flash Memory Operations
Perform the following Flash memory operations.
Table 1-6 Operations on the Flash memory
To do… |
Use the command… |
Remarks |
Format the Flash memory |
format device |
Required |
Restore space on the Flash memory |
fixdisk device |
Required |
Caution:
The format operation leads to the loss of all files, including the configuration files, on the Flash memory and is irretrievable.
1.2.6 Prompt Mode Configuration
You can set the prompt mode of the current file system to alert or quiet. In alert mode, the file system will give a prompt for confirmation if you execute a command which may cause data loss, for example, deleting or overwriting a file. In quiet mode, such prompt will not be displayed.
Table 1-7 Configuration on prompt mode of file system
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Configure the prompt mode of the file system |
file prompt { alert | quiet } |
Required By default, the prompt mode of the file system is alert. |
1.2.7 File System Configuration Example
# Display all the files in the root directory of the file system on the local unit.
<H3C> dir /all
Directory of unit1>flash:/
1 (*) -rw- 5822215 Jan 01 1970 00:07:03 s3600.bin
2 -rwh 4 Apr 01 2000 23:55:49 snmpboots
3 -rwh 428 Apr 02 2000 00:47:30 hostkey
4 -rwh 572 Apr 02 2000 00:47:38 serverkey
5 -rw- 1220 Apr 02 2000 00:06:57 song.cfg
6 -rw- 5026103 Jan 01 1970 00:04:34 s3600v1r1.bin
7 -rwh 88 Apr 01 2000 23:55:53 private-data.txt
8 (*) -rw- 1376 Apr 02 2000 01:56:28 config.cfg
15367 KB total (4634 KB free)
(*) -with main attribute (b) -with backup attribute
(*b) -with both main and backup attribute
# Copy the file flash:/config.cfg to flash:/test/, with 1.cfg as the name of the new file.
<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.
# Display the file information after the copy operation.
Directory of unit1>flash:/
1 (*) -rw- 5822215 Jan 01 1970 00:07:03 s3600.bin
2 -rwh 4 Apr 01 2000 23:55:49 snmpboots
3 -rwh 428 Apr 02 2000 00:47:30 hostkey
4 -rwh 572 Apr 02 2000 00:47:38 serverkey
5 -rw- 1220 Apr 02 2000 00:06:57 song.cfg
6 -rw- 5026103 Jan 01 1970 00:04:34 s3600v1r1.bin
7 -rwh 88 Apr 01 2000 23:55:53 private-data.txt
8 (*) -rw- 1376 Apr 02 2000 01:56:28 config.cfg
9 drw- - Apr 04 2000 04:50:07 test
15367 KB total (4631 KB free)
(*) -with main attribute (b) -with backup attribute
(*b) -with both main and backup attribute
<H3C> dir unit1>flash:/test/
Directory of unit1>flash:/test/
1 -rw- 1376 Apr 04 2000 04:50:30 1.cfg
15367 KB total (2025 KB free)
(*) -with main attribute (b) -with backup attribute
(*b) -with both main and backup attribute
1.3 Configuration File Backup and Restoration
Formerly, you can only back up and restore the configuration file of the units one by one in a fabric system.
By using the configuration backup and restoration feature, you can easily back up and restore the configuration files in the whole fabric as well as in a specific unit.
In the backup process, the system first saves the current configuration of a unit to the startup configuration file, and then uploads the file to the TFTP server. In the restore process, the system downloads the startup configuration file from the TFTP server to the local unit.
The configurations of different units in the fabric system can be saved in different .cfg configuration files on the TFTP server. These configuration files correspond to different unit IDs.
1.3.1 Operation Prerequisites
Before performing the following operations, you must first ensure that:
l The relevant units support TFTP client.
l The TFTP server is started and reachable.
1.3.2 Operation Procedure
Perform the following operations in user view.
Table 1-8 Back up and restore configuration file
Use the command… |
Remarks |
|
Back up the current configuration of a specified unit |
backup unit unit-id current-configuration to { dest-addr | dest-hostname } filename.cfg |
Optional |
Back up the current configuration of the whole fabric system |
backup fabric current-configuration to { dest-addr | dest-hostname } filename.cfg |
Optional |
Restore the startup configuration of a specified unit |
restore unit unit-id startup-configuration from { source-addr | source-hostname } filename.cfg |
Optional |
Restore the startup configuration of the whole fabric system |
restore fabric startup-configuration from { source-addr | source-hostname } filename.cfg |
Optional |
Chapter 2 FTP/TFTP Lighting Configuration
2.1 FTP Lighting Configuration
2.1.1 Introduction to FTP
File transfer protocol (FTP) is a commonly used protocol to transfer files over the Internet and IP networks. Before the emergence of World Wide Web (WWW), users transfer files with command lines mostly using the FTP.
FTP is an application-layer protocol in the TCP/IP protocol suite. It is used for file transfer between remote server and local host.
The Ethernet switch provides the following FTP services:
l FTP server: A user runs FTP client on a PC and logs into an FTP server (the network administrator should configure the IP address of the FTP server before the user log in). Then the user can access the files on the FTP server.
l FTP client: A user runs a terminal emulation program or Telnet program on a PC and connects to the Ethernet switch which acts as an FTP client. After that, the user enter the ftp X.X.X.X command (where, X.X.X.X represents the IP address of an FTP server) to establish a connection between the Ethernet switch and a remote FTP server. Then, the user can access the files on the remote FTP server.
2.1.2 FTP Lighting Procedure
Caution:
The FTP server and the FTP client must be reachable to each other.
I. Enabling FTP server on the switch
After FTP server is enabled on an S3600 switch, the seven-segment digital LED on the front panel of the switch will rotate clockwise when an FTP client is uploading file to the FTP server (the S3600 switch), and will stop rotating when the file uploading is finished, as show in Figure 2-1.
Figure 2-1 Clockwise rotating of the seven-segment digital LED
Table 2-1 Configuration for file upload from an FTP client to the switch acting as FTP server
Device |
To do… |
Use the command… |
Remarks |
FTP server (S3600) |
Enable FTP server |
ftp sever enable |
Required By default, FTP server is disabled. |
Add a local user and enter local user view |
local-user user-name |
Required |
|
Set a password for the local user |
password { simple | cipher } password |
Required |
|
Set the password display mode for local users |
local-user password-display-mode { auto | cipher-force } |
Optional By default, the mode is auto (that is, the switch displays user passwords in the modes configured when the passwords are set). |
|
FTP client |
Log into the remote FTP server |
— |
Required For detailed configuration, refer to the configuration instruction relevant to FTP client. |
Upload file from the FTP client to the FTP server |
— |
Required For detailed configuration, refer to the configuration instruction relevant to FTP client. |
II. Enabling FTP client on the switch
After FTP client is enabled on an S3600 switch, the seven-segment digital LED on the front panel of the switch will rotate clockwise when the FTP client (the S3600 switch) is downloading file from an FTP server, and will stop rotating when the file downloading is finished, as show in Figure 2-1.
Table 2-2 Configuration for file download from an FTP server to the switch acting as an FTP client
Device |
To do… |
Use the command… |
Remarks |
|
FTP server |
Enable FTP server |
— |
Required For detailed configuration, refer to the configuration instruction relevant to FTP server. |
|
Configure authentication/authorization of the FTP server |
— |
Required For detailed configuration, refer to the configuration instruction relevant to FTP server. |
||
FTP client |
Log into the remote FTP server |
ftp [ ipaddress [ port ] ] |
Required l The switch acts as an FTP client by default. l The user should first obtain an FTP user name and password, then log into the remote FTP server. Only after that, can the user obtain the access rights of corresponding directory and file. l When the user logs into the FTP server, the switch enters FTP client command view. |
|
Download files from the remote FTP server and save the files to the local device |
get remotefile [ localfile ] |
Required If no local file name is specified, the system will save the file from the remote FTP server to the local device using the original file name. |
||
2.2 TFTP Lighting Configuration
2.2.1 Introduction to TFTP
Compared with FTP, trivial file transfer protocol (TFTP) does not provide complex interactive access interface and authentication control, and is suitable for the environments that do not need complex interaction. TFTP is implemented based on user datagram protocol (UDP).
The TFTP file transfer is initiated by a client in the following scenarios:
l When a file needs to be downloaded, the client sends a read request to the TFTP server. It then receives data from the server and sends acknowledgement to the server.
l When a file needs to be uploaded, the client sends a write request to the TFTP server. It then sends data to the server and receives acknowledgement from the server.
TFTP can transfer files in two formats:
l Binary: used to transfer programs.
l ASCII code: used to transfer text files.
Before configuring TFTP, the network administrator should first configure the IP addresses of the TFTP client and server and ensure that the client and the server are reachable to each other.
The switch can only act as a TFTP client.
Figure 2-2 Network diagram for TFTP configuration
2.2.2 TFTP Lighting Procedure
Caution:
The TFTP server and the TFTP client must be reachable to each other.
After TFTP client is enabled on an S3600 switch, the seven-segment digital LED on the front panel of the switch will rotate clockwise when the TFTP client (the S3600 switch) is downloading file from a TFTP server, and will stop rotating when the file downloading is finished, as show in Figure 2-1.
Table 2-3 Download file from an TFTP server to the switch acting as an TFTP client
Device |
To do… |
Use the command… |
Remarks |
TFTP server |
Enable TFTP server |
— |
Required For detailed configuration, refer to the configuration instruction relevant to TFTP server. |
TFTP client |
Log into a remote TFTP server, download and save a remote file to the local device |
tftp tftp-server get source-file [ dest-file ] |
Required This command should be executed in user view. |