Example for Implementing a Batch Upgrade Using the Commander
Networking Requirements
On the enterprise network shown in Figure 3-22, clients 1 through 6 in office buildings have reachable routes to the switch and file server. The IP address of the switch is 172.31.20.10/24, and the IP address of the file server is 172.31.1.90. To reduce labor costs and facilitate later upgrade and maintenance, the enterprise wants the clients to automatically obtain required files for batch upgrades.
Table 3-8 lists information about clients 1 through 6 and files that they need to load.
Client |
Device Type |
MAC Address |
IP Address |
Files to Be Loaded |
---|---|---|---|---|
Client1 |
S600-E |
- |
172.31.20.100/24 |
s600-e_1.cc header1.txt |
Client2 |
S600-E |
- |
– |
s600-e_2.cc |
Client3 |
S600-E |
- |
- |
s600-e_2.cc |
Client4 |
S600-E |
- |
172.31.10.10/24 |
s600-e_3.cc |
Client5 |
S600-E |
- |
- |
s600-e_2.cc |
Client6 |
S600-E |
5489-9875-ea12 |
- |
web_1.web.7z header.txt |
Configuration Roadmap
- Configure the file server and save the files to be loaded on the file server.
- Specify the Commander IP address on the clients.
Configure the Commander function on the switch to implement a batch upgrade using the Commander.
- Configure basic functions for the Commander.
- Configure groups for the clients and specify files to be loaded in the groups.
- Enable automatic configuration backup on the Commander to facilitate replacement of faulty devices in future maintenance.
- Some clients are connected in cascading networking. To ensure that downstream Client5 and Client6 can download required files successfully, configure a specific file activation time on the Commander. To minimize the impact of the upgrade on services, configure the clients to activate downloaded files at 2:00 a.m.
- Start the batch upgrade process.
Procedure
- Configure the file server.
Configure the file server according to the server manual.
After completing the configuration, save the required files on the file server.
- Specify the Commander IP address on the clients.
# Specify the Commander IP address on Client1.
<HUAWEI> system-view [HUAWEI] easy-operation commander ip-address 172.31.20.10
Specify the Commander IP address on Client2 to Client6 in the same way.
- Configure basic functions for the Commander.
<HUAWEI> system-view [HUAWEI] sysname Commander [Commander] easy-operation commander ip-address 172.31.20.10 [Commander] easy-operation commander enable [Commander] easy-operation [Commander-easyoperation] sftp-server 172.31.1.90 username admin password EasyOperation [Commander-easyoperation] backup configuration interval 2
- Enable the client auto-join function on the Commander.
[Commander-easyoperation] client auto-join enable
After the auto-join function is enabled, you can run the display easy-operation client command to check information about the clients and files that the clients have downloaded from the Commander.
- Specify file information and file activation mode on the Commander.
# Configure a group based on the IP address of Client1, and specify information about the files to be loaded.
[Commander-easyoperation] group custom ip-address g1 [Commander-easyoperation-group-custom-g1] match ip-address 172.31.20.100 24 [Commander-easyoperation-group-custom-g1] system-software s600-e_1.cc [Commander-easyoperation-group-custom-g1] custom-file header1.txt [Commander-easyoperation-group-custom-g1] quit
# On the Commander, configure a built-in group based on the device type of Client2, Client3, and Client5, and specify information about the files to be downloaded in the group.
[Commander-easyoperation] group build-in s600-e [Commander-easyoperation-group-build-in-S600-E] system-software s600-e_2.cc [Commander-easyoperation-group-build-in-S600-E] quit
# Configure a group based on the IP address of Client4, and specify information about the files to be loaded.
[Commander-easyoperation] group custom ip-address g2 [Commander-easyoperation-group-custom-g2] match ip-address 172.31.10.10 24 [Commander-easyoperation-group-custom-g2] system-software s600-e_3.cc [Commander-easyoperation-group-custom-g2] quit
# Configure a group based on the MAC address of Client6, and specify information about the files to be loaded.
[Commander-easyoperation] group custom mac-address g3 [Commander-easyoperation-group-custom-g3] match mac-address 5489-9875-ea12 [Commander-easyoperation-group-custom-g3] web-file web_1.web.7z [Commander-easyoperation-group-custom-g3] custom-file header.txt [Commander-easyoperation-group-custom-g3] quit
# In the Easy-Operation view of the Commander, set the file activation mode and time.
[Commander-easyoperation] activate-file in 2:00 reload [Commander-easyoperation] quit
- Verify the configuration.
# Check global configuration of the Commander.
[Commander] display easy-operation configuration --------------------------------------------------------------------------- Role : Commander Commander IP address : 172.31.20.10 Commander UDP port : 60000 IP address of file server : 172.31.1.90 Type of file server : SFTP Username of file server : admin Default system-software file : - Default system-software version : - Default configuration file : - Default patch file : - Default WEB file : - Default license file : - Default custom file 1 : - Default custom file 2 : - Default custom file 3 : - Auto clear up : Disable Auto join in : Enable Topology collection : Disable Activating file time : In 02:00 Activating file method : Reload Aging time of lost client(hours): - Backup configuration file mode : Default Backup configuration file interval(hours): 2 ---------------------------------------------------------------------------
# Check group configuration on the Commander.
[Commander] display easy-operation group The total number of group configured is : 4 The number of build-in group is : 1 The number of custom group is : 3 ------------------------------------------------------- Groupname Type MatchType ------------------------------------------------------- S600-E build-in device-type g1 custom ip-address g2 custom ip-address g3 custom mac-address -------------------------------------------------------
# Check configuration of the group g1 on the Commander.
[Commander] display easy-operation group custom g1 --------------------------------------------------------------------------- Group name : g1 Configuration file : - System-software file : s600-e_1.cc Patch file : - WEB file : - License file : - Customs file 1 : header1.txt Customs file 2 : - Customs file 3 : - Activating file time : Immediately Activating file method : Default Ip-address list : Ip-address Ip-mask 172.31.20.100 255.255.255.0 ---------------------------------------------------------------------------
- Start the batch upgrade process.
[Commander] easy-operation [Commander-easyoperation] upgrade group Warning: This command will start the upgrade process of all groups and clients i n these groups may reboot. Ensure that configurations of the clients have been s aved. Continue?[Y/N]:y
You can run the display easy-operation download-status command to check the file downloading progress on each client.[Commander-easyoperation] display easy-operation download-status The total number of client in downloading files is : 6 ---------------------------------------------------------------------------- ID Mac address IP address Method Phase Status ---------------------------------------------------------------------------- 1 0011-2233-4455 172.31.20.100 Upgrade Sys-file Upgrading 2 00E0-FC34-3190 172.31.10.15 Upgrade Sys-file Upgrading 3 0011-2233-4457 172.31.10.20 Upgrade Sys-file Upgrading 4 70F3-950B-1A52 172.31.10.10 Upgrade Sys-file Upgrading 5 0011-2233-4459 172.31.10.18 Upgrade Sys-file Upgrading 6 5489-9875-ea12 172.31.10.11 Upgrade Web-file Upgrading
Configuration Files
Commander configuration file
# sysname Commander # easy-operation commander ip-address 172.31.20.10 easy-operation commander enable # easy-operation client auto-join enable sftp-server 172.31.1.90 username admin password %^%#=.X8C_TN##%&9P>3RK503O@w-=Fr%>naT#E3P4{0%^%# backup configuration interval 2 activate-file reload activate-file in 02:00 group build-in S600-E system-software s600-e_2.cc group custom ip-address g1 system-software s600-e_1.cc custom-file header1.txt match ip-address 172.31.20.100 255.255.255.0 group custom ip-address g2 system-software s600-e_3.cc match ip-address 172.31.10.10 255.255.255.0 group custom mac-address g3 web-file web_1.web.7z custom-file header.txt match mac-address 5489-9875-EA12 FFFF-FFFF-FFFF # return
clients 1 to 6 configuration file
# easy-operation commander ip-address 172.31.20.10 # return