0% found this document useful (0 votes)
104 views51 pages

01-08 Configuration File Management Configuration

Uploaded by

epolacoscribd
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views51 pages

01-08 Configuration File Management Configuration

Uploaded by

epolacoscribd
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CloudEngine S3700, S5700, and S6700 Series

Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

8 Configuration File Management


Configuration

8.1 Overview of Configuration File Management


8.2 Configuration Precautions for Configuration File Management
8.3 Managing Configuration Files

8.1 Overview of Configuration File Management


Definition
A configuration file is a collection of command lines that run on a device.

Purpose
Configuration file management allows you to view, save, compare, back up,
restore, and compress configuration files, as well as deleteand roll back
configurations in the files. You can also specify the configuration file to be loaded
at the next device startup. All this ensures correct configurations on the device,
prevents configuration loss, and facilitates configuration migration.

8.2 Configuration Precautions for Configuration File


Management
Licensing Requirements
Configuration File Management is not under license control.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 402


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Hardware Requirements

Table 8-1 Hardware requirements

Series Models

S5735-L-V2 series S5735-L10T4X-A-V2/S5735-L10T4X-TA-V2/S5735-


L16T4S-A-V2/S5735-L16T4X-QA-V2/S5735-
L24P4S-A-V2/S5735-L24P4XE-A-V2/S5735-
L24P4XE-TA-V2/S5735-L24T4S-A-V2/S5735-
L24T4X-QA-V2/S5735-L24T4XE-A-V2/S5735-
L24T4XE-D-V2/S5735-L48LP4S-A-V2/S5735-
L48LP4XE-A-V2/S5735-L48P4XE-A-V2/S5735-
L48T4S-A-V2/S5735-L48T4XE-A-V2/S5735-
L48T4XE-TA-V2/S5735-L48T4XE-D-V2/S5735-
L8P2T4X-A-V2/S5735-L8P2T4X-TA-V2/S5735-
L8P4S-A-V2/S5735-L8P4X-QA-V2/S5735-L8T4S-A-
V2/S5735-L8T4X-QA-V2

S5735-S-V2 series S5735-S24P4XE-V2/S5735-S24T4XE-V2/S5735-


S24U4XE-V2/S5735-S48P4XE-V2/S5735-S48T4XE-
V2/S5735-S48U4XE-V2

S5735I-L-V2 series S5735I-L10T4X-A-V2/S5735I-L8P4X-A-V2

S3710-H series S3710-H24P4S-A/S3710-H24T4S-A/S3710-


H48LP4S-A/S3710-H48T4S-A

S5732-H-V2 series S5732-H24S4X6QZ-TV2/S5732-H24S4X6QZ-V2/


S5732-H24UM4Y2CZ-TV2/S5732-H24UM4Y2CZ-
V2/S5732-H44S4X6QZ-TV2/S5732-H44S4X6QZ-
V2/S5732-H48UM4Y2CZ-TV2/S5732-
H48UM4Y2CZ-V2

S5735I-S-V2 series S5735I-S24T4XE-V2/S5735I-S24T4XE-T-V2/S5735I-


S24U4XE-V2/S5735I-S24U4XE-T-V2/S5735I-
S8T4SN-V2/S5735I-S8T4XN-T-V2/S5735I-S8T4XN-
V2/S5735I-S8U4XN-V2

S6730-H-V2 series S6730-H24X6C-TV2/S6730-H24X6C-V2/S6730-


H28X6CZ-TV2/S6730-H28X6CZ-V2/S6730-
H48X6C-TV2/S6730-H48X6C-V2/S6730-H48X6CZ-
TV2/S6730-H48X6CZ-V2/S6730-H48Y6C-TV2/
S6730-H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 403


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements

Table 8-2 Feature requirements


Feature Requirements Series Models

For security purposes, FTP and TFTP are not S5735-S- S5735-S24P4XE-
recommended. By default, the device provides V2 series V2/S5735-
the weak security algorithm/protocol feature S5735-L- S24T4XE-V2/
package WEAKEA. If you need to use the weak V2 series S5735-S24U4XE-
security algorithm/protocol feature package V2/S5735-
WEAKEA, run the install feature-software S3710-H S48P4XE-V2/
WEAKEA command to install it. series S5735-S48T4XE-
S5735I-L- V2/S5735-
V2 series S48U4XE-V2
S5732-H- S5735-L10T4X-A-
V2 series V2/S5735-
S5735I-S- L10T4X-TA-V2/
V2 series S5735-L16T4S-A-
V2/S5735-
S6730-H- L16T4X-QA-V2/
V2 series S5735-L24P4S-A-
V2/S5735-
L24P4XE-A-V2/
S5735-L24P4XE-
TA-V2/S5735-
L24T4S-A-V2/
S5735-L24T4X-
QA-V2/S5735-
L24T4XE-A-V2/
S5735-L24T4XE-
D-V2/S5735-
L48LP4S-A-V2/
S5735-L48LP4XE-
A-V2/S5735-
L48P4XE-A-V2/
S5735-L48T4S-A-
V2/S5735-
L48T4XE-A-V2/
S5735-L48T4XE-
TA-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P2T4X-TA-V2/
S5735-L8P4S-A-
V2/S5735-L8P4X-
QA-V2/S5735-
L8T4S-A-V2/
S5735-L8T4X-QA-
V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 404


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

S3710-H24P4S-A/
S3710-H24T4S-A/
S3710-H48LP4S-
A/S3710-H48T4S-
A
S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5732-
H24S4X6QZ-TV2/
S5732-
H24S4X6QZ-V2/
S5732-
H24UM4Y2CZ-
TV2/S5732-
H24UM4Y2CZ-V2/
S5732-
H44S4X6QZ-TV2/
S5732-
H44S4X6QZ-V2/
S5732-
H48UM4Y2CZ-
TV2/S5732-
H48UM4Y2CZ-V2
S5735I-S24T4XE-
V2/S5735I-
S24T4XE-T-V2/
S5735I-S24U4XE-
V2/S5735I-
S24U4XE-T-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-T-V2/
S5735I-S8T4XN-
V2/S5735I-
S8U4XN-V2
S6730-H24X6C-
TV2/S6730-
H24X6C-V2/
S6730-H28X6CZ-
TV2/S6730-
H28X6CZ-V2/
S6730-H48X6C-
TV2/S6730-
H48X6C-V2/
S6730-H48X6CZ-
TV2/S6730-
H48X6CZ-V2/
S6730-H48Y6C-

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 405


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

TV2/S6730-
H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 406


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

If multiple users commit configurations at the S5735-S- S5735-S24P4XE-


same time, the operation may fail due to the V2 series V2/S5735-
conflict. A message indicating that the system S5735-L- S24T4XE-V2/
is busy is displayed. Configurations need to be V2 series S5735-S24U4XE-
committed again. V2/S5735-
S3710-H S48P4XE-V2/
series S5735-S48T4XE-
S5735I-L- V2/S5735-
V2 series S48U4XE-V2
S5732-H- S5735-L10T4X-A-
V2 series V2/S5735-
S5735I-S- L10T4X-TA-V2/
V2 series S5735-L16T4S-A-
V2/S5735-
S6730-H- L16T4X-QA-V2/
V2 series S5735-L24P4S-A-
V2/S5735-
L24P4XE-A-V2/
S5735-L24P4XE-
TA-V2/S5735-
L24T4S-A-V2/
S5735-L24T4X-
QA-V2/S5735-
L24T4XE-A-V2/
S5735-L24T4XE-
D-V2/S5735-
L48LP4S-A-V2/
S5735-L48LP4XE-
A-V2/S5735-
L48P4XE-A-V2/
S5735-L48T4S-A-
V2/S5735-
L48T4XE-A-V2/
S5735-L48T4XE-
TA-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P2T4X-TA-V2/
S5735-L8P4S-A-
V2/S5735-L8P4X-
QA-V2/S5735-
L8T4S-A-V2/
S5735-L8T4X-QA-
V2
S3710-H24P4S-A/
S3710-H24T4S-A/
S3710-H48LP4S-
A/S3710-H48T4S-
A

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 407


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5732-
H24S4X6QZ-TV2/
S5732-
H24S4X6QZ-V2/
S5732-
H24UM4Y2CZ-
TV2/S5732-
H24UM4Y2CZ-V2/
S5732-
H44S4X6QZ-TV2/
S5732-
H44S4X6QZ-V2/
S5732-
H48UM4Y2CZ-
TV2/S5732-
H48UM4Y2CZ-V2
S5735I-S24T4XE-
V2/S5735I-
S24T4XE-T-V2/
S5735I-S24U4XE-
V2/S5735I-
S24U4XE-T-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-T-V2/
S5735I-S8T4XN-
V2/S5735I-
S8U4XN-V2
S6730-H24X6C-
TV2/S6730-
H24X6C-V2/
S6730-H28X6CZ-
TV2/S6730-
H28X6CZ-V2/
S6730-H48X6C-
TV2/S6730-
H48X6C-V2/
S6730-H48X6CZ-
TV2/S6730-
H48X6CZ-V2/
S6730-H48Y6C-
TV2/S6730-
H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 408


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

When the system is committing configurations S5735-S- S5735-S24P4XE-


or rolling back, there is a possibility that the V2 series V2/S5735-
card that is newly started cannot be registered S5735-L- S24T4XE-V2/
for a long time. V2 series S5735-S24U4XE-
V2/S5735-
S3710-H S48P4XE-V2/
series S5735-S48T4XE-
S5735I-L- V2/S5735-
V2 series S48U4XE-V2
S5732-H- S5735-L10T4X-A-
V2 series V2/S5735-
S5735I-S- L10T4X-TA-V2/
V2 series S5735-L16T4S-A-
V2/S5735-
S6730-H- L16T4X-QA-V2/
V2 series S5735-L24P4S-A-
V2/S5735-
L24P4XE-A-V2/
S5735-L24P4XE-
TA-V2/S5735-
L24T4S-A-V2/
S5735-L24T4X-
QA-V2/S5735-
L24T4XE-A-V2/
S5735-L24T4XE-
D-V2/S5735-
L48LP4S-A-V2/
S5735-L48LP4XE-
A-V2/S5735-
L48P4XE-A-V2/
S5735-L48T4S-A-
V2/S5735-
L48T4XE-A-V2/
S5735-L48T4XE-
TA-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P2T4X-TA-V2/
S5735-L8P4S-A-
V2/S5735-L8P4X-
QA-V2/S5735-
L8T4S-A-V2/
S5735-L8T4X-QA-
V2
S3710-H24P4S-A/
S3710-H24T4S-A/
S3710-H48LP4S-
A/S3710-H48T4S-
A

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 409


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5732-
H24S4X6QZ-TV2/
S5732-
H24S4X6QZ-V2/
S5732-
H24UM4Y2CZ-
TV2/S5732-
H24UM4Y2CZ-V2/
S5732-
H44S4X6QZ-TV2/
S5732-
H44S4X6QZ-V2/
S5732-
H48UM4Y2CZ-
TV2/S5732-
H48UM4Y2CZ-V2
S5735I-S24T4XE-
V2/S5735I-
S24T4XE-T-V2/
S5735I-S24U4XE-
V2/S5735I-
S24U4XE-T-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-T-V2/
S5735I-S8T4XN-
V2/S5735I-
S8U4XN-V2
S6730-H24X6C-
TV2/S6730-
H24X6C-V2/
S6730-H28X6CZ-
TV2/S6730-
H28X6CZ-V2/
S6730-H48X6C-
TV2/S6730-
H48X6C-V2/
S6730-H48X6CZ-
TV2/S6730-
H48X6CZ-V2/
S6730-H48Y6C-
TV2/S6730-
H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 410


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

Configuration change is not allowed when an S5735-S- S5735-S24P4XE-


NMS initiates full synchronization to the V2 series V2/S5735-
device. S5735-L- S24T4XE-V2/
V2 series S5735-S24U4XE-
V2/S5735-
S3710-H S48P4XE-V2/
series S5735-S48T4XE-
S5735I-L- V2/S5735-
V2 series S48U4XE-V2
S5732-H- S5735-L10T4X-A-
V2 series V2/S5735-
S5735I-S- L10T4X-TA-V2/
V2 series S5735-L16T4S-A-
V2/S5735-
S6730-H- L16T4X-QA-V2/
V2 series S5735-L24P4S-A-
V2/S5735-
L24P4XE-A-V2/
S5735-L24P4XE-
TA-V2/S5735-
L24T4S-A-V2/
S5735-L24T4X-
QA-V2/S5735-
L24T4XE-A-V2/
S5735-L24T4XE-
D-V2/S5735-
L48LP4S-A-V2/
S5735-L48LP4XE-
A-V2/S5735-
L48P4XE-A-V2/
S5735-L48T4S-A-
V2/S5735-
L48T4XE-A-V2/
S5735-L48T4XE-
TA-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P2T4X-TA-V2/
S5735-L8P4S-A-
V2/S5735-L8P4X-
QA-V2/S5735-
L8T4S-A-V2/
S5735-L8T4X-QA-
V2
S3710-H24P4S-A/
S3710-H24T4S-A/
S3710-H48LP4S-
A/S3710-H48T4S-
A

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 411


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5732-
H24S4X6QZ-TV2/
S5732-
H24S4X6QZ-V2/
S5732-
H24UM4Y2CZ-
TV2/S5732-
H24UM4Y2CZ-V2/
S5732-
H44S4X6QZ-TV2/
S5732-
H44S4X6QZ-V2/
S5732-
H48UM4Y2CZ-
TV2/S5732-
H48UM4Y2CZ-V2
S5735I-S24T4XE-
V2/S5735I-
S24T4XE-T-V2/
S5735I-S24U4XE-
V2/S5735I-
S24U4XE-T-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-T-V2/
S5735I-S8T4XN-
V2/S5735I-
S8U4XN-V2
S6730-H24X6C-
TV2/S6730-
H24X6C-V2/
S6730-H28X6CZ-
TV2/S6730-
H28X6CZ-V2/
S6730-H48X6C-
TV2/S6730-
H48X6C-V2/
S6730-H48X6CZ-
TV2/S6730-
H48X6CZ-V2/
S6730-H48Y6C-
TV2/S6730-
H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 412


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

When configurations are restored during S5735-S- S5735-S24P4XE-


device startup, you cannot query the current V2 series V2/S5735-
configurations. S5735-L- S24T4XE-V2/
V2 series S5735-S24U4XE-
V2/S5735-
S3710-H S48P4XE-V2/
series S5735-S48T4XE-
S5735I-L- V2/S5735-
V2 series S48U4XE-V2
S5732-H- S5735-L10T4X-A-
V2 series V2/S5735-
S5735I-S- L10T4X-TA-V2/
V2 series S5735-L16T4S-A-
V2/S5735-
S6730-H- L16T4X-QA-V2/
V2 series S5735-L24P4S-A-
V2/S5735-
L24P4XE-A-V2/
S5735-L24P4XE-
TA-V2/S5735-
L24T4S-A-V2/
S5735-L24T4X-
QA-V2/S5735-
L24T4XE-A-V2/
S5735-L24T4XE-
D-V2/S5735-
L48LP4S-A-V2/
S5735-L48LP4XE-
A-V2/S5735-
L48P4XE-A-V2/
S5735-L48T4S-A-
V2/S5735-
L48T4XE-A-V2/
S5735-L48T4XE-
TA-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P2T4X-TA-V2/
S5735-L8P4S-A-
V2/S5735-L8P4X-
QA-V2/S5735-
L8T4S-A-V2/
S5735-L8T4X-QA-
V2
S3710-H24P4S-A/
S3710-H24T4S-A/
S3710-H48LP4S-
A/S3710-H48T4S-
A

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 413


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5732-
H24S4X6QZ-TV2/
S5732-
H24S4X6QZ-V2/
S5732-
H24UM4Y2CZ-
TV2/S5732-
H24UM4Y2CZ-V2/
S5732-
H44S4X6QZ-TV2/
S5732-
H44S4X6QZ-V2/
S5732-
H48UM4Y2CZ-
TV2/S5732-
H48UM4Y2CZ-V2
S5735I-S24T4XE-
V2/S5735I-
S24T4XE-T-V2/
S5735I-S24U4XE-
V2/S5735I-
S24U4XE-T-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-T-V2/
S5735I-S8T4XN-
V2/S5735I-
S8U4XN-V2
S6730-H24X6C-
TV2/S6730-
H24X6C-V2/
S6730-H28X6CZ-
TV2/S6730-
H28X6CZ-V2/
S6730-H48X6C-
TV2/S6730-
H48X6C-V2/
S6730-H48X6CZ-
TV2/S6730-
H48X6CZ-V2/
S6730-H48Y6C-
TV2/S6730-
H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 414


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

After the trial run command is executed to S5735-S- S5735-S24P4XE-


enable the device to enter the trial running V2 series V2/S5735-
state, only the current trial running user can S5735-L- S24T4XE-V2/
modify the configuration. Other users cannot V2 series S5735-S24U4XE-
modify the configuration during the trial run. V2/S5735-
S3710-H S48P4XE-V2/
series S5735-S48T4XE-
S5735I-L- V2/S5735-
V2 series S48U4XE-V2
S5732-H- S5735-L10T4X-A-
V2 series V2/S5735-
S5735I-S- L10T4X-TA-V2/
V2 series S5735-L16T4S-A-
V2/S5735-
S6730-H- L16T4X-QA-V2/
V2 series S5735-L24P4S-A-
V2/S5735-
L24P4XE-A-V2/
S5735-L24P4XE-
TA-V2/S5735-
L24T4S-A-V2/
S5735-L24T4X-
QA-V2/S5735-
L24T4XE-A-V2/
S5735-L24T4XE-
D-V2/S5735-
L48LP4S-A-V2/
S5735-L48LP4XE-
A-V2/S5735-
L48P4XE-A-V2/
S5735-L48T4S-A-
V2/S5735-
L48T4XE-A-V2/
S5735-L48T4XE-
TA-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P2T4X-TA-V2/
S5735-L8P4S-A-
V2/S5735-L8P4X-
QA-V2/S5735-
L8T4S-A-V2/
S5735-L8T4X-QA-
V2
S3710-H24P4S-A/
S3710-H24T4S-A/
S3710-H48LP4S-
A/S3710-H48T4S-
A

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 415


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5732-
H24S4X6QZ-TV2/
S5732-
H24S4X6QZ-V2/
S5732-
H24UM4Y2CZ-
TV2/S5732-
H24UM4Y2CZ-V2/
S5732-
H44S4X6QZ-TV2/
S5732-
H44S4X6QZ-V2/
S5732-
H48UM4Y2CZ-
TV2/S5732-
H48UM4Y2CZ-V2
S5735I-S24T4XE-
V2/S5735I-
S24T4XE-T-V2/
S5735I-S24U4XE-
V2/S5735I-
S24U4XE-T-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-T-V2/
S5735I-S8T4XN-
V2/S5735I-
S8U4XN-V2
S6730-H24X6C-
TV2/S6730-
H24X6C-V2/
S6730-H28X6CZ-
TV2/S6730-
H28X6CZ-V2/
S6730-H48X6C-
TV2/S6730-
H48X6C-V2/
S6730-H48X6CZ-
TV2/S6730-
H48X6CZ-V2/
S6730-H48Y6C-
TV2/S6730-
H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 416


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

During configuration editing, if the device S5735-S- S5735-S24P4XE-


memory usage exceeds 90%, the configuration V2 series V2/S5735-
editing fails. S5735-L- S24T4XE-V2/
V2 series S5735-S24U4XE-
V2/S5735-
S3710-H S48P4XE-V2/
series S5735-S48T4XE-
S5735I-L- V2/S5735-
V2 series S48U4XE-V2
S5732-H- S5735-L10T4X-A-
V2 series V2/S5735-
S5735I-S- L10T4X-TA-V2/
V2 series S5735-L16T4S-A-
V2/S5735-
S6730-H- L16T4X-QA-V2/
V2 series S5735-L24P4S-A-
V2/S5735-
L24P4XE-A-V2/
S5735-L24P4XE-
TA-V2/S5735-
L24T4S-A-V2/
S5735-L24T4X-
QA-V2/S5735-
L24T4XE-A-V2/
S5735-L24T4XE-
D-V2/S5735-
L48LP4S-A-V2/
S5735-L48LP4XE-
A-V2/S5735-
L48P4XE-A-V2/
S5735-L48T4S-A-
V2/S5735-
L48T4XE-A-V2/
S5735-L48T4XE-
TA-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P2T4X-TA-V2/
S5735-L8P4S-A-
V2/S5735-L8P4X-
QA-V2/S5735-
L8T4S-A-V2/
S5735-L8T4X-QA-
V2
S3710-H24P4S-A/
S3710-H24T4S-A/
S3710-H48LP4S-
A/S3710-H48T4S-
A

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 417


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5732-
H24S4X6QZ-TV2/
S5732-
H24S4X6QZ-V2/
S5732-
H24UM4Y2CZ-
TV2/S5732-
H24UM4Y2CZ-V2/
S5732-
H44S4X6QZ-TV2/
S5732-
H44S4X6QZ-V2/
S5732-
H48UM4Y2CZ-
TV2/S5732-
H48UM4Y2CZ-V2
S5735I-S24T4XE-
V2/S5735I-
S24T4XE-T-V2/
S5735I-S24U4XE-
V2/S5735I-
S24U4XE-T-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-T-V2/
S5735I-S8T4XN-
V2/S5735I-
S8U4XN-V2
S6730-H24X6C-
TV2/S6730-
H24X6C-V2/
S6730-H28X6CZ-
TV2/S6730-
H28X6CZ-V2/
S6730-H48X6C-
TV2/S6730-
H48X6C-V2/
S6730-H48X6CZ-
TV2/S6730-
H48X6CZ-V2/
S6730-H48Y6C-
TV2/S6730-
H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 418


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

The configuration cannot be saved during S5735-S- S5735-S24P4XE-


configuration data restoration when the device V2 series V2/S5735-
is just started. S5735-L- S24T4XE-V2/
V2 series S5735-S24U4XE-
V2/S5735-
S3710-H S48P4XE-V2/
series S5735-S48T4XE-
S5735I-L- V2/S5735-
V2 series S48U4XE-V2
S5732-H- S5735-L10T4X-A-
V2 series V2/S5735-
S5735I-S- L10T4X-TA-V2/
V2 series S5735-L16T4S-A-
V2/S5735-
S6730-H- L16T4X-QA-V2/
V2 series S5735-L24P4S-A-
V2/S5735-
L24P4XE-A-V2/
S5735-L24P4XE-
TA-V2/S5735-
L24T4S-A-V2/
S5735-L24T4X-
QA-V2/S5735-
L24T4XE-A-V2/
S5735-L24T4XE-
D-V2/S5735-
L48LP4S-A-V2/
S5735-L48LP4XE-
A-V2/S5735-
L48P4XE-A-V2/
S5735-L48T4S-A-
V2/S5735-
L48T4XE-A-V2/
S5735-L48T4XE-
TA-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P2T4X-TA-V2/
S5735-L8P4S-A-
V2/S5735-L8P4X-
QA-V2/S5735-
L8T4S-A-V2/
S5735-L8T4X-QA-
V2
S3710-H24P4S-A/
S3710-H24T4S-A/
S3710-H48LP4S-
A/S3710-H48T4S-
A

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 419


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5732-
H24S4X6QZ-TV2/
S5732-
H24S4X6QZ-V2/
S5732-
H24UM4Y2CZ-
TV2/S5732-
H24UM4Y2CZ-V2/
S5732-
H44S4X6QZ-TV2/
S5732-
H44S4X6QZ-V2/
S5732-
H48UM4Y2CZ-
TV2/S5732-
H48UM4Y2CZ-V2
S5735I-S24T4XE-
V2/S5735I-
S24T4XE-T-V2/
S5735I-S24U4XE-
V2/S5735I-
S24U4XE-T-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-T-V2/
S5735I-S8T4XN-
V2/S5735I-
S8U4XN-V2
S6730-H24X6C-
TV2/S6730-
H24X6C-V2/
S6730-H28X6CZ-
TV2/S6730-
H28X6CZ-V2/
S6730-H48X6C-
TV2/S6730-
H48X6C-V2/
S6730-H48X6CZ-
TV2/S6730-
H48X6CZ-V2/
S6730-H48Y6C-
TV2/S6730-
H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 420


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

Configurations cannot be committed when S5735-S- S5735-S24P4XE-


configuration data is being restored upon V2 series V2/S5735-
device startup. S5735-L- S24T4XE-V2/
V2 series S5735-S24U4XE-
V2/S5735-
S3710-H S48P4XE-V2/
series S5735-S48T4XE-
S5735I-L- V2/S5735-
V2 series S48U4XE-V2
S5732-H- S5735-L10T4X-A-
V2 series V2/S5735-
S5735I-S- L10T4X-TA-V2/
V2 series S5735-L16T4S-A-
V2/S5735-
S6730-H- L16T4X-QA-V2/
V2 series S5735-L24P4S-A-
V2/S5735-
L24P4XE-A-V2/
S5735-L24P4XE-
TA-V2/S5735-
L24T4S-A-V2/
S5735-L24T4X-
QA-V2/S5735-
L24T4XE-A-V2/
S5735-L24T4XE-
D-V2/S5735-
L48LP4S-A-V2/
S5735-L48LP4XE-
A-V2/S5735-
L48P4XE-A-V2/
S5735-L48T4S-A-
V2/S5735-
L48T4XE-A-V2/
S5735-L48T4XE-
TA-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P2T4X-TA-V2/
S5735-L8P4S-A-
V2/S5735-L8P4X-
QA-V2/S5735-
L8T4S-A-V2/
S5735-L8T4X-QA-
V2
S3710-H24P4S-A/
S3710-H24T4S-A/
S3710-H48LP4S-
A/S3710-H48T4S-
A

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 421


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5732-
H24S4X6QZ-TV2/
S5732-
H24S4X6QZ-V2/
S5732-
H24UM4Y2CZ-
TV2/S5732-
H24UM4Y2CZ-V2/
S5732-
H44S4X6QZ-TV2/
S5732-
H44S4X6QZ-V2/
S5732-
H48UM4Y2CZ-
TV2/S5732-
H48UM4Y2CZ-V2
S5735I-S24T4XE-
V2/S5735I-
S24T4XE-T-V2/
S5735I-S24U4XE-
V2/S5735I-
S24U4XE-T-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-T-V2/
S5735I-S8T4XN-
V2/S5735I-
S8U4XN-V2
S6730-H24X6C-
TV2/S6730-
H24X6C-V2/
S6730-H28X6CZ-
TV2/S6730-
H28X6CZ-V2/
S6730-H48X6C-
TV2/S6730-
H48X6C-V2/
S6730-H48X6CZ-
TV2/S6730-
H48X6CZ-V2/
S6730-H48Y6C-
TV2/S6730-
H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 422


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

When the configuration difference comparison S5735-S- S5735-S24P4XE-


command is being executed, if repeated V2 series V2/S5735-
commands exist in the same view, the current S5735-L- S24T4XE-V2/
command fails to be executed. V2 series S5735-S24U4XE-
V2/S5735-
S3710-H S48P4XE-V2/
series S5735-S48T4XE-
S5735I-L- V2/S5735-
V2 series S48U4XE-V2
S5732-H- S5735-L10T4X-A-
V2 series V2/S5735-
S5735I-S- L10T4X-TA-V2/
V2 series S5735-L16T4S-A-
V2/S5735-
S6730-H- L16T4X-QA-V2/
V2 series S5735-L24P4S-A-
V2/S5735-
L24P4XE-A-V2/
S5735-L24P4XE-
TA-V2/S5735-
L24T4S-A-V2/
S5735-L24T4X-
QA-V2/S5735-
L24T4XE-A-V2/
S5735-L24T4XE-
D-V2/S5735-
L48LP4S-A-V2/
S5735-L48LP4XE-
A-V2/S5735-
L48P4XE-A-V2/
S5735-L48T4S-A-
V2/S5735-
L48T4XE-A-V2/
S5735-L48T4XE-
TA-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P2T4X-TA-V2/
S5735-L8P4S-A-
V2/S5735-L8P4X-
QA-V2/S5735-
L8T4S-A-V2/
S5735-L8T4X-QA-
V2
S3710-H24P4S-A/
S3710-H24T4S-A/
S3710-H48LP4S-
A/S3710-H48T4S-
A

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 423


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5732-
H24S4X6QZ-TV2/
S5732-
H24S4X6QZ-V2/
S5732-
H24UM4Y2CZ-
TV2/S5732-
H24UM4Y2CZ-V2/
S5732-
H44S4X6QZ-TV2/
S5732-
H44S4X6QZ-V2/
S5732-
H48UM4Y2CZ-
TV2/S5732-
H48UM4Y2CZ-V2
S5735I-S24T4XE-
V2/S5735I-
S24T4XE-T-V2/
S5735I-S24U4XE-
V2/S5735I-
S24U4XE-T-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-T-V2/
S5735I-S8T4XN-
V2/S5735I-
S8U4XN-V2
S6730-H24X6C-
TV2/S6730-
H24X6C-V2/
S6730-H28X6CZ-
TV2/S6730-
H28X6CZ-V2/
S6730-H48X6C-
TV2/S6730-
H48X6C-V2/
S6730-H48X6CZ-
TV2/S6730-
H48X6CZ-V2/
S6730-H48Y6C-
TV2/S6730-
H48Y6C-V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 424


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Feature Requirements Series Models

For the S5735-L-V2 Series/S5735-S-V2 Series/ S5735-L- S5735-L10T4X-A-


S5735I-L-V2 Series/S5735I-S-V2 Series: V2 series V2/S5735-L16T4S-
In the batch configuration delivery scenario, a S5735-S- A-V2/S5735-
CPU usage threshold-crossing alarm may be V2 series L16T4X-QA-V2/
generated during service deployment. After the S5735-L24P4S-A-
S5735I-L- V2/S5735-
configuration delivery is complete, the CPU V2 series
usage will be restored and the CPU usage L24P4XE-A-V2/
threshold-crossing alarm will be cleared. S5735I-S- S5735-L24T4S-A-
V2 series V2/S5735-
L24T4X-QA-V2/
S5735-L24T4XE-
A-V2/S5735-
L24T4XE-D-V2/
S5735-L48LP4S-A-
V2/S5735-
L48LP4XE-A-V2/
S5735-L48P4XE-
A-V2/S5735-
L48T4S-A-V2/
S5735-L48T4XE-
A-V2/S5735-
L48T4XE-D-V2/
S5735-L8P2T4X-
A-V2/S5735-
L8P4S-A-V2/
S5735-L8P4X-QA-
V2/S5735-L8T4S-
A-V2/S5735-
L8T4X-QA-V2
S5735-S24P4XE-
V2/S5735-
S24T4XE-V2/
S5735-S24U4XE-
V2/S5735-
S48P4XE-V2/
S5735-S48T4XE-
V2/S5735-
S48U4XE-V2
S5735I-L10T4X-A-
V2/S5735I-L8P4X-
A-V2
S5735I-S24T4XE-
V2/S5735I-
S24U4XE-V2/
S5735I-S8T4SN-
V2/S5735I-
S8T4XN-V2/
S5735I-S8U4XN-
V2

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 425


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

8.3 Managing Configuration Files

8.3.1 Understanding Configuration Files

Configuration File Format


Configuration files use text format and must meet the following requirements:
● A configuration file can contain only configuration commands, view switching
commands, # symbols (used to switch to the system view), and the quit
command. When the device is loading a configuration file that contains other
types of commands, such as display commands used for querying, reset,
save, and ping commands used for maintenance, the return command, and
commands for upgrade compatibility, the device reports an error when
attempting to load such commands and continues to load other commands
supported in the configuration file.
● A configuration file cannot contain repeated commands.
● Each view is displayed with an indentation of one character.
● If commands in a configuration file need to be executed in a view, the
configuration file must also contain the command for entering the view.
● The configuration sequence and dependency must be correct.
● Interactive commands in a configuration file support only Y and N choices. Y
is the default choice, which is entered automatically during configuration
restoration.
● A configuration file must be saved to the root directory of the storage
medium, with a file name extension as .zip, .cfg, or .dat.
– A .cfg file is a text file, whose contents can be viewed directly. If a .cfg file
is specified as the configuration file, the system restores the commands in
the file one by one during device startup.
– A .zip file is compressed from a .cfg file and occupies less space. If a .zip
file is specified as the configuration file, the system first decompresses
the file into a .cfg file, and then restores the commands in the .cfg file
one by one during device startup.
– A .dat file is a binary file. If the startup software version and the .dat file
version are the same, the system restores all configurations at a time
without the need to restore the commands one by one, accelerating
device startup.

Configuration File Category


The following table lists the differences between the configurations loaded when
the device is running. These configurations fall into the following types: factory
configuration, preset configuration, current configuration, and next startup
configuration.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 426


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Type Description Command

Factory Factory configurations are basic -


configurati configurations provided for a
on new device. This type of
configurations enables a device
to start and operate correctly
when there is no configuration
file, or when the configuration
file is lost or damaged. When a
device starts with factory
configurations, it is considered
to start in unconfigured mode.
Factory configurations are
different from the default
command configurations. For
example, factory configurations
may contain the snetconf
server enable command, but
this command is not configured
by default. In this case, the
SNETCONF service is enabled
when the device starts with
factory configurations or
restores factory configurations.

Preset When a device is powered on, it Run the display startup


configurati reads the configuration file command to check the
on from the default directory to configuration file used for the
initialize the system. The current startup.
configurations in the
configuration file are called
preset configurations. If no
configuration file is stored in
the default directory, the device
uses the factory configurations
for initialization.

Current The configurations that are in Run the display current-


configurati effect during device running are configuration command to
on current configurations. check the current
configurations.

Next After the system starts, you can Run the display startup
startup specify a configuration file as command to check the
configurati the initial configurations for the configuration file to be used for
on next startup, known as the next the next startup.
startup configurations Run the display saved-
configuration command to
check content in the
configuration file to be used for
the next startup.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 427


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

To use modified configurations as the next startup configurations, run the save
command to save them to the default storage medium.
NOTE

If a command is configured in an incomplete format, the system saves the command to the
configuration file in its complete format. As a result, the command may have more than
510 characters, which is the maximum length supported by the system. Such a command
cannot be restored after the system restarts.

8.3.2 Viewing a Configuration File

Procedure

Table 8-3 Viewing a configuration file

Operation Command Description

Check the configuration dir -


file in the storage
medium.

Check the configuration display startup -


files for the current and
next startup.

Check configurations in a display configuration -


specified configuration configuration-file
file.

Check configurations in display saved- -


the configuration file for configuration
the next startup.

Check the system display saved- -


configurations saved last configuration last
time.

Check the time when the display saved- -


configurations are configuration time
automatically saved last
time.

Check all configurations display current- If include-default is not


that take effect on the configuration [ include- specified, only
device. default ] configured information is
displayed. If include-
default is specified, both
configured information
and default
configurations are
displayed.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 428


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Operation Command Description

Check the configurations display this [ include- This command displays


that take effect in the default ] the configurations in the
current view. view where this
command is executed.
If include-default is not
specified, only
configured information
in the current view is
displayed. If include-
default is specified, both
configured information
and default
configurations in the
current view are
displayed.

8.3.3 Saving a Configuration File


Context
You can run commands to modify current device configurations, but these
modified configurations will be lost once the device restarts unless you save them
to the configuration file before restarting the device. Two methods are available
for saving configurations to a configuration file:
● Enable the system to automatically save configurations.
● Manually save the configurations.
Device configurations are stored in the configuration file of the storage medium.
During startup, the system reads the configuration file to restore configurations of
the device, and then saves the restored configurations to memory.
You can use the display saved-configuration command to check configurations in
the configuration file, and the display current-configuration command to check
those in memory.
When the device is running properly, the configurations in the configuration file
should be the same as those in memory. If you add, modify, or delete
configurations, the latest configurations are saved in memory, and will be different
from those in the configuration file. In this case, you can run the save command
to save the current configurations in memory to the configuration file.
When the device has not run properly during system startup, the configurations in
the configuration file are not completely restored in memory. If you run the save
command at this time, incomplete configurations in memory will override those in
the configuration file. As a result, some configurations may be lost.

Procedure
● Enable the system to automatically save configurations.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 429


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

a. Enter the system view.


system-view

b. Configure the system to save the configurations at a scheduled time.


configuration file auto-save [ interval interval | delay delay-interval | cpu-limit cpu-usage ] *

The system does not automatically save the configurations in the


following scenarios when the scheduled time arrives:

▪ The system is writing the configuration file.

▪ The system is restoring device configurations.

▪ CPU usage is high.


c. (Optional) Configure server information, including the IP address of the
server where the configuration file is automatically saved, user name and
password, storage path, and mode for transmitting the configuration file
to the server.
configuration file auto-save backup-to-server server server-ip [ vpn-instance vpn-instance-
name ] transport-type { { ftp | sftp } [ port port-value ] user user-name password password |
tftp } [ path folder ]

NOTE

If the local storage medium does not have sufficient space or is damaged, or the
configuration file needs to be backed up, you can run this command to specify a file
server for saving the backup configuration file.
SFTP has higher security and is therefore recommended for saving the configuration
file to the file server.
The configuration file is saved on the server as a compressed package, named in the
[Link] [Link] format (for example,
[Link]). After decompression, the file with the file name
extension .cfg is the configuration file.
d. (Optional) Configure the function for uploading the configuration file at
a specific time point of a certain day every month.
configuration current backup-to-server monthly date date-value [ time time-value ]

● Manually save the configurations.


– Directly save the configuration file.
save [ configuration-file ]

The configuration file name extension must be .zip, .dat, or .cfg. If the
configuration file will be loaded during system startup, it must be stored
in the root directory of the storage medium.
If the configuration-file parameter is not specified, the system asks you
whether to name the configuration file [Link] when you save the
configuration file for the first time. The [Link] file is the default
configuration file and does not contain any configuration in the initial
state. If configurations are not saved for the first time, they will be saved
in the running configuration file. You can run the display startup
command to check the name of the running configuration file.
– Enter a password to save the configuration file.
save shareable-configuration configuration-file [ password ]

The device generates a key in the configuration file based on the


password entered by the user. When the configuration file is used next
time, the password must be entered for authentication.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 430


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

NOTE

After the weak password dictionary maintenance function is enabled, the


passwords (which can be queried using the display security weak-password-
dictionary command) defined in the weak password dictionary cannot be
specified in this command.

----End

8.3.4 Specifying the Configuration File for Next Startup

Context
When the system restarts, it uses the specified configuration file to restore
configurations.

Before specifying the file for the next startup, you can run the display startup
command to view the current specified file.

If no configuration file is specified, the default configuration file [Link] will


be used for the next startup.

NOTE

Manually constructing a configuration file is not recommended because manual


construction is prone to file format errors. The format error may cause a failure to restore
configurations or an error during configuration restoration.
The configuration file for the next startup must exist and be saved in the root directory of
the storage medium.
After specifying the file for the next startup, you cannot run the save command without
parameters in the user view. If you run this command, the system uses the saved
configuration file instead of the specified configuration file for the next startup.

Procedure
● Configure the configuration file for the next startup.
startup saved-configuration configuration-file

● Configure the configuration file containing key information for the next
startup.
startup shareable-configuration configuration-file [ password ]

If the configuration file configured for the next startup contains key
information, you need to enter a password for authentication before using the
file.

----End

Verifying the Configuration


Run the display configuration recover-result command to check the
configuration restoration result after the restart and the failure cause.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 431


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

8.3.5 Reusing the Configuration File of Another Device

Context
A configuration file may contain a ciphertext encrypted using a system master key.
As a system master key is automatically and randomly generated by default,
different devices have different system master keys. The ciphertext in a
configuration file of a device cannot be decrypted on another device. As a result,
the ciphertext cannot be restored on another device and will be used as a
plaintext. To decrypt the ciphertext in the configuration file on another device,
perform the following operations.

Procedure
Step 1 Export the configuration file from device A.
1. Save the configuration file.
save shareable-configuration configuration-file [ password ]

2. Export the configuration file.

For details, see 8.3.11 Backing Up the Configuration File to an SFTP Server
or Client.

Step 2 On device B, reuse the configuration file exported from device A.


1. Copy the configuration file of device A to device B.

For details, see 8.3.16 Copying the Configuration File from an SFTP Server
or Client to the Device.
2. Configure the exported configuration file as the configuration file to be
loaded for the next startup of device B.
startup shareable-configuration configuration-file [ password ]

----End

Verifying the Configuration


● Run the display configuration recover-result command to check the
configuration restoration result after the restart and the failure cause.
● Run the display master-key configuration command to check whether the
system master key is the configured one.

8.3.6 Comparing Configuration Files

Context
You can compare the current configuration file with the specified configuration file
to check whether they are consistent and determine whether to use the specified
configuration file for the next startup.

NOTE

The configuration file name extension must be .cfg or .zip.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 432


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Procedure

Table 8-4 Comparing configuration files


Operation Command Description

Check whether the display configuration These two commands


current configurations changes [ running file can only compare the
are consistent with those file-name | file file-name current running
in the specified running ] configuration file with a
configuration file. specified configuration
file. When you run these
Check whether the display configuration commands, the first
current configurations changes { running label specified configuration
are consistent with those label | label label file is called source
of a specified user label. running } configuration, and the
later specified
configuration file is
called target
configuration. If the
target configuration is
different from the source
configuration, the
difference is displayed
based on the following
rules:
● A command that
exists in the target
configuration rather
than the source
configuration is
prefixed with "+".
● A command that
exists in the source
configuration rather
than the target
configuration is
prefixed with "-".
● If a command is
modified in the target
configuration, the
original command is
prefixed with "-" and
the new command is
prefixed with "+".

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 433


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Operation Command Description

Check whether the compare configuration After completing a series


current configurations [ configuration-file ] of configuration
are the same as those in operations, you can
the configuration file for compare whether the
the next startup or a current configurations
specified configuration are the same as those in
file. the configuration file for
the next startup, or a
specified configuration
file starting from the
first line. Based on the
comparison result, you
can determine whether
to save the current
configurations in the
configuration file and
specify it as that used for
the next startup.
If there are differences
between the
configurations, the
system displays a
maximum of nine lines
starting from the first
line with differences. If
there are fewer than
nine lines from that line
to the end of the file, the
system will display the
remaining lines.

8.3.7 Backing Up the Configuration File by Copying


Configurations on the Screen

Context
You can copy configurations on the screen to back up them as a configuration file
to the hard disk of the PC. The backup configuration file can be used if the
configuration file restoration fails due to unexpected device damage.

Procedure
Step 1 Copy configurations on the screen. Specifically, run the following command and
copy all command output to a .txt file on the PC. The configurations are then
saved on the PC.
display current-configuration

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 434


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

NOTE

If the configuration of a single command is too long, the configuration may be displayed in
multiple lines on the terminal screen, depending on the terminal software. When copying a
multi-line configuration from the screen to a .txt file, ensure that the configuration occupies
one line in the .txt file. Otherwise, such a configuration may fail to be restored when
the .txt file is used.

----End

8.3.8 Backing Up the Configuration File to the Storage


Medium

Context
You can back up the configuration file to the storage medium. The backup
configuration file can be used if the configuration file restoration fails due to
unexpected device damage.

Procedure
Step 1 (Optional) Save the configuration file.
save configuration-file

Step 2 Copy the configuration file to the storage medium.


copy source-filename destination-filename

----End

8.3.9 Backing Up the Configuration File to an FTP Server or


Client

Prerequisites
Before backing up the configuration file to an FTP server or client, you have
completed the following tasks:
● If the device functions as an FTP client, connect it to an FTP server. For details,
see "Configuring a Device as an FTP Client" in CLI Configuration Guide > Basic
Configuration.
● If the device functions as an FTP server, connect it to an FTP client. For details,
see "Configuring a Device as an FTP Server" in CLI Configuration Guide >
Basic Configuration.
● Run the install feature-software WEAKEA command to install the weak
security algorithm/protocol feature package (WEAKEA).

Context
If the device is unexpectedly damaged, the configuration file cannot be restored.
In this case, a backup configuration file is required for restoring the device
configurations. You can back up the configuration file through FTP using either of
the following methods:

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 435


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

● If the device functions as an FTP client, back up the configuration file to an


FTP server.
● If the device functions as an FTP server, back up the configuration file to an
FTP client.

Select one method as required.

NOTE

Backing up the configuration file through FTP is a simple process, which however may pose
security risks. In scenarios featuring high security requirements, SFTP and SCP are
recommended for configuration file backup.
In FIPS mode, FTP cannot be used to back up configuration files.

Procedure
● Back up the configuration file to the FTP server when the device functions as
an FTP client.
a. Set up an FTP connection with the FTP server.
ftp [ ipv6 ] host-ip

b. Transfer the configuration file.

On the device, run the put command to upload the configuration file to
the specified path on the PC that functions as an FTP server.
put local-filename [ remote-filename ]

● Back up the configuration file to the FTP client when the device functions as
an FTP server.
a. On the PC that functions as an FTP client, initiate an FTP connection with
the device.

In this example, the IP address of the device is [Link], the FTP


user name created on the device is huawei, and the password of the FTP
user is YsHsjx_202206.
C:\Documents and Setting\Administrator> ftp [Link]
Connected to [Link].
220 FTP service ready.
User ([Link]:(none)): huawei
331 Password required for huawei.
Password:
230 User logged in.

b. Transfer the configuration file.

On the PC, run the get command to download the configuration file to
the specified path on the PC.
ftp> get remote-filename [ local-filename ]

----End

Verifying the Configuration


The configuration file is saved to the working directory of the FTP user, and the
size of the configuration file on the device is the same as that on the FTP server or
client.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 436


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

8.3.10 Backing Up the Configuration File to a TFTP Server

Prerequisites
Before backing up the configuration file to a TFTP server, you have completed the
following tasks:

● Ensure that the device has been connected to the TFTP server. For details, see
"Configuring a Device as a TFTP Client" in CLI Configuration Guide > Basic
Configuration.
● Run the install feature-software WEAKEA command to install the weak
security algorithm/protocol feature package (WEAKEA).

Context
If the device is unexpectedly damaged, the configuration file cannot be restored.
In this case, a backup configuration file is required for restoring the device
configurations. You can back up the configuration file through TFTP.

NOTE

Backing up the configuration file through TFTP is a simple process, which however may
pose security risks. In scenarios featuring high security requirements, SFTP and SCP are
recommended for configuration file backup.
In FIPS mode, TFTP cannot be used to back up configuration files.

Procedure
Step 1 Back up the configuration file to the TFTP server.
tftp [ ipv6 ] hostname-ip put sourcefilename [ destination-filename ]

----End

Verifying the Configuration


The configuration file is saved to the working directory of the TFTP user, and the
size of the configuration file on the device is the same as that on the TFTP server.

8.3.11 Backing Up the Configuration File to an SFTP Server or


Client

Prerequisites
Before backing up the configuration file to an SFTP server or client, you have
completed the following tasks:
● If the device functions as an SFTP client, connect it to an SFTP server. For
details, see "Configuring a Device as an SFTP Client" in CLI Configuration
Guide > Basic Configuration.
● If the device functions as an SFTP server, connect it to an SFTP client. For
details, see "Configuring a Device as an SFTP Server" in CLI Configuration
Guide > Basic Configuration.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 437


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Context
If the device is unexpectedly damaged, the configuration file cannot be restored.
In this case, a backup configuration file is required for restoring the device
configurations. You can back up the configuration file through SFTP using either of
the following methods:
● If the device functions as an SFTP client, back up the configuration file to an
SFTP server.
● If the device functions as an SFTP server, back up the configuration file to an
SFTP client.

Select one method as required.

NOTE

Backing up the configuration file through FTP or TFTP is a simple process, which however
may pose security risks. In scenarios featuring high security requirements, SFTP and SCP are
recommended for configuration file backup.

Procedure
● Back up the configuration file to the SFTP server when the device functions as
an SFTP client.
a. Enter the system view.
system-view

b. Set up an SFTP connection with the SFTP server.


sftp [ ipv6 ] host-ip

c. Transfer the configuration file.

On the device, run the put command to upload the configuration file to
the specified path on the PC that functions as an SFTP server.
put local-filename [ remote-filename ]

● Back up the configuration file to the SFTP client when the device functions as
an SFTP server.
a. On the PC that functions as an SFTP client, initiate an SFTP connection
with the device.

The following information is for reference only.


C:/Documents and Settings/Administrator> sftp client001@[Link]
Connecting to [Link]...
The authenticity of host "[Link] ([Link])" can't be established.
DSA key fingerprint is 0d:48:82:fd:2f:52:1c:f0:c4:22:70:80:8f:7b:fd:78.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added "[Link]" (DSA) to the list of known hosts.
client001@[Link]'s password:
sftp>

b. Transfer the configuration file.

On the PC, run the get command to transfer the configuration file to the
specified path on the PC.
sftp> get remote-filename [ local-filename ]

----End

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 438


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Verifying the Configuration


The configuration file is saved to the working directory of the SFTP user, and the
size of the configuration file on the device is the same as that on the SFTP server
or client.

8.3.12 Backing Up the Configuration File to an SCP Server or


Client
Prerequisites
Before backing up the configuration file to an SCP server or client, you have
completed the following tasks:
● If the device functions as an SCP client, connect it to an SCP server. For
details, see "Configuring a Device as an SCP Client" in CLI Configuration Guide
> Basic Configuration.
● If the device functions as an SCP server, connect it to an SCP client. For
details, see "Configuring a Device as an SCP Server" in CLI Configuration
Guide > Basic Configuration.

Context
If the device is unexpectedly damaged, the configuration file cannot be restored.
In this case, a backup configuration file is required for restoring the device
configurations. You can back up the configuration file through SCP using either of
the following methods:
● If the device functions as an SCP client, back up the configuration file to an
SCP server.
● If the device functions as an SCP server, back up the configuration file to an
SCP client.
Select one method as required.

Procedure
● Back up the configuration file to the SCP server when the device functions as
an SCP client.
a. Enter the system view.
system-view

b. Transfer the configuration file.


On the device, run the following command to upload the configuration
file to the specified path on the PC that functions as an SCP server:
scp source-filename destination-filename

For example, to back up the [Link] file to the SCP server at [Link]
in SCP mode, run the following command. (The following information is
for reference only.)
<HUAWEI> system-view
[HUAWEI] scp [Link] scpuser@[Link]:flash:/[Link]
Trying [Link]...
Press CTRL+K to abort

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 439


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Connected to [Link]...
The server is not authenticated. Continue to access it? [Y/N]:y
Save the server's public key? [Y/N]:y
The server's public key will be saved with the name [Link]. Please wait...

Please select public key type for user authentication [R for RSA/D for DSA/E for ECC] Please
select [R/D/E]:e
Enter password:
[Link] 100% 261Bytes 1Kb/s

● Back up the configuration file to the SCP client when the device functions as
an SCP server.
On the PC that functions as an SCP client, run the following command to
back up the configuration file to the specified path on the PC:
scp source-filename destination-filename

For example, to back up the [Link] file to the SCP client in SCP mode, run
the following command. The IP address of the device is [Link]. (The
following information is for reference only.)
C:\Documents and Settings\Administrator> scp scpuser@[Link]:flash:/[Link] [Link]
The authenticity of host '[Link] ([Link])' can't be established.
DSA key fingerprint is 46:b2:8a:52:88:42:41:d4:af:8f:4a:41:d9:b8:4f:ee.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[Link]' (DSA) to the list of known hosts.
scpuser@[Link]'s password:
[Link] 100% 1257 1.2KB/s 00:00
Read from remote host [Link]: Connection reset by peer

C:\Documents and Settings\Administrator>

----End

Verifying the Configuration


The configuration file is saved to the working directory of the SCP user, and the
size of the configuration file on the device is the same as that on the SCP server or
client.

8.3.13 Restoring the Configuration File from the Storage


Medium
Context
If functions do not operate properly due to incorrect configurations, you can
restore the backup configuration file stored in the storage medium to the startup
configuration file.

Procedure
Step 1 Copy the backup configuration file and specify the name for the configuration file
copy.
copy source-filename destination-filename [ all ]

Step 2 Specify the configuration file for the next startup.


startup saved-configuration configuration-file

Step 3 Restart the device for the configuration file to take effect.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 440


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

reboot fast

----End

8.3.14 Copying the Configuration File from an FTP Server or


Client to the Device

Prerequisites
Before copying the configuration file from an FTP server or client to the device,
you have completed the following tasks:
● If the device functions as an FTP client, connect it to an FTP server. For details,
see "Configuring a Device as an FTP Client" in CLI Configuration Guide > Basic
Configuration.
● If the device functions as an FTP server, connect it to an FTP client. For details,
see "Configuring a Device as an FTP Server" in CLI Configuration Guide >
Basic Configuration.
● Run the install feature-software WEAKEA command to install the weak
security algorithm/protocol feature package (WEAKEA).

Context
If functions do not operate properly due to incorrect configurations, you can copy
the backup configuration file of the device from an FTP server or client to restore
the configuration file using either of the following methods:
● If the device functions as an FTP client, copy the configuration file from an
FTP server to the device.
● If the device functions as an FTP server, copy the configuration file from an
FTP client to the device.

Select one method as required.

NOTE

Restoring the configuration file through FTP is a simple process, which however may pose
security risks. In scenarios featuring high security requirements, SFTP and SCP are
recommended for configuration file restoration.
In FIPS mode, FTP cannot be used to restore configuration files.

Procedure
● Copy the configuration file from the FTP server when the device functions as
an FTP client.
a. Set up an FTP connection with the FTP server.
ftp [ ipv6 ] host-ip

b. Transfer the configuration file.

On the device, run the get command to copy the configuration file from
the PC that functions as an FTP server to the specified path on the device.
get remote-filename [ local-filename ]

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 441


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

● Copy the configuration file from the FTP client when the device functions as
an FTP server.
a. On the PC that functions as an FTP client, initiate an FTP connection with
the device.
In this example, the IP address of the device is [Link], the FTP
user name created on the device is huawei, and the password of the FTP
user is YsHsjx_202206.
C:\Documents and Setting\Administrator> ftp [Link]
Connected to [Link].
220 FTP service ready.
User ([Link]:(none)): huawei
331 Password required for huawei.
Password:
230 User logged in.

b. Transfer the configuration file.


On the PC that functions as an FTP client, run the put command to copy
the configuration file from the PC to the specified path on the device.
ftp> put local-filename [ remote-filename ]

----End

Verifying the Configuration


Run the dir command on the device to check whether the configuration file has
been successfully copied from the PC to the device.

8.3.15 Copying the Configuration File from a TFTP Server to


the Device
Prerequisites
Before copying the configuration file from a TFTP server to the device, you have
completed the following tasks:
● Ensure that the device has been connected to the TFTP server. For details, see
"Configuring a Device as a TFTP Client" in CLI Configuration Guide > Basic
Configuration.
● Run the install feature-software WEAKEA command to install the weak
security algorithm/protocol feature package (WEAKEA).

Context
If functions do not operate properly due to incorrect configurations, you can copy
the backup configuration file from the TFTP server to the device to restore the
functions.

NOTE

Restoring the configuration file through TFTP is a simple process, which however may pose
security risks. In scenarios featuring high security requirements, SFTP and SCP are
recommended for configuration file restoration.
In FIPS mode, TFTP cannot be used to restore configuration files.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 442


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Procedure
Step 1 Copy the configuration file from the TFTP server to the device.
tftp [ ipv6 ] hostname-ip get source-filename [ destination-filename ]

----End

Verifying the Configuration


Run the dir command on the device to check whether the configuration file has
been successfully copied from the TFTP server to the device.

8.3.16 Copying the Configuration File from an SFTP Server or


Client to the Device
Prerequisites
Before copying the configuration file from an SFTP server or client to the device,
you have completed the following tasks:
● If the device functions as an SFTP client, connect it to an SFTP server. For
details, see "Configuring a Device as an SFTP Client" in CLI Configuration
Guide > Basic Configuration.
● If the device functions as an SFTP server, connect it to an SFTP client. For
details, see "Configuring a Device as an SFTP Server" in CLI Configuration
Guide > Basic Configuration.

Context
If functions do not operate properly due to incorrect configurations, you can copy
the backup configuration file of the device from an SFTP server or client to restore
the configuration file using either of the following methods:
● If the device functions as an SFTP client, copy the configuration file from an
SFTP server to the device.
● If the device functions as an SFTP server, copy the configuration file from an
SFTP client to the device.
Select one method as required.

Procedure
● Copy the configuration file from the SFTP server when the device functions as
an SFTP client.
a. Enter the system view.
system-view

b. Set up an SFTP connection with the SFTP server.


sftp [ ipv6 ] host-ip

c. Transfer the configuration file.


On the device, run the get command to copy the configuration file from
the PC that functions as an SFTP server to the specified path on the
device.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 443


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

get remote-filename [ local-filename ]


● Copy the configuration file from the SFTP client when the device functions as
an SFTP server.
a. On the PC that functions as an SFTP client, initiate an SFTP connection
with the device.
The following information is for reference only.
C:/Documents and Settings/Administrator> sftp client001@[Link]
Connecting to [Link]...
The authenticity of host "[Link] ([Link])" can't be established.
DSA key fingerprint is 0d:48:82:fd:2f:52:1c:f0:c4:22:70:80:8f:7b:fd:78.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added "[Link]" (DSA) to the list of known hosts.
client001@[Link]'s password:
sftp>
b. Transfer the configuration file.
On the PC that functions as an SFTP client, run the put command to copy
the configuration file from the PC to the specified path on the device.
sftp> put local-filename [ remote-filename ]

----End

Verifying the Configuration


Run the dir command on the device to check whether the configuration file has
been successfully copied from the PC to the device.

8.3.17 Copying the Configuration File from an SCP Server or


Client to the Device
Prerequisites
Before copying the configuration file from an SCP server or client to the device,
you have completed the following tasks:
● If the device functions as an SCP client, connect it to an SCP server. For
details, see "Configuring a Device as an SCP Client" in CLI Configuration Guide
> Basic Configuration.
● If the device functions as an SCP server, connect it to an SCP client. For
details, see "Configuring a Device as an SCP Server" in CLI Configuration
Guide > Basic Configuration.

Context
If functions do not operate properly due to incorrect configurations, you can copy
the backup configuration file of the device from an SCP server or client to restore
the configuration file using either of the following methods:
● If the device functions as an SCP client, copy the configuration file from an
SCP server to the device.
● If the device functions as an SCP server, copy the configuration file from an
SCP client to the device.
Select one method as required.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 444


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Procedure
● Copy the configuration file from the SCP server when the device functions as
an SCP client.
a. Enter the system view.
system-view

b. Transfer the configuration file.

On the device, run the following command to copy the configuration file
from the PC that functions as an SCP server to the specified path on the
device:
scp source-filename destination-filename

For example, to copy the [Link] file from the SCP server at [Link] to
the device using SCP, run the following command. (The following
information is for reference only.)
<HUAWEI> system-view
[HUAWEI] scp scpuser@[Link]:flash:/[Link] [Link]
Trying [Link]...
Press CTRL+K to abort
Connected to [Link]...
The server is not authenticated. Continue to access it? [Y/N]:y
Save the server's public key? [Y/N]:y
The server's public key will be saved with the name [Link]. Please wait...

Please select public key type for user authentication [R for RSA/D for DSA/E for ECC] Please
select [R/D/E]:e
Enter password:
[Link] 100% 261Bytes 1Kb/s

● Copy the configuration file from the SCP client when the device functions as
an SCP server.

Run the following command to copy the configuration file from the PC that
functions as an SCP client to the specified path on the device:
scp source-filename destination-filename

For example, to copy the [Link] file from the SCP client to the device at
[Link] using SCP, run the following command. (The following information is
for reference only.)
C:\Documents and Settings\Administrator> scp [Link] scpuser@[Link]:flash:/vrpcfg-
[Link]
The authenticity of host '[Link] ([Link])' can't be established.
DSA key fingerprint is 46:b2:8a:52:88:42:41:d4:af:8f:4a:41:d9:b8:4f:ee.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[Link]' (DSA) to the list of known hosts.
scpuser@[Link]'s password:
[Link] 100% 1257 1.2KB/s 00:00
Read from remote host [Link]: Connection reset by peer

C:\Documents and Settings\Administrator>

----End

Verifying the Configuration


Run the dir command on the device to check whether the configuration file has
been successfully copied from the PC to the device.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 445


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

8.3.18 Compressing the Configuration File


Context
To save a large configuration file with less storage space, you can compress the
file. A compressed configuration file stored on the device can also be
decompressed.

Procedure
● Compress the configuration file.
zip source-filename destination-filename [ password password ]

● Decompress the configuration file.


unzip source-filename destination-filename [ password password ]

----End

8.3.19 Clearing the Configuration File


Context
Clearing the configuration file is necessary in the following scenarios:
● The software and configuration file do not match after the device software is
upgraded.
● The configuration file is damaged, or an incorrect configuration file is loaded.

NOTICE

The reset saved-configuration command will clear the configuration file


used for the next startup. You are advised to run this command under the
guidance of technical support personnel.

To configure an interface on a device for other uses, you need to first delete
existing configurations from the interface one by one. If the interface has a large
number of configurations, this can take a long time. A single command is
available for deleting all configurations on an interface, reducing the maintenance
workload and simplifying the deletion operation.

Procedure
● Delete configurations for the next startup.
a. Cancel the configuration file specified for the next startup to restore the
default configurations.
reset saved-configuration

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 446


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

NOTE

After the configuration file specified for the next startup is canceled, the device
will use default configurations for startup, unless the startup saved-
configuration command is used to specify a new configuration file, or new
configurations have been saved to the configuration file for the next startup.
Before the reset saved-configuration command is executed, the system checks
whether the configuration files used for the current startup and the next startup
are the same:
● If they are the same, running the reset saved-configuration command clears
both configuration files, and the default configuration file will be used for the
next startup.
● If they are not the same, running the reset saved-configuration command
clears the configuration file for next startup, but the current configuration file
remains unchanged.
● If the current configuration file is empty and the configuration file for next
startup is not empty, running the reset saved-configuration command clears
the configuration file for next startup.
● If the configuration file for next startup is empty and the current
configuration file is not empty, after the reset saved-configuration
command is run, the system reports an error and does not clear any
configuration file. If you run the command to restart a device, addresses
configured for management interfaces on the device will become invalid, and
you must log in to the device through a console interface to re-configure
these addresses.
b. Restart the device to validate the configuration.
reboot fast

● Delete all configurations from an interface using one single command to


restore the default configurations.
clear configuration interface interface-type interface-number

NOTE

This command will delete all configurations of a specified interface. Exercise caution
when running this command.
Ensure that the specified interface type and number are correct. Otherwise, the
configurations of another interface may be deleted, causing service interruption.

----End

8.3.20 Rolling Back Configurations


Context
If faults are caused by incorrect configurations, or if an unexpected configuration
result is generated on the network, you can roll back configurations.
A configuration rollback point needs to be generated using the following methods
before the configuration rollback function is used:
● To enable the time when a rollback point is automatically generated, run the
set save-configuration checkpoint daily time time command in the system
view.
● After a series of configuration commands are configured, run the commit
label label [ description description ] command. The system generates a user
label for the current configuration rollback point. You can specify description

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 447


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

in the command to add brief description for a configuration rollback point,


allowing rapid locating of a desired configuration rollback point.

NOTE

The system configuration takes effect in immediate mode. After you enter a command line
and press Enter, the system performs a syntax check. The configuration takes effect as soon
as it passes the syntax check, and you do not need to run the commit command to commit
the configuration.

Procedure
Step 1 Check the configuration rollback points and the latest configuration changes.

For details, see Table 8-5.

Table 8-5 Checking configuration rollback points

Operation Command Description

Check all configuration display configuration This command displays


rollback points. commit list [ verbose ] configuration rollback
[ number-of-commits | points and their details.
label ] To check a specified
number of latest
configuration rollback
points, specify number-
of-commits.

Step 2 Roll back the system to the historical configuration state by specifying a
configuration rollback point.
rollback configuration { to commit-id commit-id | to label label | to file file-name }

During configuration rollback, the created configuration will be deleted, the


deleted configuration will be re-created, or the modified configuration will be
restored to the original one.

● To roll back the system to the historical configuration state at a configuration


rollback point, specify commit-id commit-id.
● To roll back the system to the historical configuration state at a configuration
rollback point with a specified user label, specify label label.
● To roll back the system to the historical configuration state using a specified
configuration file, specify file file-name.

Step 3 (Optional) Set the user label for a configuration rollback point.
set configuration commit commit-id label label-string

By default, no user label is set for a configuration rollback point.

Step 4 (Optional) Delete the user label of the specified configuration rollback point or
the earliest configuration rollback point list generated in the system.
clear configuration commit { commit-id label | oldest number-of-commits }

Step 5 (Optional) Delete the configuration rollback point with a specified user label.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 448


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

clear configuration commit label label-name

----End

Example
A user logs in to the device and finds that the configuration is incorrect. The user
then rolls back the system using a backup configuration file.

1. Check the name of the backup configuration file on the current device.
<HUAWEI> dir
Directory of flash:/

Idx Attr Size(Byte) Date Time FileName


0 -rw- 889 Mar 01 2019 14:41:56 [Link]
1 -rw- 6,311 Feb 17 2019 14:05:04 [Link]
2 -rw- 2,393 Mar 06 2019 17:20:10 [Link]
3 -rw- 812 Nov 12 2019 15:43:10 hostkey
4 drw- - Mar 01 2019 14:41:46 compatible
5 -rw- 540 Nov 12 2019 15:43:12 serverkey...
670,092 KB total (569,904 KB free)

2. Roll back the system using the backup configuration file.


<HUAWEI> rollback configuration to file [Link]
Warning: This operation will revert configuration changes to the file [Link].
Continue? [Y/N]:y

3. Verify the configuration.


Run the display current-configuration command to check whether the
incorrect configuration still exists.

Verifying the Configuration


● Run the display configuration rollback result command to view information
about the latest configuration rollback operation, including all prompts and
failure messages.
● Run the display configuration commit at commit-id command to view all
configuration information at the specified configuration rollback point.

8.3.21 Example: Specifying the Configuration File to Be


Loaded for Next Startup

Networking Requirements
As shown in Figure 8-1, the current system software cannot meet user needs. The
device must load new software version with more features. Then the device
software needs to be upgraded remotely.

Figure 8-1 Network diagram of specifying the configuration file to be loaded for
next startup

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 449


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Configuration Roadmap
The configuration roadmap is as follows:
1. Upload the new system software to the root directory of the device.
2. Save the current configuration so that it remains effective after upgrade.
3. Specify the system software to be loaded for next startup.
4. Specify the configuration file to be loaded for next startup.
5. Restart the device to complete upgrade.

Procedure
Step 1 Upload the new system software to the root directory of the device.
1. Before configuration, run the display startup command to view the files for
next startup.
<HUAWEI> display startup
MainBoard:
Configured startup system software: flash:/[Link]
Startup system software: flash:/[Link]
Next startup system software: flash:/[Link]
Startup saved-configuration file: flash:/[Link]
Next startup saved-configuration file: flash:/[Link]
Startup paf file: default
Next startup paf file: default
Startup patch package: NULL
Next startup patch package: NULL
2. Configure the device as an SFTP server.
Upload the new system software to the device. This example uses SFTP to
transfer the system software. Configure the device as an SFTP server and
upload the system software to the device from the SFTP client. Ensure that
there is enough space in the storage medium before uploading files. If the
space is insufficient, delete unnecessary files from the storage medium.
# Configure an IP address for the SFTP server.
<HUAWEI> system-view
[HUAWEI] sysname SSH Server
[SSH Server] interface 10ge 1/0/1
[SSH Server-10GE1/0/1] undo portswitch
[SSH Server-10GE1/0/1] ip address [Link] [Link]
[SSH Server-10GE1/0/1] quit
# Configure the public key algorithm, encryption algorithm, key exchange
algorithm list, HMAC authentication algorithm, and minimum key length on
the SSH server.
[SSH Server] ssh server cipher aes128_ctr aes256_ctr aes192_ctr aes128_gcm aes256_gcm
[SSH Server] ssh server hmac sha2_256 sha2_512
[SSH Server] ssh server key-exchange dh_group_exchange_sha256 dh_group16_sha512
[SSH Server] ssh server publickey rsa_sha2_256 rsa_sha2_512
[SSH Server] ssh server dh-exchange min-len 3072
# On the server, generate a local key pair and enable the SFTP server
function.
[SSH Server] dsa local-key-pair create
Info: The key name will be: Host_DSA
Info: The key modulus can be any one of the following :
2048.
Info: Key pair generation will take a short
while.
Info: Generating keys...
Info: Succeeded in creating the DSA host keys.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 450


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

[SSH Server] sftp server enable


[SSH Server] ssh server-source all-interface
# Configure SSH user information including the authentication mode, service
type, authorized directory, user name, and password.
[SSH Server] ssh user client authentication-type password
Info: Succeeded in adding a new SSH user.
[SSH Server] ssh user client service-type sftp
[SSH Server] ssh user client sftp-directory flash:
[SSH Server] aaa
[SSH Server] local-user client password
Please configure the login password (8-128)
It is recommended that the password consist of at least 2 types of characters, including lowercase
letters, uppercase letters, numerals and special characters.
Please enter password:
Please confirm password:
Info: Add a new user.
[SSH Server-aaa] local-user client privilege level 3
[SSH Server-aaa] local-user client service-type terminal ssh
[SSH Server-aaa] quit
# Configure access permissions on the SSH server.
[SSH Server] acl 2000
[SSH Server-acl4-basic-2000] rule permit source [Link] 8
[SSH Server-acl4-basic-2000] quit
[SSH Server] ssh server acl 2000
3. Run the sftp [Link] command in the CLI window of the PC to set up
an SFTP connection with the device. Run the put command to upload new
system software [Link].
After the system software is successfully uploaded, run the dir command on
the SSH server to view the uploaded system software.
<SSH Server> dir
Directory of flash:/

Idx Attr Size(Byte) Date Time FileName


0 drw- - Apr 16 2012 13:19:58 logfile
1 -rw- 85,925,409 Apr 16 2012 13:18:02 [Link]
2 -rw- 4 Oct 27 2011 17:25:22 [Link]
3 -rw- 6,033 Jul 16 2012 16:40:02 [Link]
4 -rw- 3,275 Jul 14 2012 14:18:08 [Link]
5 drw- - Nov 14 2011 19:14:26 sysdrv
6 drw- 88,239,759 Jul 16 2012 19:14:26 [Link]
...

670,092 KB total (569,904 KB free)

Step 2 Save the current configuration.


<SSH Server> save

The system displays a message indicating that the current configuration will be
saved and asks you whether to continue. Enter y and the configuration will be
saved to the device.
Step 3 Specify the system software to be loaded for next startup.
<SSH Server> startup system-software [Link]

Step 4 Specify the configuration file to be loaded for next startup.


<SSH Server> startup saved-configuration [Link]

NOTE

In step 1, you can run the display startup command to check the configuration file for next
startup. The message "Next startup saved-configuration file: flash:/[Link]" will be
displayed. This means that the [Link] configuration file has been specified for next
startup, so skip this step. To specify another file for next startup, perform this step.

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 451


CloudEngine S3700, S5700, and S6700 Series
Switches
Configuration Guide - Basic Configuration 8 Configuration File Management Configuration

Step 5 Verify the configuration.

Run the following command to view the system software and configuration file
for next startup.
<SSH Server> display startup
MainBoard:
Configured startup system software: flash:/[Link]
Startup system software: flash:/[Link]
Next startup system software: flash:/[Link]
Startup saved-configuration file: flash:/[Link]
Next startup saved-configuration file: flash:/[Link]
Startup paf file: default
Next startup paf file: default
Startup patch package: NULL
Next startup patch package: NULL

Step 6 Restart the device.

# Because the configuration file has been saved, run the following command to
restart the device quickly.
<SSH Server> reboot fast

When the system asks you whether to continue with a system restart, enter y.

----End

Verifying the Configuration


# Wait for several minutes until the device restart is complete. Run the display
version command to check the current system version. If the current system
software is new, the upgrade has succeeded.

Configuration Scripts
#
sysname SSH Server
#
acl number 2000
rule 5 permit source [Link] [Link]
#
aaa
local-user client password irreversible-cipher $1d$+,JS+))\\2$KVNj(.3`_5x0FCKGv}H&.kUTI`Ff&H*[Link]>)$
local-user client service-type terminal ssh
local-user client privilege level 3
#
interface 10GE1/0/1
undo portswitch
ip address [Link] [Link]
#
sftp server enable
ssh server-source all-interface
ssh server acl 2000
ssh user client
ssh user client authentication-type password
ssh user client service-type sftp
ssh user client sftp-directory flash:
#
ssh server cipher aes128_ctr aes256_ctr aes192_ctr aes128_gcm aes256_gcm
ssh server hmac sha2_256 sha2_512
ssh server key-exchange dh_group_exchange_sha256 dh_group16_sha512
ssh server publickey rsa_sha2_256 rsa_sha2_512
ssh server dh-exchange min-len 3072
#
return

Issue 02 (2023-11-15) Copyright © Huawei Technologies Co., Ltd. 452

You might also like