(Optional) Loading a Pre-Configuration Script

Context

If you want commands to be delivered to an unconfigured device before the SZTP process starts, you need to configure a pre-configuration script.

Procedure

  1. Edit the pre-configuration script based on the file type and format instructions described in Pre-Configuration Script.
  2. Upload the pre-configuration script to the storage medium of the main control board.

    FTP, TFTP, or SFTP can be used to upload files. For details, see Using FTP to Access Files on Other Devices, Using TFTP to Access Files on Other Devices, and Using SFTP to Access Other Devices. Select an upload mode as required. SFTP is recommended for file transfer because TFTP and FTP pose security risks.

  3. Run the set ztp pre-configuration file-name command to load the pre-configuration script.

    If you do not want the unconfigured device to execute the SZTP pre-configuration process at startup, clear the pre-configuration script by running the reset ztp pre-configuration command.

  4. Run the display sztp status command to check the configuration status of the pre-configuration script on the device.

    When the device software package is upgraded from an earlier version to the current version and the specified startup configuration file is vrpcfg.zip, the loaded pre-configuration script will be executed. If you do not want the pre-configuration script to be executed, run the reset ztp pre-configuration command to clear the pre-configuration script. When another configuration file other than vrpcfg.zip is specified, the pre-configuration script will not be executed.

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