No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Configuration Guide - Basic Configuration

S2720, S5700, and S6720 V200R013C00

This document describes the configurations of Basic, including CLI Overview, EasyDeploy Configuration, USB-based Deployment Configuration, Logging In to a Device for the First Time, CLI Login Configuration, Web System Login Configuration, File Management, Configuring System Startup, BootLoad Menu Operation.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Making an Index File

Making an Index File

Background

In V200R013C00 and later, the file formats can be used in USB-based deployment: smart_config.ini.

Procedure

To edit an index file on a PC, perform the following operations:
  1. Create a text file.
  2. Edit the file in a specific format.
  3. Save the file as smart_config.ini.
  4. Copy the smart_config.ini file to the root directory of the USB flash drive.

Index File Formats

NOTE:
  • In a smart_config.ini index file, each line can contain no more than 512 characters. Otherwise, the index file is invalid.

  • The field names in the smart_config.ini index file are case insensitive. All field values except passwords are case insensitive.

  • In the index file, fields related to file loading are all optional, but you must specify at least one file type field. The system software name, configuration file name, and path file name are at most 48 bytes long, and names of other files are at most 64 bytes long.

Format of the smart_config.ini index file

BEGIN LSW
[GLOBAL CONFIG]
TIMESN=
AUTODELFILE=
ACTIVEMODE=
USB-DEPLOYMENT PASSWORD=
[DEVICEn DESCRIPTION]
OPTION=
ESN=
MAC=
AUTODELFILE=
ACTIVEMODE=
DEVICETYPE=
HMAC=
DIRECTORY=
SYSTEM-SOFTWARE=
SYSTEM-CONFIG=
SYSTEM-PAT=
SYSTEM-WEB=
SYSTEM-SCRIPT=
SYSTEM-USERDEF1=
SYSTEM-USERDEF2=
SYSTEM-USERDEF3=
END LSW

The smart_config.ini index file can contain comments. A comment starts with a semicolon (;). You can add a comment after a field in the same line (separate the field and comment with a space) or the next line.

Table 4-2  Fields in the smart_config.ini index file

Field

Description

BEGIN LSW

Mandatory. It is the start flag of the index file and cannot be modified.

GLOBAL CONFIG

Mandatory. It is the start flag of the global configuration and cannot be modified.

TIMESN

Mandatory. It indicates when the data was changed. The value is a string of 1 to 16 characters without spaces. The recommended format is yyyymmdd.hhmmss.

For example, if the index file was edited at 08:09:10 on June 28, 2011, you can set this field to TIMESN=20110628.080910.

Each device to be upgraded has a TIMESN field. In a USB-based upgrade, a device sets the TIMESN field before it restarts (or after the upgrade is complete if the device does not need to restart). This TIMESN field cannot be used in the next upgrade. If the upgrade fails after the device restarts, you must change the TIMESN value before starting a USB-based upgrade again.

AUTODELFILE

Optional. It specifies whether to delete the old system software after a successful upgrade.

  • AUTODELFILE=YES: The original system software will be deleted after a successful upgrade.
  • AUTODELFILE=NO: The original system software will not be deleted after a successful upgrade.

The default value of the AUTODELFILE field is NO. If this field does not exist, is empty, or has an invalid value, the default value is used.

The AUTODELFILE field can be used in the global configuration or the configuration for a single device.

  • The AUTODELFILE field in the [GLOBAL CONFIG] section applies globally, and the AUTODELFILE field in the [DEVICEn DESCRIPTION] section applies only to the specific device.

  • If the AUTODELFILE field is set to YES or NO for a device, the configuration takes effect for this device. If the AUTODELFILE field is not set or kept empty for a device, the global configuration takes effect for the device.

ACTIVEMODE

Optional. It specifies the mode in which the downloaded files are activated.

  • DEFAULT: uses the respective default activation modes of the downloaded files.

    The system software and configuration file are activated after the device restarts; the patch file is activated without a need to restart the device; the web page file, and user-defined file do not need to be activated, and the USB-based deployment ends when these files are downloaded.

  • RELOAD: activates the downloaded files by restarting the device.

