ZTP supports CFG intermediate files that store device and version file information.
A CFG intermediate file must be suffixed with .cfg. The file content format is as follows:
The SHA256 checksum in the following file is only an example.
#sha256sum="fffcd63f5e31f0891a0349686969969c1ee429dedeaf7726ed304f2d08ce1bc7"fileserver=ftp://username:password@hostname/path;mac=00e0-fc12-3456;esn=2102351931P0C3000154;devicetype=DEFAULT;system-version=V800R021C00SPC100;system-software=V800R021C00SPC100.cc;system-config=test.cfg;system-pat=V800R021C00SPC100SPH001.PAT;
Field |
Mandatory |
Description |
---|---|---|
#sha256sum |
Yes |
SHA256 checksum of the file. NOTE:
The SHA256 checksum is calculated based on the content following #sha256sum=. In practice, you need to delete the first line in the file, move the following part one line above, calculate the SHA256 checksum, and write #sha256sum= plus the generated SHA256 checksum at the beginning of the file. The SHA256 algorithm can be used to verify the integrity of files. This algorithm has high security. You can use either of the following methods to generate an SHA256 checksum for a script file:
|
fileserver |
Yes |
Address of the server from which version files are obtained. Files can be obtained in TFTP, FTP, or SFTP mode. The format is as follows:
username, password, and port are optional. The path parameter specifies the directory where version files are saved on the file server. hostname identifies a server. The value can be an IPv4 address, domain name, or an IPv6 address. The value of port ranges from 0 to 65535. If the specified value is out of the range, the default value 22 is used. A port number can be configured only when hostname of an SFTP server is set to an IPv4 address. |
esn |
No |
ESN of a device. If this field is set to DEFAULT, the ESN of the device is not checked. If this field is set to another value, the device needs to check whether the value is the same as its ESN. The default value is DEFAULT. If this field does not exist or is empty, the default value is used. NOTE:
|
mac |
No |
MAC address of a device, in the XXXX-XXXX-XXXX format, in which X is a hexadecimal number. If this field is set to DEFAULT, the device MAC address is not checked. If this field is set to another value, the device needs to check whether the value is the same as its MAC address. The device ESN check takes place ahead of the MAC address check. The default value is DEFAULT. If this field does not exist or is empty, the default value is used. NOTE:
|
devicetype |
No |
Device type. If this field is set to DEFAULT, the device type is not checked. If this field is set to another value, the device needs to check whether the value is the same as its device type. The default value is DEFAULT. If this field does not exist or is empty, the default value is used. NOTE:
|
system-version |
No |
System version number, which is specific to the C version, for example V800R021C00SPC100. |
system-software |
No |
System software file name, suffixed with .cc. |
system-config |
Yes |
Configuration file name, suffixed with .cfg, .zip, or .dat. NOTE:
Do not use the default configuration file name vrpcfg.zip as the configuration file name. |
system-pat |
No |
Patch file name, suffixed with .pat. |