The compare configuration compares whether the current configurations (including offline configurations) are identical with the next startup configuration file.
Parameter | Description | Value |
---|---|---|
configuration-file | Specifies the name of the configuration file to be compared with the current configurations. | The value is a string of 5 to 48 case-insensitive characters without spaces. |
current-line-number | Specifies the line number for comparison in the current configuration. | The value is an integer that ranges from 0 to 65535. |
save-line-number | Specifies the line number for comparison in the saved configuration. | The value is an integer that ranges from 0 to 65535. |
Usage Scenario
If current-line-number and save-line-number are not specified, the configuration files are compared from the first lines. The two parameters can be specified to skip the differences that are found and continue the comparison.
The compare configuration command outputs display the current configuration file (including offline configurations) and the saved configuration file from the line that contains differences respectively. By default, the output difference information is restricted to 120 characters.
Precautions
The configuration file name extension must be .cfg or .zip.
If configuration-file is not specified, the system compares whether the current configurations (including offline configurations) are identical with the next startup configuration file.
If configuration-file is specified, the system compares whether the current configurations (including offline configurations) are identical with the specified startup configuration file.
# Compare whether the current configurations (including offline configurations) are identical with the next startup configuration file.
<HUAWEI> compare configuration
Info: The system is now comparing the configuration, please wait.... Warning: The current configuration is not the same as the next startup configuration file. There may be several differences, and the following are some configurations beginning from the first: ====== Current configuration line 6 ====== vlan batch 1 to 2 10 to 11 15 70 to 71 91 to 92 100 111 230 240 901 vlan batch 911 1111 # l2protocol-tunnel vtp group-mac 0100-0ccd-ffff ====== Configuration file line 6 ====== vlan batch 1 to 2 10 to 11 15 70 91 to 92 100 111 230 240 901 vlan batch 911 1111 # l2protocol-tunnel vtp group-mac 0100-0ccd-ffff