Hello everyone,
Today I will share with you the configuration of accessing files on other devices using FTP.
Overview
After a switch is configured as an FTP client, it can log in to the FTP server for transferring files and managing files and directories on the FTP server. The configuration for accessing other devices using FTP is simple, and FTP supports file transfer and file directory management. FTP provides the authorization and authentication functions for managing files. However, data is transferred in plaintext, which brings security risks.
FTP is applicable to file transfer when high network security is not required and is often used for downloading the system software from the FTP server and backing up the configuration file.
Configuration Notes
Before accessing files on the FTP server, ensure that routes are reachable between the switch and FTP server.
FTP is an insecure protocol. Using SFTP V2, Secure Copy Protocol (SCP), or FTPS is recommended.
This example applies to all versions of all S series switches.
NOTE:
The following uses the command lines and outputs of the S5720EI running V200R008C00 as an example.
Networking Requirements
As shown in Figure 3-24, the remote server at IP address 10.1.1.1/24 functions as the FTP server. The switch at IP address 10.2.1.1/24 functions as the FTP client and has reachable routes to the FTP server.
The switch needs to be upgraded. You need to download the system software from the FTP server to the switch and back up the current configuration file of the switch to the FTP server.
Figure 3-24 Networking diagram for accessing files on another device using FTP
Configuration Roadmap
The configuration roadmap is as follows:
Run the FTP software on the FTP server and configure an FTP user.
Establish an FTP connection between the switch and the FTP server.
Upload and download files on the switch using FTP commands.
Procedure
Run the FTP software on the FTP server and configure an FTP user. For the detailed operations, see the help document of the third-party FTP software.
Establish an FTP connection between the switch and the FTP server.
<HUAWEI> ftp 10.1.1.1 Trying 10.1.1.1 ... Press CTRL+K to abort Connected to 10.1.1.1. 220 FTP service ready. User(10.1.1.1:(none)):admin 331 Password required for admin. Enter password: 230 User logged in.
Upload and download files on the switch using FTP commands.
[ftp] binary //Set the file transfer mode to binary. The default mode is ASCII. [ftp] get devicesoft.cc //Download the system software on the FTP server to the switch. [ftp] put vrpcfg.zip //Upload the backup configuration file on the switch to the FTP server. [ftp] quit
The ASCII mode is used to transfer text files, and the binary mode is used to transfer programs including the system software (with the file name extension of .cc, .bin, or .pat), images, voices, videos, compressed packages, and database files.
Verify the configuration.
# Run the dir command on the switch to check whether the system software is downloaded to the switch.
<HUAWEI> dir Directory of flash:/ Idx Attr Size(Byte) Date Time FileName 0 -rw- 14 Mar 13 2012 14:13:38 back_time_a 1 drw- - Mar 11 2012 00:58:54 logfile 2 -rw- 4 Nov 17 2011 09:33:58 snmpnotilog.txt 3 -rw- 11,238 Mar 12 2012 21:15:56 private-data.txt 4 -rw- 7,717 Mar 12 2012 21:15:54 vrpcfg.zip 5 -rw- 14 Mar 13 2012 14:13:38 back_time_b 6 -rw- 106,616,955 Mar 13 2012 14:24:24 devicesoft.cc 7 drw- - Oct 31 2011 10:20:28 sysdrv 8 drw- - Feb 21 2012 17:16:36 compatible 9 drw- - Feb 09 2012 14:20:10 selftest 10 -rw- 19,174 Feb 20 2012 18:55:32 backup.cfg 11 -rw- 43,496 Dec 15 2011 20:59:36 20111215.zip 12 -rw- 588 Nov 04 2011 13:54:04 servercert.der 13 -rw- 320 Nov 04 2011 13:54:26 serverkey.der 14 drw- - Nov 04 2011 13:58:36 security ... 509,256 KB total (52,752 KB free)
# Check whether the file vrpcfg.zip is stored in the working directory on the FTP server.
Configuration Files
None
See more please click
That is all I want to share with you! Thank you!