The default value of the ACTIVEMODE field is DEFAULT. If this field does not exist, is empty, or has an invalid value, the default value is used.

The ACTIVEMODE field can be used in the global configuration or the configuration for a single device.

  • The ACTIVEMODE field in the [GLOBAL CONFIG] section applies globally, and the ACTIVEMODE field in the [DEVICEn DESCRIPTION] section applies only to the specific device.

  • If the ACTIVEMODE field is set to DEFAULT or RELOAD for a device, the configuration takes effect for this device. If the ACTIVEMODE field is not set or kept empty for a device, the global configuration takes effect for the device.

USB-DEPLOYMENT PASSWORD

Optional. It specifies the authentication password for USB-based deployment. If an authentication password has been configured on the device to be upgraded, fill this field with the configured password. If no password is configured on the device, keep this field blank or delete it. Only one authentication password can be specified in an index file. If an index file is used to upgrade multiple devices, configure the same authentication password on these devices.
NOTE:

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.

DEVICEn DESCRIPTION

Mandatory. It is the start flag of the file description, where n is a device number. The device number starts at 0 and ends at 65535.

NOTE:
  • Each field in the DEVICEn DESCRIPTION section can be used only once. If a field is used repeatedly, no device will match DEVICEn.

  • The system matches the DEVICE fields from top to bottom in the file and stops the matching when it finds a matching device description.

OPTION

Optional. It specifies whether the file information for a device is valid.
  • OPTION=OK: The file information is valid.

  • OPTION=NOK: The file information is invalid and the system does not check the file information for this device.

The default value of this field is OK. If this field does not exist, is empty, or has an invalid value, the default value is used.

ESN

Optional. It specifies the equipment serial number 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 ESN of the device must be the same as the configured value.

The default value of this field is DEFAULT. If this field does not exist or is empty, the default value is used.

The system matches the devices to be upgraded with device description from top to bottom in the index file. The matching priority of the fields is MAC > ESN > DEVICETYPE > DEFAULT (descending order). Once a device matches DEVICEn, files specified in DEVICEn are loaded to the device. When an error occurs during file loading, the system does not match this device with other device description and only generates an error report.

MAC

Optional. It specifies the MAC address of a device, in the XXXX-XXXX-XXXX format. 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 MAC address must be the same as the configured value.

The default value of this field is DEFAULT. If this field does not exist or is empty, the default value is used.

DEVICETYPE

Optional. It specifies a device type, for example, S5720-HI. If this field is set to DEFAULT, the device type is not checked. If this field is set to another value, the device type must be the same as the configured value.

The default value of this field is DEFAULT. If this field does not exist or is empty, the default value is used.

HMAC

Optional. It specifies the hashed message authentication code (HMAC) used to verify the configuration file to be loaded. The HMAC is a string of 64 characters, which is calculated for the configuration file saved in the USB flash drive by an HMAC-SHA256 calculation tool. The key used to calculate the HMAC must be the same as the password configured by the set device usb-deployment config-file password command.

By default, the configuration file to be loaded is not verified.

NOTE:

The HMAC can be generated for a configuration file using an HMAC-SHA256 calculation tool (such as OpenSSL or HashCalc).

If upgrade files include a configuration file, it is recommended that you run the set device usb-deployment config-file password command to configure an encryption password for the configuration file, compress the configuration file using the configured password before saving it in the USB flash drive, and run the set device usb-deployment hmac command to enable HMAC check on the device to be upgraded. This configuration improves security.

DIRECTORY

Optional. It specifies the directory where files are saved in the USB flash drive.
  • If this field is empty or does not exist, files are saved in the root directory of the USB flash drive.
  • DIRECTORY=/abc: Files are saved in the abc directory.

By default, this field is empty.

The directory name specified in the index file must be in the same format as required by the file system.
  • The directory depth must be less than or equal to 4 levels. The full path must start with a slash (/), and subdirectories are separated by a slash. The directory cannot end with a slash. For example, abc/test is a valid directory, whereas /abc/test/ is an invalid directory.
  • Each subdirectory can contain 1 to 15 characters.
  • The directory name is case insensitive and cannot contain spaces and the following special characters: ~ * / \ : ' " < > | ? [ ] %.

SYSTEM-SOFTWARE

Optional. It specifies a system software name, with an extension .cc.

If this field is set, the device compares the specified system software version with the running system software version. If they are the same, the device does not copy the system software from the USB flash drive and stops the upgrade.

SYSTEM-CONFIG

Optional. It specifies a configuration file name, with an extension .cfg or .zip.

SYSTEM-PAT

Optional. It specifies a patch file name, with an extension .pat.

SYSTEM-WEB

Optional. It specifies a web page file name, with an extension .web.7z.

SYSTEM-SCRIPT

Optional. It specifies a script file name.

When this field is specified, the stack configuration will be imported to the device during USB-based deployment. After the device restarts, the stack configuration takes effective.

A script file uses .bat as the file name extension. The file name consists of 5-64 characters. The file content format is the same as the format of a configuration file. The exclamation mark (!) indicates a comment. An example of a script file is as follows:

#
stack slot 0 renumber 2
! Modify the stack ID
#
interface stack-port 0/1
port interface xgigabitethernet 0/0/27 enable
#
interface stack-port 0/2
port interface xgigabitethernet 0/0/28 enable
NOTE:
  • The script file edited in the UNIX or Linux system is not supported because the device cannot identify the content of such a file.
  • Rollback cannot be performed when the script file delivery configuration is incorrect during USB-based deployment. You can modify the script file, modify the incorrect configuration, delete the delivered configuration, and run the script file again to implement USB-based deployment.
  • If a script file contains a command that is not supported by stack and that will be saved to the configuration file, the command will be lost after the device restarts.
  • If the slot ID in the stack commands in the script file is different from the slot ID of the device, the script file cannot be executed. If the stack slot slot-id renumber new-slot-id command is included in the script file, the slot ID in other stack commands must be the same as slot-id in this command. The following is an example of an incorrect script file. The current slot ID of the device is 0, and 2 is the new slot ID used after a restart. Other stack commands should use the current slot ID 0, but not 2.
    #
    stack slot 0 renumber 2 
    #
    interface stack-port 2/1 
    port interface XGigabitEthernet 2/0/1 enable
    
  • The stack cables can be connected before or after the USB-based deployment is complete. If a switch connected by a stack cable becomes a non-master switch after the script file is imported, the switch does not generate a USB-based deployment success report.

SYSTEM-USERDEF1

SYSTEM-USERDEF2

SYSTEM-USERDEF3

Optional. It specifies a user-defined file name.

END LSW

Mandatory. It is the end flag of the index file.

Format of the usbload_config.txt index file

A usbload_config.txt index file can be edited in any of the following formats:
  • Format 1:

    To upgrade the system software, configuration file, web file, and patch file on multiple devices to the same version, use the following index file format:
    <time-sn=;/>
    <usb-deployment password=;/>
    <boardtype=; vrpfile=; cfgfile=; webfile=; patchfile=; delfile=; system-script=;/>
  • Format 2:

    To upgrade a specific device, use the following index file format:

    <time-sn=;/>
    <usb-deployment password=;/>
    <mac=; vrpfile=; cfgfile=; webfile=; patchfile=; delfile=; system-script=;/>
  • Format 3:

    To upgrade a specific model of device, use the following index file format:

    <time-sn=;/>
    <usb-deployment password=;/>
    <esn=; vrpfile=; cfgfile=; webfile=; patchfile=; delfile=; system-script=;/>
NOTE:

The three index file formats use the boardtype, mac, and esn fields to match devices respectively. The three fields can be used together to upgrade multiple devices using a USB flash drive. If the fields match the same device, the mac field has the highest priority, and the boardtype field has the lowest priority. The following is an example:

<time-sn=201305091219;/>
<usb-deployment password=;/>
<boardtype=; vrpfile=S5720-V200R013C00.CC; cfgfile=; webfile=; patchfile=; delfile=; system-script=;/>
<mac=0018-8200-0001; vrpfile=; cfgfile=vrpcfg.cfg; webfile=; patchfile=; delfile=0; system-script=;/>
<esn=210235182310xxxxxxxx; vrpfile=; cfgfile=; webfile=; patchfile=patch.pat; delfile=1; system-script=;/>
Table 4-3  Fields in the usbload_config.txt index file

Field

Description

time-sn

Mandatory. It specifies the time when the configuration data is changed, in the format of yyyymmdd.hh.mm.hh. The value must be a string of 12 digits.

For example, the value 201105091219 indicates that the configuration data was changed at 12:19 on May 9, 2011.

Each device to be upgraded has a time-sn field. In a USB-based upgrade, a device sets the time-sn field before it restarts (or after the upgrade is complete if the device does not need to restart). This time-sn field cannot be used in the next upgrade. If the upgrade fails after the device restarts, you must change the time-sn value before starting a USB-based upgrade again.

usb-deployment password

Optional. It specifies the authentication password for USB-based deployment. If an authentication password has been configured on the device to be upgraded, fill this field with the configured password. If no password is configured on the device, keep this field blank or delete it. Only one authentication password can be specified in an index file. If an index file is used to upgrade multiple devices, configure the same authentication password on these devices.
NOTE:

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.

boardtype

Optional. It specifies the model of the device to be upgraded using a USB flash drive. The displayed device model must be the same as the actual model of the device.

vrpfile

Optional. It specifies the system software name, with an extension .cc.

If this field is set, the device compares the specified system software version with the running system software version. If they are the same, the device does not copy the system software from the USB flash drive and stops the upgrade.

cfgfile

Optional. It specifies a configuration file name, with an extension .cfg or .zip.

webfile

Optional. It specifies a web file name, with an extension .web.7z.

patchfile

Optional. It specifies a patch file name, with an extension .pat.

mac

Optional. It specifies the MAC address of a device, in the XXXX-XXXX-XXXX format. 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 MAC address must be the same as the configured value.

The default value of this field is default. If this field does not exist or is empty, the default value is used.

esn

Optional. It specifies the equipment serial number 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 ESN of the device must be the same as the configured value.

The default value of this field is default. If this field does not exist or is empty, the default value is used.

delfile

Optional. It specifies whether to delete the old system software after a successful upgrade. The value 1 indicates that the old software will be deleted, and the value 0 indicates that the old system software will not be deleted.

If the index file does not contain this field or the field is set to an invalid value (not 0 or 1), the old system software will not be deleted after a successful upgrade.

system-script

Optional. It specifies a script file name.

When this field is specified, the stack configuration will be imported to the device during USB-based deployment. After the device restarts, the stack configuration takes effective.

A script file uses .bat as the file name extension. The file name consists of 5-64 characters. The file content format is the same as the format of a configuration file. The exclamation mark (!) indicates a comment. An example of a script file is as follows:

#
stack slot 0 renumber 2
! Modify the stack ID
#
interface stack-port 0/1
port interface xgigabitethernet 0/0/27 enable
#
interface stack-port 0/2
port interface xgigabitethernet 0/0/28 enable
NOTE:
  • The script file edited in the UNIX or Linux system is not supported because the device cannot identify the content of such a file.
  • If a script file contains a command that is not supported by stack and that will be saved to the configuration file, the command will be lost after the device restarts.
  • If the slot ID in the stack commands in the script file is different from the slot ID of the device, the script file cannot be executed. If the stack slot slot-id renumber new-slot-id command is included in the script file, the slot ID in other stack commands must be the same as slot-id in this command. The following is an example of an incorrect script file. The current slot ID of the device is 0, and 2 is the new slot ID used after a restart. Other stack commands should use the current slot ID 0, but not 2.
    #
    stack slot 0 renumber 2 
    #
    interface stack-port 2/1 
    port interface XGigabitEthernet 2/0/1 enable
    
  • The stack cables can be connected before or after the USB-based deployment is complete. If a switch connected by a stack cable becomes a non-master switch after the script file is imported, the switch does not generate a USB-based deployment success report.
NOTE:
  • When editing an index file, press Enter when a line is finished. After editing the file, save it.
  • If a field is not found, the system considers that the field is left blank.
Translation
Download
Updated: 2019-04-04

Document ID: EDOC1100066063

Views: 29426

Downloads: 656

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next