H3C Technologies H3C SecBlade NetStream Cards User Manual

Page 266

Advertising
background image

251

Set the access parameters for the FTP client (including enabling the FTP server function, setting the

FTP username to aaa and password to hello, and setting the user to have access to the cfa0:/aaa
directory).

<FTP-Server> system-view
[FTP-Server] ftp server enable
[FTP-Server] local-user aaa
[FTP-Server-luser-aaa] password cipher hello
[FTP-Server-luser-aaa] service-type ftp
[FTP-Server-luser-aaa] authorization-attribute work-directory cfa0:/aaa

Use text editor on the FTP server to edit batch file auto-update.txt. The following is the content of the
batch file:

return
startup saved-configuration new-config.cfg
boot-loader file soft-version2.bin main
reboot

2.

Configuration on SecBlade

# Log in to the FTP server.

<SecBlade> ftp 2.2.2.2
Trying 2.2.2.2 ...
Press CTRL+K to abort
Connected to 2.2.2.2.
220 WFTPD 2.0 service (by Texas Imperial Software) ready for new user
User(2.2.2.2:(none)):aaa
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]

# Download the auto-update.txt file on the FTP server.

[ftp] ascii
[ftp] get auto-update.txt

# Download file new-config.cfg on the FTP server.

[ftp]get new-config.cfg

# Download the soft-version2.bin file on the FTP server.

[ftp] binary
[ftp] get soft-version2.bin
[ftp] bye
<SecBlade>

# Change the extension of file auto-update.txt to .bat.

<SecBlade> rename auto-update.txt auto-update.bat

To ensure correctness of the file, use the more command to view the content of the file.
# Execute the scheduled automatic execution function to enable the device to be automatically upgraded

at 3 am.

<SecBlade> system-view
[SecBlade] job autoupdate
[SecBlade-job-autoupdate] view system-view
[SecBlade-job-autoupdate] time 1 one-off at 03:00 command execute auto-update.bat

Advertising