Configuration Replacement

Concepts Related to Configuration Replacement

Configuration replacement is a function used to replace file configurations, segment configurations, and character strings and to paste differential configurations. After the replacement, the configuration enters the <candidate/> database. The configuration needs to be manually committed because the system does not automatically commit the configuration.

  • File configuration replacement: Replace all the running configurations on the current device with a configuration file that contains all the configurations of the device.

    The system compares the specified configuration file with the full configuration that is running on the device, identifies the differences, and then automatically executes the configuration with differences. For example, if the replacing file contains configurations a, b, c, and d, and the current configurations of the device are a, b, e, and f, the differences between the two files are +c, +d, -e, -f. The process of replacing the configuration file is to add configurations c and d and to delete configurations e and f.

    • +: added configuration
    • -: deleted configuration
  • Segment configuration replacement: Replace the configuration only in a specified view or in a scope restricted using the <replace/> tag, because the specified configuration file contains only the configuration of this view or because the <replace/> tag restricts the replacement scope in a configuration file that contains all configurations.

    For example, replace the configuration in the AAA view on the current device. Enter the AAA view and save the configuration in the AAA view to a specified file (the file name can be customized). In this way, the saved configuration contains the <replace/> tag. When the configuration replacement command is executed, the device replaces the configuration in the destination file according to the <replace/> tag.

  • Pasting of differential configurations: Query the configurations that are different between the current device and other devices, paste the differential configurations to the current device, and commit the configurations.

    For example, the current device is device A and its configuration needs to be the same as device B. After the configuration file on device B is transmitted to device A, a command is executed on device A to query the configuration differences between device A and device B. Then these differences are pasted to device A.

  • Character string replacement: Enter the specific service view and run the character string replacement command to replace the specified character string in the current view with the target character string.

Application Scenarios for Configuration Replacement

In a scenario where a management server manages a device, the server stores the configurations required by the device. If the configurations on the management server change, the configurations on the device also need to be changed accordingly. In this case, you can load the configuration file on the management server and use this file to replace the configurations on the device, achieving configuration consistency between the management server and the device.

If one of the devices with the same configurations encounters a configuration change, the configurations of other devices must be changed accordingly to keep configuration consistency. In this case, you can query the configuration differences and use the configuration replacement function to paste the differential configurations to those devices. This ensures that the configurations on all the devices are the same.

Benefits of Configuration Replacement

Configuration replacement facilitates system maintenance. During system running, you can load a configuration file transferred from a specified file server or a previously saved configuration file, and import configurations in the file to the current device in CLI mode to replace the running configurations. This function does not require system restart or configuration one by one, greatly improving operation efficiency and avoiding mistakes caused by manual modification.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic