< Home

compare configuration

Function

The compare configuration compares whether the current configurations (including offline configurations) are identical with the next startup configuration file.

Format

compare configuration [ configuration-file ] [ current-line-number save-line-number ]

Parameters

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.

Views

User view

Default Level

3: Management level

Usage Guidelines

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.

  • If the characters from differences to the end of the configuration file are less than 120, the system displays the output difference information till the end of the configuration file.
  • If the characters from differences to the end of the configuration file are more than 120, the system only displays 120 characters.

Precautions

  • The execution of this command takes a long time. To terminate the running command, press Ctrl+C.
  • 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.

Example

# 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  
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >