5-16
Configure the IP addresses of the two sides on the same network. In this section, the IP address of the
FTP client (PC) is set to 192.168.0.1, while that of the AC is set to 192.168.0.2. You can use the
ping
command on the PC or AC to check whether the connection is successful.
Step 2: Enable the FTP service.
You can enable the FTP service after configuring FTP server authentication and authorization. The FTP
server supports multi-client access. A remote FTP client sends a request to the FTP server. The FTP
server executes an action accordingly and returns the execution result to the client. Use the following
command to enable the FTP service.
[H3C]ftp server enable
% Start FTP server
Add an authorized FTP username and password.
[H3C]local-user guest Add the username guest
[H3C-luser- guest]service-type ftp Set the client type to FTP.
[H3C-luser- guest]password simple 123456 Add the password 123456 for the user guest
[H3C-luser-guest]authorization-attribute level 3 Set the user level to 3
Step 3: Maintain the AC.
After enabling the FTP service and configuring the username and password, you can enable FTP client
on the PC. In the following example, the FTP client application program is the built-in Windows XP FTP
client.
Type
ftp
in the
DOS
window, and the system prompt is changed to ftp>:
C:\Documents and Settings\Administrator>ftp
ftp> The system prompt is changed to ftp>
ftp> open 192.168.0.2 Connect to the AC IP address
Connected to 192.168.0.2.
220 FTP service ready.
User (192.168.0.2:(none)): guest Enter the usrname guest on the AC
331 Password required for guest
Password: Enter the password 123456
230 User logged in. The connection to the server succeeded.
Now, use the following commands to maintain the AC. In this example, the main.bin file on the AC is
copied to the PC.
ftp> binary Change the transfer mode to binary
200 Type set to I.
ftp> lcd c:\temp Change the local path
Local directory now C:\temp.
ftp> get main.bin main.bin Copy the file from the AC to the PC
200 Port command okay.
150 Opening BINARY mode data connection for main.bin.
226 Transfer complete.
ftp: 14323376 bytes received in 16.81Seconds 851.87Kbytes/sec.
Use the following command to overwrite the main.bin file on the AC.
ftp> put main.bin main.bin Overwrite the file on the AC with the local
backup file.
200 Port command okay.
150 Opening BINARY mode data connection for main.bin.