CN116055314A - Configuration synchronization method and device - Google Patents

Configuration synchronization method and device Download PDF

Info

Publication number
CN116055314A
CN116055314A CN202310141588.1A CN202310141588A CN116055314A CN 116055314 A CN116055314 A CN 116055314A CN 202310141588 A CN202310141588 A CN 202310141588A CN 116055314 A CN116055314 A CN 116055314A
Authority
CN
China
Prior art keywords
configuration
control plane
file
configuration file
configuration information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310141588.1A
Other languages
Chinese (zh)
Inventor
肖真
高平利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202310141588.1A priority Critical patent/CN116055314A/en
Publication of CN116055314A publication Critical patent/CN116055314A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0853Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information
    • H04L41/0856Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information by backing up or archiving configuration information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a configuration synchronization method and device, and relates to the technical field of communication. The method may be applied in a first control plane, the method comprising: when the first set time arrives, carrying out normalization processing on the current local configuration to obtain a first configuration file; the first configuration file is sent to a second control plane through a file transmission channel; receiving a second configuration file which is sent by the second control plane through the file transmission channel and is obtained after the normalization processing of the local configuration of the second control plane; generating a differential configuration file according to the first configuration file and the second configuration file; and updating the local configuration in the first control plane according to the differential configuration file. Thus, the synchronization of configuration between the main CP and the standby CP is realized in the CP disaster recovery environment.

Description

Configuration synchronization method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a configuration synchronization method and apparatus.
Background
The vbas (Virtual Broadband Remote Access Server, virtualized broadband remote access server) transfer control separation system solves the problems of mismatching of the control plane and the forwarding plane capability, incapability of sharing resources, untimely deployment of new services and the like existing in the traditional BRAS by completely decoupling the forwarding plane from the control plane. The biggest change compared to conventional BRAS is in the control plane, which is located as a user control management part (vcbras-CP). And the vBRAS-CP consists of three types of Virtual Machines (VM) of CTRL-VM which is responsible for expansion management, BRAS-VM which is responsible for BRAS service and FWD-VM which is responsible for forwarding. And the user uniformly carries out configuration management on the BRAS-VM and the FWD-VM through the CTRL-VM.
Since the CTRL-VM is located in a centralized management position, it needs to manage its own configuration, and also needs to manage the configurations on the BRAS-VM, FWD-VM and UP in a CP pool uniformly, in one CP pool, there is only one group of CTRL-VM, while the BRAS-VM can be expanded to a maximum of 64 groups, UP can manage 1024, when the number of BRAS-VM and UP increases, the corresponding configurations also increase, and for the CTRL-VM responsible for unified configuration management, the configuration to be managed also becomes huge.
In an actual application scene, the switching separation generally adopts networking of CP disaster recovery, which is a remote disaster recovery technology applied to forwarding and control separation networking. The dual-machine backup is carried out between two CPs which belong to different DCs, so that the situation that backup data are lost due to irresistance of earthquakes, fires and the like can be effectively treated, and the purpose of disaster recovery in different places is achieved. However, the problem of configuration maintenance is also brought about under the networking, and the disaster backup master CP and the disaster backup CP respectively manage the respective data centers DC, but need to synchronize user table entry information. In principle, the configuration of the active-standby CPs needs to be kept consistent, but in reality, the configuration of the active-standby CPs is respectively completed through respective CTRL-VMs, and the configuration of the respective CTRL-VMs in the active-standby CPs has no synchronization mechanism, so that the consistency of the configuration can be ensured only through manual work; however, the configuration is required to be changed frequently according to actual requirements, and when the configuration of one side CP is changed and the configuration of the other side CP is not updated in a timely synchronous manner, the configuration of two sides is inconsistent, which may cause some problems. And as the configuration becomes bulky, readability becomes poor, causing difficulty in finding something, or in troubleshooting the configuration, either missing or incorrect.
At present, in the CP disaster backup environment, there is no mechanism for configuration synchronization between the master CP and the backup CP, but the requirement of configuration synchronization widely exists in network systems, such as in a control transfer separation system, the synchronization and smoothness of configuration between the CP and UP, between the CTRL-VM and BRAS-VM, and between the CTRL-VM and FWD-VM are all completed through the netcon protocol. But the netcon protocol is not suitable for configuration synchronization between disaster recovery CPs. Because the requirement of configuration synchronization between disaster recovery CPs is not proper, NETCONF is only suitable for unidirectional issuing configuration of servers to clients, in the CP system, CTRL-VM is used as NETCONF server to issue configuration to BRAS-VM, FWD-VM, UP and other clients, and the role and the configuration synchronization direction are clear. However, in the disaster recovery backup networking, the configuration of the disaster recovery backup and the disaster recovery backup is likely to change, that is, the need of primary-backup synchronization exists, the need of backup-backup synchronization exists, and either one of the primary and backup is unsuitable as a client or a server. And the CTRL-VM contains all the configurations, so that the data volume in the synchronization process is large, and the heartbeat channel between disaster recovery devices is likely to be affected.
Therefore, how to implement synchronization of configuration between a primary CP and a backup CP in a CP disaster backup environment is one of the technical problems to be considered.
Disclosure of Invention
In view of this, the present application provides a configuration synchronization method and apparatus, which are used to implement synchronization of configuration between a primary CP and a backup CP in a CP disaster backup environment.
Specifically, the application is realized by the following technical scheme:
according to a first aspect of the present application, there is provided a configuration synchronization method applied in a first control plane, the method comprising:
when the first set time arrives, carrying out normalization processing on the current local configuration to obtain a first configuration file;
the first configuration file is sent to a second control plane through a file transmission channel;
receiving a second configuration file which is sent by the second control plane through the file transmission channel and is obtained after the normalization processing of the local configuration of the second control plane;
generating a differential configuration file according to the first configuration file and the second configuration file;
and updating the local configuration in the first control plane according to the differential configuration file.
According to a second aspect of the present application, there is provided a configuration synchronization apparatus, arranged in a first control plane, the apparatus comprising:
the normalization processing module is used for performing normalization processing on the current local configuration when the first set time arrives to obtain a first configuration file;
the sending module is used for sending the first configuration file to a second control plane through a file transmission channel;
the receiving module is used for receiving a second configuration file which is sent by the second control plane through the file transmission channel and is obtained after the normalization processing of the local configuration of the second control plane;
the generating module is used for generating a differential configuration file according to the first configuration file and the second configuration file;
and the updating module is used for updating the local configuration in the first control plane according to the differential configuration file.
The beneficial effects of the embodiment of the application are that:
in the configuration synchronization method and device provided by the embodiment of the application, when the first CP arrives at the first set time, the first CP performs normalization processing on the current local configuration to obtain a first configuration file; transmitting the first configuration file to a second control plane through a file transmission channel; receiving a second configuration file which is sent by a second control plane through the file transmission channel and is obtained after the normalization processing of the local configuration of the second control plane; generating a differential configuration file according to the first configuration file and the second configuration file; and updating the local configuration in the first control plane according to the differentiated configuration file. By adopting the method, the self configuration file is transmitted between the first CP and the second CP through the file transmission channel, so that the synchronization of the configuration between the first CP and the second CP is realized; in addition, when configuration updating is carried out, a differential configuration file is generated based on the respective configuration file, and then the local configuration of each of the first CP and the second CP is updated based on the differential configuration file, so that the quick synchronization processing of the configuration can be realized; in addition, in order to reduce the transmission load, the local configuration is normalized before being transmitted, so that a smaller configuration file is obtained, the transmission pressure of a file transmission channel can be reduced, and the transmission rate of the configuration file is improved.
Drawings
Fig. 1 is a schematic flow chart of a configuration synchronization method provided in an embodiment of the present application;
FIG. 2 is a flow chart of another configuration synchronization method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a configuration synchronization device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with aspects as described herein.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the corresponding listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The configuration synchronization method provided in the present application is described in detail below.
Referring to fig. 1, fig. 1 is a flowchart of a configuration synchronization method provided in the present application, where the method may be applied to a first control plane CP, and the first CP may be a primary CP or a standby CP, and correspondingly, a second control plane CP may also be a primary CP or a standby CP. When the first CP is a main CP, the second CP is a standby CP; and when the first CP is a standby CP, the second CP is a primary CP. In addition, the first control plane and the second control plane may be respectively disposed in two network devices. When the first CP is implementing the above method, the method may include the following steps:
s101, when a first set time arrives, carrying out normalization processing on the current local configuration to obtain a first configuration file.
In this step, since the present application is to realize synchronization of the configuration between the first CP and the second CP, the first CP may be involved in transmitting the configuration of the local end to the second CP, and considering that the configuration to be synchronized may be huge, in order to improve the transmission efficiency and synchronization efficiency of the configuration, in this embodiment, it is proposed that the first CP normalizes the current local configuration, so as to reduce the transmission resource overhead when transmitting the obtained first configuration file, and simultaneously enable the second CP to improve the synchronization efficiency when locally synchronizing based on the received first configuration file.
In addition, the configuration on the first CP and the second CP will not always be updated in general, because in this embodiment, a timer 1 is started in the first CP, and the local configuration of the first CP is periodically synchronized to the second CP according to the method provided in the present application; similarly, a timer 1 is also set in the second CP, so that the second CP synchronizes the local configuration in the second CP to the first CP. Therefore, the first CP determines whether the first setting time set by the timer 1 arrives, and when the first setting time arrives, the current local configuration of the first CP is obtained, and then the obtained local configuration is normalized, so as to obtain the first configuration file. Similarly, the second CP may determine whether the first set time set by the timer 1 arrives, and when the first set time arrives, acquire the current local configuration of the second CP, and then normalize the acquired local configuration, so as to obtain the second configuration file.
When the first set time set by the timer 1 is reached, the timer 1 is restarted to perform the synchronization of the configuration next time. In addition, what value the first setting time specifically sets may be determined according to the actual situation.
Alternatively, when the configuration synchronization method provided in the present embodiment is executed, the method may be implemented by the virtual machine CTRL-VM responsible for control management in the first CP.
S102, the first configuration file is sent to a second control plane through a file transmission channel.
In this step, in order to achieve synchronization of the respective configurations between the first CP and the second CP, a file transmission channel is pre-established between the first CP and the second CP. The file transmission channel is bidirectional, so that the normal transmission of the respectively generated configuration files between two CPs can be ensured.
Optionally, before executing the step, it may be first confirmed whether a file transmission channel is established with the second CP, and step S102 is executed when the file transmission channel is established; if the file transmission channel is not established, the file transmission channel is established with the second CP, and step S102 is executed after the file transmission channel is successfully established.
S103, receiving a second configuration file which is sent by the second control plane through the file transmission channel and obtained after normalization processing is carried out on the local configuration of the second control plane.
In this step, since the second CP also performs configuration synchronization on the second CP according to the configuration synchronization method provided in the present application, the first CP receives the second configuration file sent by the second CP through the file transmission channel. The first CP may generally continuously detect whether the second configuration file transmitted by the second CP is received when the second configuration file transmitted by the second CP is received.
Alternatively, step S103 may be performed according to the following procedure: and when the second set time is reached, receiving a second configuration file which is sent by the second control plane through the file transmission channel and is obtained after the normalization processing of the local configuration of the second control plane.
Specifically, the first CP is mainly used for controlling and managing the user of the network where the first CP is located, so in order to avoid larger resource overhead caused by configuration synchronization, the embodiment proposes that the first CP may not always detect whether a second configuration file sent by a second CP plane through a file transmission channel is received, but may set a timer 2 in the first CP, set a second set time for the timer 2, and then detect whether the second configuration file synchronized by the second CP is received when the set time reaches the second set time, and acquire the second configuration file when the second configuration file is detected; and when not detected, the timer 2 is restarted to wait for the next detection. In addition, what value the first setting time specifically sets may be determined according to the actual situation.
S104, generating a differential configuration file according to the first configuration file and the second configuration file.
In this step, the first CP may compare the first configuration file with the second configuration file, and then parse the first configuration file according to a set rule to generate a differential configuration file, so that the obtained differential configuration file may include a local configuration with the first CP in the local configuration of the second CP.
S105, updating the local configuration in the first control plane according to the differential configuration file.
In this step, after the first CP generates the differential configuration file, the local configuration may be updated based on the differential configuration file, so that configuration synchronization between the first CP and the second CP is achieved.
In addition, after the local configuration of the first CP is updated with the current differential configuration file, the differential configuration file may be deleted for synchronization of the next configuration.
By implementing the synchronous configuration method provided by the application, when the first CP arrives at the first set time, the current local configuration is normalized to obtain a first configuration file; transmitting the first configuration file to a second control plane through a file transmission channel; receiving a second configuration file which is sent by a second control plane through the file transmission channel and is obtained after the normalization processing of the local configuration of the second control plane; generating a differential configuration file according to the first configuration file and the second configuration file; and updating the local configuration in the first control plane according to the differentiated configuration file. By adopting the method, the self configuration file is transmitted between the first CP and the second CP through the file transmission channel, so that the synchronization of the configuration between the first CP and the second CP is realized; in addition, when configuration updating is carried out, a differential configuration file is generated based on the respective configuration file, and then the local configuration of each of the first CP and the second CP is updated based on the differential configuration file, so that the quick synchronization processing of the configuration can be realized; in addition, in order to reduce the transmission load, the local configuration is normalized before being transmitted, so that a smaller configuration file is obtained, the transmission pressure of a file transmission channel can be reduced, and the transmission rate of the configuration file is improved.
Alternatively, based on any of the above embodiments, step S101 may be performed according to the following method in this embodiment: when the serial numbers of the configuration information included in the same type are continuous, merging the configuration information with continuous serial numbers to obtain target configuration information; when the configuration information of the type has the configuration information with discontinuous numbers, the discontinuous configuration information is kept unchanged; and generating a first configuration file according to the target configuration information and/or the discontinuous configuration information.
Specifically, since the local configuration of the first CP may include each type of configuration information, and each type may also correspond to a plurality of pieces of configuration information, in order to reduce the file size of the generated first configuration file, each piece of configuration information of each type may be targeted at, and if each piece of configuration information of the type is continuous configuration information, the combination processing is performed on each piece of configuration information to obtain a piece of marked configuration information; a first configuration file is then generated based on the target configuration information. In this way, the file size of the first configuration file is reduced.
When each piece of configuration information of the type has the configuration information with continuous numbers, the configuration information with continuous numbers is combined to obtain one piece of label configuration information; then, if discontinuous configuration information exists for the rest of the configuration information in the type, the configuration information is kept unchanged. A first configuration file is then generated based on the target configuration information and the discontinuous configuration information. In this way, the file size of the first configuration file is reduced.
When each piece of configuration information of this type is discontinuous, then other types of configuration information may be traversed. In general, configuration information with continuous numbers exists in each type of configuration information, so that the file size of the first configuration file can be reduced to a certain extent by executing the normalization configuration method provided by the embodiment.
Similarly, the method of generating the second configuration file by the second CP is similar to the method of generating the first configuration file by the first CP, and will not be described in detail here.
It is noted that, when the configuration information with consecutive numbers is subjected to the merging process, the merged target configuration information includes a number range of consecutive numbers, which is composed of the minimum number and the maximum number of consecutive numbers.
It should be noted that, in the local configuration of the first CP, the configuration amount is larger and the redundant configuration is generally concentrated on two types of remote online interfaces and up-backup-profile views, so, in order to better understand the normalization configuration method of the present embodiment, an example is taken as an example of the type of up-backup-profile view, for example, the original configuration under the view type is as follows:
up-backup-profile 1hot-standby
backup-group master Remote-Vsi1036/1001backup Remote-Vsi1037/1001vrid 100resource-id 1
backup-group master Remote-Vsi1036/1002backup Remote-Vsi1037/1002vrid 100resource-id 2
backup-group master Remote-Vsi1036/1003backup Remote-Vsi1037/1003vrid 100resource-id 3
……
backup-group master Remote-Vsi1036/2000backup Remote-Vsi1037/2000vrid 100resource-id 1000
the numbers of the configuration information can be interface numbers and resource-ids, and the interface numbers are continuous numbers from 1001 to 2000, the resource-ids are continuous numbers from 1 to 1000, and the numbers are all regularly increased, so that the 1000 configuration information can be combined, and the obtained target configuration information is as follows:
up-backup-profile 1hot-standby
backup-group master Remote-Vsi1036/1001~2000backup Remote-Vsi1037/1001~2000vrid 100resource-id 1~1000
if there is a piece of discontinuous configuration information, the configuration information is retained as follows:
up-backup-profile 1hot-standby
backup-group master Remote-Vsi1036/1001~2000backup Remote-Vsi1037/1001~2000vrid 100resource-id 1~1000
backup-group master Remote-Vsi1036/2003backup Remote-Vsi1037/2003vrid 100resource-id 1003
optionally, based on any of the foregoing embodiments, step S104 may also be performed according to the following method in this embodiment: when the first control plane is the main control plane, if the first configuration information of the target object included in the first configuration file is inconsistent with the second configuration information of the target object included in the second configuration file, when a differential configuration file is generated, the differential configuration file does not include the first configuration information and the second configuration information;
when the first control plane is the standby control plane, if the first configuration information of the target object included in the first configuration file is inconsistent with the second configuration information of the target object included in the second configuration file, generating a differential configuration file according to the second configuration information.
Specifically, in practical applications, there may be a case where the configuration information of the object in the first CP is inconsistent with the configuration information of the object in the second CP for the same object, so in order to achieve synchronization of the configuration between the first CP and the second CP, the present embodiment proposes that in this case, the configuration in the master CP is set as a criterion. That is, when the first CP is the primary CP and the second CP is the secondary CP, if the first configuration information of the target object in the primary CP is inconsistent with the second configuration information of the target object in the secondary CP, when the differential configuration file is generated, the first CP is the primary CP, so that the generated differential configuration file does not include the first configuration information of the target object in the primary CP and the second configuration information of the target object in the secondary CP, so as to realize that the configuration information of the primary CP is in order in this case; similarly, if the first CP is a standby CP, when the first CP generates the differential configuration file, the differential configuration file needs to be generated based on the second configuration information of the target object in the second CP (main CP), so as to realize that the configuration information of the main CP is in control in this case.
In order to better understand the above-mentioned differentiated configuration file generation method, a target object may be taken as an example to describe a certain interface, and if the configuration of the interface under the primary CP is inconsistent with the configuration of the interface under the standby CP, the configuration of the interface under the primary CP is used as the standard when the differentiated configuration file is generated. For example, an interface has an interface configuration on the primary CP as follows:
interface Remote-Vsi1040/1.1
vlan-type dot1q vid 301second-dot1q 1
ip subscriber l2-connected enable
ip subscriber dhcp domain voip
ip subscriber initiator unclassified-ip enable matching-user
undo ip subscriber user-detect
the interface has the following interface configuration on the standby CP:
interface Remote-Vsi1040/1.1
vlan-type dot1q vid 301second-dot1q 1
ip subscriber l2-connected enable
ip subscriber dhcp domain voip
ip subscriber initiator unclassified-ip enable
it can be known that the primary CP does not have the configuration of the Remote-Vsi1040/1.1 interface, that is, the configuration information of the interface on the primary CP and the secondary CP are different, so in this embodiment, when the differential configuration file is generated, the differential configuration file generated on the primary CP side does not include the configuration information of the interface, and the differential configuration file generated on the secondary CP side includes the configuration information of the interface in the primary CP. The differentiated configuration file generated by the standby CP side includes the following contents:
interface Remote-Vsi1040/1.1
ip subscriber initiator unclassified-ip enable matching-user
undo ip subscriber user-detect
alternatively, based on any of the above embodiments, the present embodiment proposes that step S104 may also be performed according to the following method: comparing the first configuration file with the second configuration file; if the first configuration file comprises the configuration information of the newly added first object and/or the second configuration file comprises the configuration information of the newly added second object, the configuration information of the first object or the second object is reserved in the differential configuration file.
Specifically, in practical application, there may be a case where the configurations in the primary CP and the standby CP are inconsistent due to missing some configurations when the maintainer performs the allocation configuration on the primary CP and the standby CP, so for this case, the embodiment proposes that, when the first configuration file and the second configuration file are compared,
if the configuration information of a certain object which is not included in the second configuration file is found to be the configuration information of the first object, and the second configuration file does not have the configuration information of a new object, the configuration information of the first object does not need to be reserved in the differential configuration file when the first CP generates the differential configuration file, but the configuration information of the first object needs to be reserved when the second CP generates the differential configuration file; similarly, if the second configuration file includes the configuration information of a certain object that is not included in the first configuration file, that is, the configuration information of the second object, then when the first CP generates the differential configuration file, the configuration information of the second object is reserved in the differential configuration file, and at this time, the differential configuration file generated by the second CP does not need to reserve the configuration information of the second object. Similarly, if the first configuration file includes the configuration information of the first object and the second configuration file includes the configuration information of the second object, then the first CP will save the configuration information of the second object in the differential configuration file at this time, and the second CP will save the configuration information of the first object in the differential configuration file when generating the differential configuration file.
To better understand the present embodiment, the following configuration information of the view up-backup-profile 21 may be included in the first configuration file of the first CP, but the configuration information of the up-backup-profile 22 is not included:
up-backup-profile 21warm-standby
failure-recovery-switch enable delay 60
backup route-advertise master-cost 50backup-cost 100
backup-interface Remote-Vsi1044/1
master-interface Remote-Vsi1040/1vrid 21
and the second configuration file of the second CP includes the following configuration information of the up-backup-profile 22, but does not include the configuration information of the up-backup-profile 21:
up-backup-profile 22warm-standby
failure-recovery-switch enable delay 60
backup route-advertise master-cost 50backup-cost 100
backup-interface Remote-Vsi1044/2
master-interface Remote-Vsi1040/2vrid 22
on this basis, when the first CP generates a differential configuration file, all configuration information in the up-backup-profile 22 view is required to be contained; similarly, when the second CP generates the differential configuration file, the second CP needs to include all configuration information in the up-backup-profile 21 view, thereby realizing all synchronization of configuration between the active and standby CPs.
When the first CP or the second CP generates the differential configuration file based on the first configuration file and the second configuration file, the normalized configuration of the difference may be obtained first, and then the normalized configuration may be parsed into the configuration capable of buildrun and the generated file, so as to obtain the differential configuration file.
In addition, in any embodiment of the present application, the first configuration file and the differential configuration file obtained by normalizing the first CP may be named uniformly, and the naming of the first CP and the second CP may be distinguished, but may not be renamed with the existing configuration file. In addition, the rule for generating the normalized configuration is consistent for the primary and backup CPs of the disaster recovery.
It should be noted that, when the differential file is generated, some abnormal situations may occur, for example, disaster recovery and backup switching is caused by a failure of the primary CP, after the disaster recovery and backup switching, the roles of the primary CP and the backup CP are exchanged, and the whole configuration synchronization process is unchanged, but only needs to be implemented according to the differential configuration file generating method corresponding to the roles when the differential configuration file is generated by processing the normalized configuration.
Optionally, based on any one of the foregoing embodiments, the configuration synchronization method provided in this embodiment may further include the following flow:
when the first control plane is a standby control plane and the second control plane is a main control plane, before the first configuration file is sent to the second control plane through the file transmission channel, when the second control plane is confirmed to be faulty, the first control plane is switched to the main control plane, and the file transmission channel between the first control plane and the second control plane is confirmed to be normal.
Specifically, if the first set time of the timer 1 arrives, but the second set time of the timer 2 has not arrived, the configuration on the master CP or the standby CP is changed, and meanwhile, the master CP fails, which causes that the configuration between the master CP and the standby CP cannot be kept consistent, in order to ensure the normal synchronization of the configuration, in this embodiment, it is proposed that, since the standby CP is switched to the master CP at this time, the implementation of the configuration synchronization method according to this embodiment is only needed to be continued, that is, the flow of normalized configuration generation, configuration transmission, configuration analysis, configuration comparison and configuration transmission is operated, but because the original master CP fails, the step of configuration transmission cannot be completed, in this embodiment, before the first configuration file is transmitted through the file transmission channel, the file transmission channel between the master CP and the standby CP is confirmed to be normal, and then the transmission of the configuration file is performed; if the file transmission channel is confirmed to be abnormal, the configuration transmission flow is terminated to wait for the next configuration synchronization implementation.
Optionally, based on any one of the foregoing embodiments, the configuration synchronization method provided in this embodiment may further include the following flow: before the first configuration file is sent to the second control plane through the file transmission channel, when the first control plane is switched from the main control plane to the standby control plane, the file transmission channel is built with the second control plane again.
Specifically, after the failure of the primary CP is recovered, the primary CP may be reduced to the standby CP, in order to ensure the synchronization of the configuration, in this embodiment, the standby CP may re-establish a file transmission channel with the primary CP, and then restart the timing device, and when the first set time arrives, execute the configuration synchronization method provided in any embodiment of the present application, so that the configuration between the primary CP and the standby CP is kept consistent again.
For better understanding of the configuration synchronization method provided in the present application, a configuration synchronization flow schematic diagram shown in fig. 2 is taken as an example to describe. Firstly, a disaster backup master CP1 and a backup CP2 are normally started, the disaster backup master CP1 and the disaster backup CP2 can normally communicate, and then a bidirectional file transmission channel is established between the master CP2 and the backup CP2. Secondly, starting a timer 1 on the master CP1, normalizing the local configuration of the master CP1 into a first configuration file cp1.cfg according to any normalization method provided by the application above when the set time of the timer 1 arrives, and then sending the first configuration file cp1.cfg to the standby CP2 through a file transmission channel. In addition, a timer 1 is also arranged on the standby CP2, and when the set time set by the timer arrives, the local configuration of the standby CP2 is normalized into a second configuration file cp2.cfg according to a normalization method adopted by the standby CP1, and meanwhile, the second configuration file cp2.cfg is sent to the standby CP1 through a file transmission channel.
For the master CP1, a timer 2 may be set on the master CP1, and then the master CP1 is used for detecting whether cp2.cfg sent by the slave CP2 is received when the second set time set by the timer 2 arrives, that is, detecting whether cp2.cfg locally cached by the master CP1 is updated, restarting the timer 2, waiting when the cp2 is not updated, and executing the detection process again when the second set time of the timer 2 arrives; when there is an update, the master CP1 compares cp1.cfg with cp2.cfg, analyzes the configuration of the normalized difference obtained by the comparison, and then generates a differential configuration file x1.cfg on the master CP1 side according to the differential file generation method related to the corresponding embodiment. Finally, the master CP1 refreshes the content of the differential configuration file x1.Cfg to the local configuration currently stored by the master CP1, and simultaneously deletes the differential configuration file x1.Cfg.
For the standby CP2, a timer 2 may be set on the standby CP2, and then the standby CP2 is used for detecting whether cp1.cfg sent by the main CP1 is received when a second set time set by the timer 2 is reached, that is, detecting whether cp1.cfg locally cached by the standby CP2 is updated, and restarting the timer 2; waiting when the second set time of the waiting timer 2 is up, and executing the detection process again; and when the update exists, the standby CP2 compares cp1.cfg with cp2.cfg, analyzes the normalized difference configuration obtained by comparison, and then generates a differential configuration file x2.cfg on the standby CP2 side according to the differential file generation method related to the corresponding embodiment. Finally, the standby CP2 refreshes the content of the differential configuration file x2.cfg to the local configuration currently stored by the standby CP2, and simultaneously deletes the differential configuration file x2.cfg.
Based on the same inventive concept, the application also provides a configuration synchronization device corresponding to the configuration synchronization method. The implementation of the configuration synchronization device may refer specifically to the above description of the configuration synchronization method, and will not be discussed here.
Referring to fig. 3, fig. 3 is a configuration synchronization device provided in an exemplary embodiment of the present application, and disposed in a first control plane, the device includes:
the normalization processing module 301 is configured to perform normalization processing on the current local configuration when the first set time arrives, so as to obtain a first configuration file;
a sending module 302, configured to send the first configuration file to a second control plane through a file transmission channel;
a receiving module 303, configured to receive a second configuration file obtained by normalizing the local configuration of the second configuration file sent by the second control plane through the file transmission channel;
a generating module 304, configured to generate a differential configuration file according to the first configuration file and the second configuration file;
and the updating module 305 is configured to update the local configuration in the first control plane according to the differential configuration file.
Optionally, based on the foregoing embodiment, the normalization processing module 301 in this embodiment is specifically configured to, when numbers of pieces of configuration information included in a same type are consecutive, perform merging processing on the configuration information with consecutive numbers to obtain target configuration information; when the configuration information of the type has the configuration information with discontinuous numbers, the discontinuous configuration information is kept unchanged; and generating a first configuration file according to the target configuration information and/or the discontinuous configuration information.
Optionally, based on any of the foregoing embodiments, the generating module 304 in this embodiment is specifically configured to:
when the first control plane is the main control plane, if the first configuration information of the target object included in the first configuration file is inconsistent with the second configuration information of the target object included in the second configuration file, when a differential configuration file is generated, the differential configuration file does not include the first configuration information and the second configuration information;
when the first control plane is the standby control plane, if the first configuration information of the target object included in the first configuration file is inconsistent with the second configuration information of the target object included in the second configuration file, generating a differential configuration file according to the second configuration information.
Optionally, based on any one of the foregoing embodiments, the generating module in this embodiment is specifically configured to compare the first configuration file with the second configuration file; and if the first configuration file comprises the configuration information of the newly added first object and/or the second configuration file comprises the configuration information of the newly added second object, the configuration information of the first object or the second object is reserved in the differentiated configuration file.
Optionally, based on any one of the foregoing embodiments, the configuration synchronization device provided in this embodiment may further include:
and a confirmation module (not shown in the figure) configured to confirm that, when the first control plane is the standby control plane and the second control plane is the main control plane, the file transmission channel between the first control plane and the second control plane is normal when the first control plane is switched to the main control plane when the second control plane is confirmed to be faulty before the sending module 302 sends the first configuration file to the second control plane through the file transmission channel.
Optionally, based on any one of the foregoing embodiments, the configuration synchronization device provided in this embodiment may further include:
a setting module (not shown in the figure) configured to re-set up a file transmission channel with the second control plane when the first control plane is switched from the main control plane to the standby control plane before the sending module 302 sends the first configuration file to the second control plane through the file transmission channel.
By providing the configuration synchronization device provided by any one of the embodiments, the configuration file is transmitted between the first CP and the second CP through the file transmission channel, so that synchronization of configuration between the first CP and the second CP is realized; in addition, when configuration updating is carried out, a differential configuration file is generated based on the respective configuration file, and then the local configuration of each of the first CP and the second CP is updated based on the differential configuration file, so that the quick synchronization processing of the configuration can be realized; in addition, in order to reduce the transmission load, the local configuration is normalized before being transmitted, so that a smaller configuration file is obtained, the transmission pressure of a file transmission channel can be reduced, and the transmission rate of the configuration file is improved.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The implementation process of the functions and roles of each unit/module in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be repeated here.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The above described apparatus embodiments are merely illustrative, wherein the units/modules illustrated as separate components may or may not be physically separate, and the components shown as units/modules may or may not be physical units/modules, i.e. may be located in one place, or may be distributed over a plurality of network units/modules. Some or all of the units/modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (13)

1. A method of configuration synchronization, for use in a first control plane, the method comprising:
when the first set time arrives, carrying out normalization processing on the current local configuration to obtain a first configuration file;
the first configuration file is sent to a second control plane through a file transmission channel;
receiving a second configuration file which is sent by the second control plane through the file transmission channel and is obtained after the normalization processing of the local configuration of the second control plane;
generating a differential configuration file according to the first configuration file and the second configuration file;
and updating the local configuration in the first control plane according to the differential configuration file.
2. The method of claim 1, wherein normalizing the current local configuration to obtain a first configuration file comprises:
when the serial numbers of the configuration information included in the same type are continuous, merging the configuration information with continuous serial numbers to obtain target configuration information;
when the configuration information of the type has the configuration information with discontinuous numbers, the discontinuous configuration information is kept unchanged;
and generating a first configuration file according to the target configuration information and/or the discontinuous configuration information.
3. The method of claim 1, wherein generating a differential profile from the first profile and the second profile comprises:
when the first control plane is the main control plane, if the first configuration information of the target object included in the first configuration file is inconsistent with the second configuration information of the target object included in the second configuration file, when a differential configuration file is generated, the differential configuration file does not include the first configuration information and the second configuration information;
when the first control plane is the standby control plane, if the first configuration information of the target object included in the first configuration file is inconsistent with the second configuration information of the target object included in the second configuration file, generating a differential configuration file according to the second configuration information.
4. The method of claim 1, wherein generating a differential profile from the first profile and the second profile comprises:
comparing the first configuration file with the second configuration file;
and if the first configuration file comprises the configuration information of the newly added first object and/or the second configuration file comprises the configuration information of the newly added second object, the configuration information of the first object or the second object is reserved in the differentiated configuration file.
5. The method of claim 1, wherein receiving the second configuration file sent by the second control plane through the file transmission channel and obtained by normalizing the local configuration thereof includes:
and when the second set time is reached, receiving a second configuration file which is sent by the second control plane through the file transmission channel and is obtained after the normalization processing of the local configuration of the second control plane.
6. The method of claim 1, wherein when the first control plane is a standby control plane and the second control plane is a main control plane, before sending the first configuration file to the second control plane through a file transfer channel, further comprising:
when the second control plane is confirmed to be faulty, the first control plane is switched to the main control plane, and the file transmission channel between the first control plane and the second control plane is confirmed to be normal.
7. The method of claim 1, further comprising, prior to transmitting the first configuration file to a second control plane via a file transfer channel:
when the first control plane is switched from the main control plane to the standby control plane, the file transmission channel is established with the second control plane again.
8. A configuration synchronization device, disposed in a first control plane, the device comprising:
the normalization processing module is used for performing normalization processing on the current local configuration when the first set time arrives to obtain a first configuration file;
the sending module is used for sending the first configuration file to a second control plane through a file transmission channel;
the receiving module is used for receiving a second configuration file which is sent by the second control plane through the file transmission channel and is obtained after the normalization processing of the local configuration of the second control plane;
the generating module is used for generating a differential configuration file according to the first configuration file and the second configuration file;
and the updating module is used for updating the local configuration in the first control plane according to the differential configuration file.
9. The apparatus of claim 8, wherein the device comprises a plurality of sensors,
the normalization processing module is specifically configured to, when numbers of pieces of configuration information included in the same type are continuous, combine the configuration information with continuous numbers to obtain target configuration information; when the configuration information of the type has the configuration information with discontinuous numbers, the discontinuous configuration information is kept unchanged; and generating a first configuration file according to the target configuration information and/or the discontinuous configuration information.
10. The apparatus of claim 8, wherein the generating module is specifically configured to:
when the first control plane is the main control plane, if the first configuration information of the target object included in the first configuration file is inconsistent with the second configuration information of the target object included in the second configuration file, when a differential configuration file is generated, the differential configuration file does not include the first configuration information and the second configuration information;
when the first control plane is the standby control plane, if the first configuration information of the target object included in the first configuration file is inconsistent with the second configuration information of the target object included in the second configuration file, generating a differential configuration file according to the second configuration information.
11. The apparatus of claim 8, wherein the device comprises a plurality of sensors,
the generating module is specifically configured to compare the first configuration file with the second configuration file; and if the first configuration file comprises the configuration information of the newly added first object and/or the second configuration file comprises the configuration information of the newly added second object, the configuration information of the first object or the second object is reserved in the differentiated configuration file.
12. The apparatus of claim 8, wherein the apparatus further comprises:
and the confirmation module is used for confirming that the file transmission channel between the first control plane and the second control plane is normal when the first control plane is switched to the main control plane when confirming that the second control plane fails before the sending module sends the first configuration file to the second control plane through the file transmission channel when the first control plane is the standby control plane and the second control plane is the main control plane.
13. The apparatus of claim 8, wherein the apparatus further comprises:
the establishing module is used for establishing the file transmission channel with the second control plane again when the first control plane is switched from the main control plane to the standby control plane before the sending module sends the first configuration file to the second control plane through the file transmission channel.
CN202310141588.1A 2023-02-13 2023-02-13 Configuration synchronization method and device Pending CN116055314A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310141588.1A CN116055314A (en) 2023-02-13 2023-02-13 Configuration synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310141588.1A CN116055314A (en) 2023-02-13 2023-02-13 Configuration synchronization method and device

Publications (1)

Publication Number Publication Date
CN116055314A true CN116055314A (en) 2023-05-02

Family

ID=86129722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310141588.1A Pending CN116055314A (en) 2023-02-13 2023-02-13 Configuration synchronization method and device

Country Status (1)

Country Link
CN (1) CN116055314A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116760703A (en) * 2023-08-16 2023-09-15 新华三技术有限公司 Configuration smoothing method, system, device and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116760703A (en) * 2023-08-16 2023-09-15 新华三技术有限公司 Configuration smoothing method, system, device and readable storage medium
CN116760703B (en) * 2023-08-16 2023-11-21 新华三技术有限公司 Configuration smoothing method, system, device and readable storage medium

Similar Documents

Publication Publication Date Title
CN103744809B (en) Vehicle information management system double hot standby method based on VRRP
US11307943B2 (en) Disaster recovery deployment method, apparatus, and system
US8103635B2 (en) Reinstatement of database system in an automatic failover configuration
US7627584B2 (en) Database system configured for automatic failover with no data loss
CN105471622B (en) A kind of high availability method and system of the control node active-standby switch based on Galera
WO2017067484A1 (en) Virtualization data center scheduling system and method
CN104935672A (en) High available realizing method and equipment of load balancing service
WO2012174893A1 (en) Dual-center disaster recovery-based switching method and device in iptv system
CN103036719A (en) Cross-regional service disaster method and device based on main cluster servers
CN102523118A (en) Redundancy control system consisting of multiple control computers in local area network and method for redundancy control system
CN116055314A (en) Configuration synchronization method and device
CN111314098A (en) Method and device for realizing VIP address drift in HA system
WO2022037359A1 (en) Configuration data access method, apparatus, and device, configuration center, and storage medium
CN110213359B (en) Internet of vehicles networking data pushing system and method based on D2D
CN105933379A (en) Business processing method, device and system
JP7161008B2 (en) Application redundancy management system and application redundancy management method
CN114297296A (en) Server active-standby switching system for broadcasting
WO2014032532A1 (en) Enum-dns disaster recovery method and system in ims network
CN111083074A (en) High availability method and system for main and standby dual OSPF state machines
CN110661651A (en) SDN controller data management method, system, device and readable storage medium
CN102983997A (en) Method and device for migrating master services
CN114125827B (en) Terminal management method, device and centralized management system
CN112615751B (en) Main-standby switching hot backup method and device based on routing protocol
Cisco Understanding Replication
WO2016177211A1 (en) Address resolution protocol (arp) table entry synchronization method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination