< Home

Understanding USB-based Deployment

USB-based Deployment Process

Before a USB-based deployment, make an index file, save the index file in the root directory of a USB flash drive, and save the upgrade files in the directory specified in the index file. When you connect the USB flash drive to a device, the device downloads the specified files to complete software upgrade.

Figure 1 shows the USB-based deployment flowchart.
Figure 1 USB-based deployment flowchart

Upgrade File Types

The device to be upgraded automatically loads the required files according to description in the index file.
  • Mandatory file

    • Index file: The file name must be smart_config.ini.

  • Optional files

    • System software: The file name extension is .cc.

    • Configuration file: The file name extension is .cfg or .zip.

    • Patch file: The file name extension is .pat.

    • Web file: The file name extension is .web.7z.

    • User-defined file.

    • Script file: The file name extension is .bat.

      A script file can import stack configurations to a device during a USB-based deployment.

Users can select one or more types of optional file based on the site requirements.

Device Running Process

Figure 2 shows the device running flowchart during USB-based deployment.
Figure 2 Device running flowchart

Password check and HMAC check for the configuration file are shown in Figure 3.
Figure 3 Password check and HMAC check for the configuration file during USB-based deployment

  1. A user connects a USB flash drive to a device, the system detects the USB flash drive.
  2. The process proceeds depending on whether the USB-based deployment function is enabled:
    • If the device has no configuration file, the USB-based deployment function is always enabled. In this case, the deployment process starts from step 3.
    • If the device has a configuration file and the USB-based deployment function has been enabled, the deployment process starts from step 3.
    • If the device has a configuration file but the USB-based deployment function is disabled, USB-based deployment cannot be performed.
  3. The system checks whether an index file exists in the USB flash drive.
    • If an index file exists, the process goes to step 4.
    • If no index file exists, the process ends.
  4. The system checks whether the index file is valid.
    • If the index file is valid, the process goes to step 5.
    • If the index file is invalid, the USB-based deployment fails and the system creates an error report in the USB flash drive. The process ends.
  5. The device compares the data change time in the index file with the time of last USB-based deployment recorded in the system.
    • If the data change time is different from the time of last USB-based deployment, the process goes to step 6.
    • If the data change time is the same as the time of last USB-based deployment, the USB-based deployment fails and the system creates an error report in the USB flash drive. The process ends.
  6. The device checks whether a password is configured for USB-based deployment.
    • If a password is configured, the device checks whether the password in the index file is the same as the configured password. If they are the same, the process goes to step 7. If they are different, the USB-based deployment fails and the system creates an error report in the USB flash drive. The process ends.

      From V200R007, the authentication password for USB-based deployment cannot be manually configured. If an authentication password has been configured before the upgrade, the password is saved as pre-upgrade configuration after the software version is upgraded to V200R007 or later. It is recommended that you run the undo set device usb-deployment password command to delete the configured password after the upgrade is complete.

      The S5720-32C-HI-24S-AC, S5720-56C-HI-AC, and S5720-56C-HI-AC support the configuration of the authentication password for USB-based deployment.

    • If no password is configured, the process goes to step 7.
  7. The device obtains the required files from the USB flash drive according description in the index file.
    • If the required files are obtained successfully, the process goes to step 8.

    • If files fail to be obtained, the USB-based deployment fails and the system creates an error report in the USB flash drive.

  8. The device checks the password and HMAC of the configuration file.
    • If the upgrade files do not include the configuration file, the process goes to step 9.
    • If the upgrade files include the configuration file but no encryption password is configured, the process goes to step 9.
    • If the upgrade files include the configuration file, an encryption password is configured but HMAC check is not enabled, the device decrypts the configuration file using the configured password. If the decryption succeeds, the process goes to step 9. If the decryption fails, the UBS-based deployment fails and the process ends. An error report is created in the USB flash drive.
    • If the upgrade files include the configuration file, an encryption password is configured and HMAC check is enabled, the device performs HMAC check and then decrypts the configuration file. If HMAC check and file decryption succeed, the process goes to step 9. Otherwise, the process ends, and an error report is created in the USB flash drive.
  9. The device determines whether to restart to activate the obtained files based on the file types or the file activation mode configured in the system.
    • If the device does not need to restart, it activates the files directly. The process ends.
    • If the device needs to restart, it specifies the obtained files for next startup and restarts. After the device restarts, the process ends.
  10. The USB-based deployment succeeds, and the process ends. The user removes the USB flash drive from the device.

During a USB-based deployment, the system creates an error report usbload_error.txt if an error occurs in any step. You can view this report to analyze the cause of the deployment failure. If the deployment succeeds, the system creates a deployment success report usbload_verify.txt.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >