Maintaining Application Program and Configurations Through Command Lines
73
Step 1: Build maintenance environment as follows:
Figure 61
Router maintenance when it serves as the client
When the router serves as the client, you can run FTP server program on your PC
as the FTP server, and set the server path. Then, add user name and password for
the router.
Configure the IP addresses of the two sides to be in the same network. In this
section, the FTP server is set to 192.168.0.1, and the Ethernet interface connected
to it (Ethernet interface 0/0 in this example; so, any interface is OK) is set to
192.168.0.2. Both can use the
ping
command to check if the connection is
successful.
Step 2: Maintain the router through the terminal connected to the console port as
follow:
<H3C>ftp 192.168.0.1
Trying 192.168.0.1 ...
Press CTRL+K to abort
Connected to 192.168.0.1.
220 3Com 3CDaemon FTP Server Version 2.0
User(192.168.0.1:(none)): guest
Enter the user name configured on
the router
331 User name ok, need password
Password:
Enter the corresponding password
230 User logged in
Connect successfully
[ftp]
Use the command as follows to maintain the router.
Here,
get
and
put
commands are used to backup and recover files.
[ftp]get main.bin main.bin
Download files to the router from
the server
cf:/main.bin has been existing. Overwrite it?[Y/N]:y
Overwrite it or not?
200 PORT command successful.
150 File status OK ; about to open data connection
226 Closing data connection; File transfer successful.
FTP: 14323376 byte(s) received in 69.256 second(s) 206.00K byte(s)/sec.
[ftp]put main.bin main.bin
Backup the router files to the server
200 PORT command successful.
150 File status OK ; about to open data connection
226 Closing data connection; File transfer successful.
FTP: 14323376 byte(s) sent in 15.974 second(s) 896.00Kbyte(s)/sec.
[ftp]quit
Quit the FTP
221 Service closing control connection
Ethernet
ROUTER
(TFTP/FTP Client)
PC
(TFTP/FTP Server)
Console