CN112217656B - Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system - Google Patents

Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system Download PDF

Info

Publication number
CN112217656B
CN112217656B CN201910625186.2A CN201910625186A CN112217656B CN 112217656 B CN112217656 B CN 112217656B CN 201910625186 A CN201910625186 A CN 201910625186A CN 112217656 B CN112217656 B CN 112217656B
Authority
CN
China
Prior art keywords
configuration
tree
configuration information
configurations
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.)
Active
Application number
CN201910625186.2A
Other languages
Chinese (zh)
Other versions
CN112217656A (en
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.)
Qax Technology Group Inc
Secworld Information Technology Beijing Co Ltd
Original Assignee
Qax Technology Group Inc
Secworld Information Technology Beijing 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 Qax Technology Group Inc, Secworld Information Technology Beijing Co Ltd filed Critical Qax Technology Group Inc
Priority to CN201910625186.2A priority Critical patent/CN112217656B/en
Publication of CN112217656A publication Critical patent/CN112217656A/en
Application granted granted Critical
Publication of CN112217656B publication Critical patent/CN112217656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method and a device for synchronizing configuration information of network equipment in an SD-WAN system. The method comprises the following steps: acquiring configuration information of network equipment stored in a configuration database to obtain first configuration information, wherein the configuration information comprises a plurality of configurations, and each configuration comprises a plurality of configuration items; generating a first configuration tree by the first configuration information according to the reference relation among the configurations; acquiring configuration information in a configuration file of the network equipment to obtain second configuration information; generating a second configuration tree by the second configuration information according to the reference relation among the configurations; obtaining difference configuration information by comparing all nodes of the first configuration tree and the second configuration tree; and issuing the difference configuration information to the network equipment. By the method and the device, the synchronization of the difference configuration can be realized.

Description

Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for synchronizing configuration information of a network device in an SD-WAN system.
Background
Software-defined wide area network (SD-WAN) is a service formed by applying SD-WAN technology to a wide area network scenario, and is used to connect enterprise networks, data centers, internet applications, and cloud services in a wide geographic range. The SD-WAN can separate a control plane and a data plane of the network equipment, so that the control plane can operate as an upper layer independent application and communicates with a lower layer data plane through a standardized interface protocol, thereby realizing flexible control on network flow and providing a good platform for innovation of a network architecture and an upper layer application.
In the operation process of the SD-WAN system, a management and control platform needs to perform centralized management and control on a plurality of network devices in the whole wide area network. In the process of centralized management and control of each network device, configuration information issuing/synchronization operation needs to be frequently performed. When the service of a certain network device in the SD-WAN system is changed, the changed service configuration information needs to be pushed to the network device in a very short time, so that the service can operate normally.
In the prior art, after a service of a certain network device in the SD-WAN system is changed, the management and control platform generally issues the configuration information of the whole network device to the network device again for configuration, which takes a long time and affects normal operation of the service.
Therefore, providing a method and an apparatus for synchronizing configuration information of a network device in an SD-WAN system to implement differential delivery of network device configurations in the SD-WAN system, reduce configuration time of the network device after a service of the network device is changed, reduce time consumption, and reduce an influence on the service is a technical problem that needs to be solved in the art.
Disclosure of Invention
The invention aims to provide a method and a device for synchronizing configuration information of network equipment in an SD-WAN system, computer equipment and a computer readable storage medium, which are used for solving the technical problems in the prior art.
In one aspect, to achieve the above object, the present invention provides a method for synchronizing configuration information of a network device in an SD-WAN system.
The SD-WAN system comprises a management and control platform and network equipment, and the configuration information synchronization method of the network equipment in the SD-WAN system comprises the following steps: acquiring configuration information of network equipment stored in a configuration database to obtain first configuration information, wherein the configuration information comprises a plurality of configurations, and each configuration comprises a plurality of configuration items; generating a first configuration tree by the first configuration information according to the reference relation among the configurations, wherein each node of the first configuration tree corresponds to one configuration in the first configuration information; acquiring configuration information in a configuration file of the network equipment to obtain second configuration information; generating a second configuration tree by second configuration information according to the reference relation among the configurations, wherein each node of the second configuration tree corresponds to one configuration in the second configuration information; obtaining difference configuration information by comparing all nodes of the first configuration tree and the second configuration tree, wherein the difference configuration information comprises a plurality of difference configurations; and issuing the difference configuration information to the network equipment.
Further, after the sending the difference configuration information to the network device, the method further includes: receiving a configuration execution result fed back by the network equipment and aiming at each difference configuration; when the configuration execution result is execution failure, recording the failure difference configuration into a failure record, and displaying the failure reason; and when the configuration execution result is that the execution is successful, updating the successful difference configuration to the configuration file.
Further, before sending the differential configuration information to the network device, the method further includes: and writing the difference configuration in the failure record into the difference configuration information, and clearing the failure record.
Further, the differential configuration includes a new configuration, a modified configuration, and a deleted configuration, and the step of obtaining the differential configuration information by comparing all nodes of the first configuration tree and the second configuration tree includes: forming all first-layer leaf nodes of the first configuration tree into a first set, and forming all first-layer leaf nodes of the second configuration tree into a second set; circulating all the configurations in the first set, judging whether the first configuration exists in the second set according to the configuration identifier of the first configuration in the first set, if the first configuration does not exist in the second set, configuring the first configuration and the configurations corresponding to all branch nodes of the node where the first configuration exists in the first configuration tree into a newly added configuration, if the first configuration exists in the second set, forming the first configuration and the configurations corresponding to all branch nodes of the node where the first configuration exists in the first configuration tree into a third set, and forming the first configuration and the configurations corresponding to all branch nodes of the node where the first configuration exists in the second configuration tree into a fourth set; circulating all the configurations in the second set, judging whether the second configuration exists in the first set according to the configuration identification of the second configuration in the second set, and if the second configuration does not exist in the first set, deleting the configurations corresponding to all branch nodes of the nodes where the second configuration exists in the second configuration tree and the second configuration; circulating all the configurations in the third set, judging whether the third configuration exists in the fourth set according to the configuration identifier of the third configuration in the third set, if the third configuration does not exist in the fourth set, the third configuration is newly added, if the third configuration exists in the fourth set, comparing each configuration item of the third configuration in the third set with each configuration item of the third configuration in the fourth set, and if any one or more configuration items are different, the third configuration is modified; and circulating all the configurations in the fourth set, judging whether the fourth configuration exists in the third set according to the configuration identifier of the fourth configuration in the fourth set, and if the fourth configuration does not exist in the third set, deleting the configuration by the fourth configuration.
Further, the control network device performs configuration in the order of adding configuration, modifying configuration, and deleting configuration.
Further, the step of controlling the network device to execute the configuration according to the order of the new configuration, the modified configuration and the deleted configuration includes: and sequencing the difference configuration in the difference configuration information according to the sequence of the newly added configuration, the modified configuration and the deleted configuration.
Further, the step of configuring a configuration tree for defining service attributes of the network device, where the configuration information is a json file and is configured as json data, and the step of generating the configuration tree from the configuration information according to a reference relationship between configurations includes: mapping a json schema file corresponding to the json file into a class structure, wherein the class structure can identify the reference relation among all service attributes of the network equipment and the value of the service attribute; analyzing the json data, and mapping the json data into a data instance according to the class structure; and converting each data instance corresponding to the configuration information into a configuration tree, wherein the configuration tree is a first configuration tree when the configuration information is first configuration information, and the configuration tree is a second configuration tree when the configuration information is second configuration information.
In another aspect, to achieve the above object, the present invention provides a configuration information synchronization apparatus for a network device in an SD-WAN system.
The SD-WAN system comprises a management and control platform and network equipment, wherein a configuration information synchronization device of the network equipment is arranged on the management and control platform, and the device comprises: the first acquisition module is used for acquiring configuration information of the network equipment stored in the configuration database to obtain first configuration information, wherein the configuration information comprises a plurality of configurations, and each configuration comprises a plurality of configuration items; a first generating module, configured to generate a first configuration tree from first configuration information according to a reference relationship between configurations, where each node of the first configuration tree corresponds to one of the configurations in the first configuration information; the second acquisition module is used for acquiring the configuration information in the configuration file of the network equipment to obtain second configuration information; a second generating module, configured to generate a second configuration tree from second configuration information according to a reference relationship between configurations, where each node of the second configuration tree corresponds to one of the configurations in the second configuration information; the processing module is used for obtaining difference configuration information by comparing all nodes of the first configuration tree and the second configuration tree, wherein the difference configuration information comprises a plurality of difference configurations; and the sending module is used for sending the difference configuration information to the network equipment.
To achieve the above object, the present invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
To achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above method.
The invention provides a method and a device for synchronizing configuration information of network equipment in an SD-WAN system, wherein when an operation or management personnel configures the network equipment on a control platform, the configuration information is written into a configuration database, then the network equipment is configured according to the configuration information in the configuration database, the configuration of the network equipment which is successfully configured is recorded into a configuration file, when the service configuration of the network equipment is changed, the control platform updates the configuration information in the configuration database in response to configuration operation, and synchronizes the changed part, namely the differential configuration information to the network equipment, specifically, the configuration information in the configuration database and the configuration information in the current configuration file are respectively mapped into configuration trees, and then the differential configuration information is obtained by comparing nodes of two configuration trees and is further issued to the network equipment, on one hand, the synchronization method realizes differential configuration, the synchronous data volume from the management and control platform to the network equipment can be reduced, and the network equipment only needs to configure the difference part, so that the configuration time after the service of the network equipment is changed is reduced, the time consumption is reduced, and the influence on the service is reduced; on the other hand, the complexity of the configuration information is not limited, and the configuration of any simple or complex network device can be supported for processing.
Drawings
Fig. 1 is a flowchart of a method for synchronizing configuration information of network devices in an SD-WAN system according to an embodiment of the present invention;
FIG. 2 is a diagram of a configuration tree in an embodiment of the present invention;
fig. 3 is a block diagram of a method and an apparatus for synchronizing configuration information of network devices in an SD-WAN system according to a second embodiment of the present invention;
fig. 4 is a flowchart of a configuration information synchronization method of a network device in an SD-WAN system according to a third embodiment of the present invention;
fig. 5 is a flowchart of a configuration information synchronization method of a network device in the SD-WAN system according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of moc classes provided in the embodiment of the present invention;
fig. 7 is a schematic structural view of moc containers provided in an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of an moi data example provided by an embodiment of the present invention;
FIG. 9 is a diagram illustrating a spanning configuration tree according to an embodiment of the present invention;
fig. 10 is a block diagram of a configuration information synchronization apparatus of a network device in an SD-WAN system according to a fifth embodiment of the present invention;
fig. 11 is a hardware configuration diagram of a computer device according to a sixth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a method and a device for synchronizing configuration information of network equipment in an SD-WAN system, computer equipment and a computer readable storage medium. In the SD-WAN system, the SD-WAN system comprises a control platform and network equipment, wherein the control platform issues configuration information to the network equipment to configure the network equipment, the configuration information comprises a plurality of configurations, and each configuration comprises a plurality of configuration items. When an operator or a manager configures network equipment in a management and control platform, writing configuration information into a configuration database, configuring the network equipment according to the configuration information in the configuration database, recording the configuration of the network equipment which is successfully configured into a configuration file, modifying the configuration information of the network equipment in the configuration database when the service configuration of certain network equipment is changed, acquiring the changed configuration information in the configuration database by the management and control platform to obtain first configuration information, generating a first configuration tree by the first configuration information according to the reference relationship among the configurations, acquiring the configuration information in the configuration file of the current network equipment to obtain second configuration information, and generating a second configuration tree by the second configuration information according to the reference relationship among the configurations; and then obtaining difference configuration information by comparing all nodes of the first configuration tree and the second configuration tree, and finally sending the difference configuration information to the network equipment. According to the method and the device, when the service configuration of the network equipment is changed, the configuration trees are respectively constructed according to the configuration information in the configuration database and the configuration file, the two configuration trees are compared to obtain the difference configuration information, and finally the difference configuration information is only required to be sent to the network equipment, so that the synchronous data volume from the management and control platform to the network equipment is reduced, the network equipment only needs to configure the difference part, the configuration time after the service of the network equipment is changed is shortened, the time consumption is reduced, and the influence on the service is reduced.
Specific embodiments of a method, an apparatus, a computer device, and a computer-readable storage medium for synchronizing configuration information of a network device in an SD-WAN system according to the present invention will be described in detail below.
Example one
The embodiment of the present invention provides a method for synchronizing configuration information of a network device in an SD-WAN system, where the SD-WAN system includes a management and control platform and a plurality of network devices, and the management and control platform synchronizes configuration information to the network devices, and by using the method, only a changed difference configuration can be synchronized to the network devices when a service configuration of the network devices changes, specifically, fig. 1 is a flow chart of a method for synchronizing configuration information of a network device in an SD-WAN system according to an embodiment of the present invention, and as shown in fig. 1, the method for synchronizing configuration information of a network device in an SD-WAN system according to the embodiment includes steps S101 to S106 as follows.
Step S101: the method comprises the steps of obtaining configuration information of the network equipment stored in a configuration database to obtain first configuration information.
The management and control platform comprises a back end and a front end for providing a user interactive interface, a user can configure the networking relation, the service and the like of network equipment in the SD-WAN system on the interactive interface, the back end generates configuration information according to the input of the user to modify the configuration information in the configuration database, then synchronizes the configuration information to the network equipment, and simultaneously stores the configuration information completing configuration, namely a configuration file, on one side of the management and control platform, wherein the configuration information comprises a plurality of configurations, and each configuration comprises a plurality of configuration items. When the user needs to change the service configuration of the network equipment, the modification operation can be carried out on the interactive interface, and the back end modifies the configuration information in the configuration database according to the content input by the user.
Optionally, the configuration information is a json file, and the json file includes json data, where each configuration is configured as a json data, and each configuration item is a parameter in the json data.
In this step, the management and control platform acquires the configuration information of the network device stored at the local side, and defines the acquired configuration information as first configuration information.
Step S102: and generating a first configuration tree according to the first configuration information and the reference relation among the configurations.
The configuration information includes a plurality of configurations, after the configuration tree is formed, each configuration corresponds to one node in the configuration tree, that is, the nodes correspond to the configurations one by one, and the reference relationship existing between the configurations defines the positions and the correlation relationship of the nodes in the configuration tree. For example, the configuration information includes security policy configuration, address group configuration, and address configuration, and corresponds to a node in the configuration tree, and meanwhile, based on the relationship that the security policy configuration refers to the address group configuration, and the address group configuration refers to the address configuration, the node corresponding to the security policy configuration refers to the node corresponding to the address group configuration, and the address group configuration corresponds to the node referring to the address configuration.
Fig. 2 is a schematic diagram of a configuration tree in an embodiment of the present invention, as shown in fig. 2, taking the configuration tree as a first configuration tree as an example, a root node Dev of the configuration tree is a tree root of the configuration tree, a parent node of each leaf node identifies a set of service policies of a network device, that is, configuration information, and after all service configurations of a certain network device are abstracted into one configuration tree, all configurations under the configuration tree belong to the network device. The configuration tree includes 14 leaf nodes, wherein there are 3 first-layer leaf nodes, each first-layer leaf node corresponds to one service Policy type, and different first-layer leaf nodes may correspond to the same service Policy type, where, as shown in fig. 2, the first-layer leaf node Policy-1 corresponds to one security Policy of the network device, the security Policy of the network device may include multiple types, and correspondingly, the first-layer leaf node may further include Policy-2, Policy-3, and so on; with continued reference to fig. 2, the first layer of leaf nodes PBR-1 is a routing policy, which is used to perform outgoing line selection when the internal address goes out to access the internet or other networks, for example, the application environment is: when the network equipment realizes multilink access application and has load distribution requirements, outgoing links are selected according to a specified mode when outgoing of an internal network IP address accesses the Internet, routing strategies of the network equipment can comprise multiple types, and correspondingly, the first layer leaf nodes can also comprise PBR-2, PBR-3 and the like; with reference to fig. 2, the first layer leaf node SNAT-1 is a source NAT policy, and functions in that when a terminal device in a local area network accesses an external network address, a source address is converted into an address on a network device, and then the network device accesses the external network, and when a request is replied, the network device can determine the terminal device in the local area network corresponding to the access, so that the address of the terminal device in the local area network is not exposed to the external network, and the source NAT policy of the network device may include multiple types, and accordingly, the first layer leaf node may further include SNAT-2, SNAT-3, and the like.
As shown in FIG. 2, the first layer of leaf node Policy-1 refers to the leaf node URL-PE-1, the leaf node URL-PE-1 is a URL security configuration file, the leaf node ADDr-grp-1 is an address group in the security Policy, the leaf node ADDr-1 is an address in the address group, the leaf node APP-1 is an application in the security Policy and the routing Policy, the leaf node TUN-Inf-TUN-1 is a tunnel interface in the routing strategy, the leaf node User-1 is a service User in the routing strategy, the leaf node IPSec-1 is a tunnel in the routing strategy, the leaf node IKE-1 is an IKE gateway, the leaf node IPSec-Prop-1 is an IPSec proposal, the leaf node Inf-ge1 is a physical port of the tunnel, and the leaf node IKE-Prop-1 is an IKE proposal.
Step S103: and acquiring configuration information in the configuration file of the network equipment to obtain second configuration information.
The management and control platform reads the configuration information in the configuration file of the locally stored network device, where the configuration information is defined as second configuration information, and the configuration information in the configuration database may adopt the same data structure, for example, json data defined by the configuration included in the configuration file and the configuration in the configuration database adopting the same json file constraint.
Step S104: and generating a second configuration tree according to the second configuration information and the reference relation among the configurations.
For the second configuration tree, reference may be made to fig. 2 and the related description above, and details are not repeated here.
Step S105: and obtaining the difference configuration information by comparing all nodes of the first configuration tree and the second configuration tree.
Optionally, the difference configuration information is obtained by comparing the root node, the first layer leaf node, the second layer leaf node … and the last layer leaf node of the configuration tree.
The difference configuration information includes a plurality of difference configurations, and the difference configurations include a deletion configuration, an addition configuration, and a modification configuration, specifically, the deletion configuration is a configuration that the network device side needs to delete, the addition configuration is a configuration that the network device side needs to add, and the modification configuration is a configuration that the network device side needs to modify a part of configuration items, add a part of configuration items, or delete a part of configuration items.
Step S106: and sending the difference configuration information to the network equipment.
By adopting the configuration information synchronization method of the network device in the SD-WAN system provided in this embodiment, when the management and control platform configures the network device, the operation or management personnel writes the configuration information into the configuration database, then configures the network device according to the configuration information in the configuration database, and records the successfully configured configuration of the network device into the configuration file, when the service configuration of the network device changes, the management and control platform updates the configuration information in the configuration database in response to the configuration operation, and then synchronizes the changed part, that is, the differential configuration information, to the network device, specifically, maps the configuration information in the configuration database and the configuration information in the current configuration file into the configuration trees respectively, and then obtains the differential configuration information by comparing the nodes of the two configuration trees, and further issues the differential configuration information to the network device, on the one hand, the synchronization method realizes the differential configuration, the synchronous data volume from the management and control platform to the network equipment can be reduced, and the network equipment only needs to configure the difference part, so that the configuration time after the service of the network equipment is changed is reduced, the time consumption is reduced, and the influence on the service is reduced; on the other hand, in a conventional SDN system, a switch or a router generally serves as a network device to perform networking, all data is processed in units of "flow", in this type of network device, generation, maintenance, and issuing of a flow table are all implemented by an SDN controller, each flow table has a detailed flow entry, each flow entry has a corresponding parameter, configuration information is issued based on an OpenFlow protocol, and a method based on the OpenFlow protocol can only issue configuration entries supported in the flow table. In an SD-WAN system, functions such as supported policies, objects, tunnel networking, qos, and the like in a network device are increasingly complex, and a method for issuing configuration information based on an OpenFlow protocol cannot be adapted to a network device with complex configuration, that is, cannot be issued through the OpenFlow protocol.
Example two
On the basis of the first embodiment, the second embodiment of the present invention provides a method for synchronizing configuration information of a network device in a preferred SD-WAN system, and the same technical features are only briefly described in this embodiment, and reference may be made to the first embodiment in detail. Specifically, fig. 3 is a flowchart of a method for synchronizing configuration information of a network device in an SD-WAN system according to a second embodiment of the present invention, and as shown in fig. 3, the method for synchronizing configuration information of a network device in an SD-WAN system according to the second embodiment includes steps S201 to S209.
Step S201: the method comprises the steps of obtaining configuration information of the network equipment stored in a configuration database to obtain first configuration information.
The configuration information comprises a plurality of configurations, and each configuration comprises a plurality of configuration items.
Step S202: and generating a first configuration tree according to the first configuration information and the reference relation among the configurations.
Each node of the first configuration tree corresponds to one configuration in the first configuration information.
Step S203: and acquiring configuration information in the configuration file of the network equipment to obtain second configuration information.
Step S204: and generating a second configuration tree according to the second configuration information and the reference relation among the configurations.
Wherein each node of the second configuration tree corresponds to one configuration in the second configuration information.
Step S205: and obtaining the difference configuration information by comparing all the nodes of the first configuration tree and the second configuration tree.
Wherein the difference configuration information comprises a plurality of difference configurations.
Step S206: and writing the difference configuration in the failure record into the difference configuration information, and clearing the failure record.
And the control platform side sets a failure record corresponding to the network equipment and is used for recording the difference configuration of execution failure, obtaining the difference configuration in the failure record after comparing the configuration tree to obtain the difference configuration information, and writing the difference configuration information and then issuing the difference configuration information to the network equipment.
Step S207: and sending the difference configuration information to the network equipment.
After receiving the difference configuration information, the network device performs configuration processing according to each difference configuration in the difference configuration information, and feeds back a configuration execution result for each difference configuration to the management and control device.
Step S208: and receiving configuration execution results fed back by the network equipment and aiming at each difference configuration.
Step S209: and when the configuration execution result is the execution failure, recording the failure difference configuration into a failure record, displaying the failure reason, and when the configuration execution result is the execution success, updating the successful difference configuration to a configuration file.
Recording the differential configuration which fails to be executed into a failure record, and issuing the differential configuration in the failure record again when the configuration information is issued to the network equipment next time; and recording the difference configuration which is successfully executed into a configuration file, and ensuring that the configuration in the current configuration file is consistent with the actual configuration of the network equipment.
By adopting the configuration information synchronization method of the network equipment in the SD-WAN system provided by the embodiment, the failure records are set aiming at the difference configuration of the execution failure of the network equipment, before the difference configuration information is issued each time, the difference configuration of the last execution failure in the failure records is written into the difference configuration information to realize the issuing again, after the difference configuration information is issued each time, the difference configuration of the execution failure is written into the failure records to be issued again, thereby ensuring the complete issuing of the configuration information; and recording the difference configuration which is successfully executed into a configuration file, and ensuring that the configuration in the current configuration file is consistent with the actual configuration of the network equipment, so that when the configuration of the network equipment needs to be changed every time, the issuing of the difference configuration can be realized by comparing the configuration information in the configuration database with the configuration information in the configuration file.
EXAMPLE III
On the basis of the first embodiment, a third embodiment of the present invention provides a method for synchronizing configuration information of a network device in a preferred SD-WAN system, and the same technical features are only briefly described in this embodiment, and reference may be made to the first embodiment in detail. Specifically, fig. 4 is a flowchart of a method for synchronizing configuration information of a network device in an SD-WAN system according to a third embodiment of the present invention, and as shown in fig. 4, the method for synchronizing configuration information of a network device in an SD-WAN system according to the third embodiment includes steps S301 to S311 as follows.
Step S301: the method comprises the steps of obtaining configuration information of the network equipment stored in a configuration database to obtain first configuration information.
The configuration information comprises a plurality of configurations, and each configuration comprises a plurality of configuration items.
Step S302: and generating a first configuration tree according to the first configuration information and the reference relation among the configurations.
Each node of the first configuration tree corresponds to one configuration in the first configuration information.
Step S303: and acquiring configuration information in the configuration file of the network equipment to obtain second configuration information.
Step S304: and generating a second configuration tree according to the second configuration information and the reference relation among the configurations.
Wherein each node of the second configuration tree corresponds to one configuration in the second configuration information.
The configuration is used for limiting the service attribute of the network equipment, the configuration information is a json file, the json file comprises json data and is configured as the json data, and the json data is restricted and defined according to a json schema file. For step S302 and step S303, when the configuration tree is generated by the configuration information according to the reference relationship between the configurations, the following steps may be specifically performed:
step S31: and mapping the json schema file of the configuration information into a class structure, wherein the class structure can identify the reference relation among the attributes of the network equipment and the rule to which the values of the attributes are to comply.
And presetting a class structure, wherein the class structure is a payhon representation of the json schema file. Optionally, the configuration in the configuration database and the configuration in the configuration file adopt json schema file constraints and defined json data which are defined in advance and are the same, the json schema file is stored in the management and control platform, and when a controller which correspondingly issues configuration information to the network device in the management and control platform is started, the json schema file is mapped into a corresponding class structure and stored in the cache.
Optionally, in an embodiment, the class structure is defined as a moc class, and parameters and methods included in the base class in the moc class are as follows:
name: the name of moc, i.e. the type of object described.
primary _ key: the field in the corresponding json data is identified as a primary key, and one object is uniquely identified.
attributes: the first level attribute description of moc is a complex attribute.
attr _ name _ stack: moc attribute name set.
attr _ name _ for _ reference _ moc: the moc attribute references a collection.
get _ primary _ key (): the primary _ key field recorded in the moc is obtained.
build _ attr _ name _ stack (), get the function of attr _ name _ stack in moc.
The subclasses include the following methods:
d, all _ mocs: key is the moc name and value is the dictionary for the corresponding moc.
__ init _: and calling a part _ one _ file function to sequentially analyze the schemas into mocs, and storing the mocs in an all _ mocs dictionary.
function-part _ one _ file: 1. acquiring an object type described by the schema, and setting a moc name and a primary _ key; 2. calling a part _ items function to analyze each attribute in the schema; 3. and setting an attribute dictionary in the moc according to the analysis result.
func-part _ items: 1. judging whether the attribute is a simple attribute or a complex attribute according to the type of the layer attribute, wherein the types of the array and the object are complex attributes at present, and the other types are simple attributes; 2. setting various identifications and checkRule of the simple attributes and setting the referenced moc type for the simple attributes; 3. for complex attributes, the function is recursively called until all attributes are simple attributes.
func-parse _ constraints: 1. and analyzing the constraint condition combination of the simple attribute, and picking out a currently supported constraint check item to initialize a checkRule class of the simple attribute, for example, supporting the check of the character string length and the mode through a stringCheck class.
Step S32: and analyzing the json data, and mapping the json data into data examples according to the moc.
Optionally, the structure of the data instance moi formed according to the predefined data format is as follows:
type: the object type of the data instance is obtained by json data, and the corresponding moc in the cache can be determined according to the object type.
primary _ key: which field in the data is ne _ id is found by moc: a configuration set ID or a device ID.
attach _ type: the identification is a common object of the policy set or the configuration set, or an object on a device at a remote end.
parent _ moi: the data instance that references the parent of the object corresponds to the case of one-to-one reference only.
children _ moi: the dictionary is formed by data instances of all the referenced objects of the object, the key of the dictionary is a type of child _ moi, the value is a dictionary formed by all the child _ moi of the type referenced by the parent object, the key of the dictionary is the value of the main key of each child _ moi, and the value is the corresponding single child _ moi.
children _ attributes: the python representation of json data is equivalent to invoking the json loads method for the json data.
One moi is a data instance of one type configuration object, and json data are analyzed to obtain the moi.
Step S33: and converting all the mois corresponding to the configuration information into a configuration tree according to the reference relation in the mois.
Each data instance corresponding to the configuration information is a discrete moi, all the discrete mois form a moi tree according to the reference relationship in the moi, and the generated tree structure is also a configuration tree which contains the moi of all the object resources required by the configuration information and can clearly show the hierarchical relationship between the object resources.
Step S305: and forming a first set by all the first-layer leaf nodes of the first configuration tree, and forming a second set by all the first-layer leaf nodes of the second configuration tree.
Step S306: circulating all configurations in the first set, judging whether the first configuration exists in the second set according to the configuration identifier of the first configuration in the first set, if the first configuration does not exist in the second set, configuring the first configuration and all branch nodes of the node where the first configuration is located in the first configuration tree into a newly added configuration, if the first configuration exists in the second set, forming the first configuration and the configuration corresponding to all branch nodes of the node where the first configuration is located in the first configuration tree into a third set, and forming the first configuration and the configuration corresponding to all branch nodes of the node where the first configuration is located in the second configuration tree into a fourth set;
step S307: circulating all the configurations in the second set, judging whether the second configuration exists in the first set according to the configuration identification of the second configuration in the second set, and if the second configuration does not exist in the first set, deleting the configurations corresponding to all branch nodes of the nodes where the second configuration exists in the second configuration tree and the second configuration;
step S308: circulating all the configurations in the third set, judging whether the third configuration exists in the fourth set according to the configuration identifier of the third configuration in the third set, if the third configuration does not exist in the fourth set, the third configuration is newly added, if the third configuration exists in the fourth set, comparing each configuration item of the third configuration in the third set with each configuration item of the third configuration in the fourth set, and if any one or more configuration items are different, the third configuration is modified;
step S309: and circulating all the configurations in the fourth set, judging whether the fourth configuration exists in the third set according to the configuration identifier of the fourth configuration in the fourth set, and if the fourth configuration does not exist in the third set, deleting the configuration by the fourth configuration.
Step S310: and forming difference configuration information by utilizing the newly added configuration, the modified configuration and the deleted configuration, and sequencing the configurations in the difference configuration information according to the sequence of the newly added configuration, the modified configuration and the deleted configuration.
Step S311: and sending the difference configuration information to the network equipment.
By adopting the method for synchronizing the configuration information of the network equipment in the SD-WAN system, all service configurations of the network equipment are defined in advance according to json schemas in the management and control platform, and the correctness of each type of configuration is ensured; when the management and control platform application program is started, generating corresponding moc according to jsonschemas defined in advance, and storing the moc in a cache; when the service configuration of the network equipment in the control platform is changed, the configuration database and the configuration information in the configuration file of the network equipment, which is locally stored by the control platform, are respectively obtained, the moi is generated according to the configuration relation defined in the moc, each moi is formed into a configuration tree with configuration interdependent, each type of configuration is specially compared, namely, the difference configuration information formed by difference configuration is obtained finally, the configuration difference can be accurately compared after the network equipment supports high-level functions, and the configuration difference is synchronized to the network equipment. Optionally, each type of configuration in the differential configuration information is converted into a json format recognizable by the network device according to the moi, all the differential configurations are stored in a differential configuration file, and finally the differential configuration file is issued to the network device through a configuration issuing channel.
Example four
In the fourth embodiment of the present invention, a method for synchronizing configuration information of a network device in an SD-WAN system is described by taking the network device as a firewall as an example, and reference may also be made to any one of the above embodiments for related technical features. According to the method, in the process that the management and control platform carries out centralized management and control on the network equipment, different configuration trees are respectively generated according to two service configurations in the configuration database and the local configuration file of the management and control platform when configuration is issued each time, the two configuration trees are configured and compared, incremental network equipment difference configuration information is generated, and the purpose of only synchronizing the incremental configuration is achieved. Specifically, fig. 5 is a flowchart of a configuration information synchronization method for a network device in an SD-WAN system according to a fourth embodiment of the present invention, and as shown in fig. 5, the configuration information synchronization method for a network device in an SD-WAN system according to the fourth embodiment includes steps S401 to S414 as follows.
Step S401: and the management and control platform takes out the configuration information of the network equipment in the configuration database according to the equipment id and the user _ id.
A database for storing network device configuration information, that is, a configuration database, is set in the SD-WAN system, and the configuration information of the network device can be found in the configuration database by the device id and user _ id (user id) of the network device.
Step S402: and the management and control platform generates db _ moi _ tree according to the configuration information.
The configuration information includes a plurality of configurations, each configuration corresponds to a json data, a json schema file corresponding to the configuration information is converted into a moc class, fig. 6 is a schematic structural diagram of the moc class provided in the embodiment of the present invention, and fig. 7 is a schematic structural diagram of a moc container class provided in the embodiment of the present invention, as shown in fig. 6 and fig. 7, a json schema file of the configuration information of each network device corresponds to a moc, and a moc is a python structural representation of json of an object of a certain type, which indicates a relationship between attributes of the object of a certain type and a protocol to which values of the attributes should adhere, and all contents of the json schema are parsed and placed in the moc container class for use.
Generating a moi data instance for each configuration, fig. 8 is a schematic structural diagram of a moi data instance provided by an embodiment of the present invention, as shown in fig. 8, a moi is a data instance of a certain type of configuration object and is parsed according to actual data of the configuration, fig. 9 is a schematic structural diagram of a configuration tree provided by an embodiment of the present invention, as shown in fig. 9, all discrete moi data instances form a moi tree according to a reference relationship defined in a json schema, a tree-like structure is generated, which includes mois of all object resources required by a configuration set and can clearly indicate a hierarchical relationship between them.
Step S403: and the management and control platform extracts the equipment configuration information from the locally stored equipment configuration file.
Step S404: and the control platform generates dev _ moi _ tree according to the configuration information.
Step S405: and the management and control platform generates configuration difference information based on the db _ moi _ tree and the dev _ moi _ tree, wherein the configuration difference information comprises addition, modification, deletion and the like.
Step S406: and the management and control platform sequences the difference configuration in the generated difference information, wherein the newly added configuration is firstly modified, the configuration is modified secondly, and the configuration is deleted again.
After comparison of all nodes in the moi type set is completed, a piece of difference configuration information is generated, because reference relations exist among different configurations of the difference configuration information, when the network equipment sequentially executes the difference configurations, if the referenced difference configurations are deleted, execution fails, and if the referenced difference configurations which are not added are cited during addition or modification, errors are reported.
Step S407: the management and control platform converts the difference configuration information into a configuration structure identified by the firewall, such as json, xml and the like.
Step S408: and the control platform writes the difference configuration information into the difference configuration file and sends a command for acquiring the difference configuration file to the firewall.
Step S409: and after receiving the command of obtaining the difference configuration file, the firewall actively obtains the difference configuration file from the control platform.
Step S410: and the firewall circularly executes each piece of difference configuration in the difference configuration file and returns an execution result to the control platform.
Step S411: and the management and control platform circularly receives the configuration execution result of the equipment and determines which configuration execution result is according to the returned information.
Step S412: the management and control platform judges whether the execution result is correct.
Step S413: if the execution is successful, the management and control platform updates the difference configuration into the configuration file, and the configuration in the configuration file is ensured to be consistent with the real configuration of the network equipment side.
Step S414: and if the execution fails, the management and control platform records failure information and displays the reason for the failure of the configuration execution to the user.
By adopting the SD-WAN system provided by the embodiment, the network equipment is provided in the backbone network SD-WAN system supporting cloud computing, and the network equipment supports zero configuration online, namely, network management personnel are not required to perform related network configuration on a single network equipment, and all the network equipment is subjected to centralized management setting on the configuration of the network equipment by a control platform; the management and control platform can intensively manage and control the configuration of the network equipment, and through the invention, the incremental synchronous configuration concept of the network equipment is realized, when the configuration of the network equipment is required to be synchronized, the configuration which is added, deleted or modified at this time is only issued, other configurations are not required to be issued, the configuration issuing result is counted after the issuing is completed each time, the correctly issued configuration is synchronized into the configuration file, the reason of the failure of issuing partial configuration is recorded, and the configuration is continuously issued to the network equipment when the configuration of the next time is synchronized. When the increment is issued, different configuration trees are respectively generated according to two service configurations in a configuration database and a local configuration file of a control platform, the two configuration trees are configured and compared, and incremental network equipment difference configuration information is generated, so that the aim of synchronizing only the increment configuration is fulfilled.
EXAMPLE five
Corresponding to the first embodiment, a fifth embodiment of the present invention provides a configuration information synchronization apparatus for a network device in an SD-WAN system, and fig. 10 is a block diagram of the configuration information synchronization apparatus for a network device in an SD-WAN system provided in the fifth embodiment of the present invention, as shown in fig. 10, the apparatus includes: a first obtaining module 501, a first generating module 502, a second obtaining module 503, a second generating module 504, a first processing module 505 and a sending module 506.
The first obtaining module 501 is configured to obtain configuration information of the network device stored in a configuration database, to obtain first configuration information, where the configuration information includes a plurality of configurations, and each configuration includes a plurality of configuration items; the first generating module 502 is configured to generate a first configuration tree from the first configuration information according to a reference relationship between configurations, where each node of the first configuration tree corresponds to one configuration in the first configuration information; the second obtaining module 503 is configured to obtain configuration information in a configuration file of the network device to obtain second configuration information; the second generating module 504 is configured to generate a second configuration tree from the second configuration information according to a reference relationship between configurations, where each node of the second configuration tree corresponds to one configuration in the second configuration information; the first processing module 505 is configured to obtain difference configuration information by comparing all nodes of the first configuration tree and the second configuration tree, where the difference configuration information includes a plurality of difference configurations; the sending module 506 is configured to send the difference configuration information to the network device.
Optionally, in an embodiment, the configuration information synchronization apparatus of the network device in the SD-WAN system further includes a receiving module and a second processing module, where the receiving module is configured to receive a configuration execution result for each difference configuration fed back by the network device after the difference configuration information is sent to the network device; the second processing module is used for recording the failed difference configuration into a failure record when the configuration execution result is that the execution fails, displaying the failure reason, and updating the successful difference configuration to the configuration file when the configuration execution result is that the execution succeeds.
Optionally, in an embodiment, the configuration information synchronization apparatus of the network device in the SD-WAN system further includes a third processing module, where the third processing module is configured to write the difference configuration in the failure record into the difference configuration information and clear the failure record before sending the difference configuration information to the network device.
Optionally, in an embodiment, the difference configuration includes a new configuration, a modified configuration, and a deleted configuration, and the first processing module specifically executes the following steps:
forming all first-layer leaf nodes of the first configuration tree into a first set, and forming all first-layer leaf nodes of the second configuration tree into a second set; circulating all configurations in the first set, judging whether the first configuration exists in the second set according to the configuration identifier of the first configuration in the first set, if the first configuration does not exist in the second set, configuring the first configuration and all branch nodes of the node where the first configuration is located in the first configuration tree into a newly added configuration, if the first configuration exists in the second set, forming the first configuration and the configuration corresponding to all branch nodes of the node where the first configuration is located in the first configuration tree into a third set, and forming the first configuration and the configuration corresponding to all branch nodes of the node where the first configuration is located in the second configuration tree into a fourth set; circulating all the configurations in the second set, judging whether the second configuration exists in the first set according to the configuration identification of the second configuration in the second set, and if the second configuration does not exist in the first set, deleting the configurations corresponding to all branch nodes of the nodes where the second configuration exists in the second configuration tree and the second configuration; circulating all the configurations in the third set, judging whether the third configuration exists in the fourth set according to the configuration identifier of the third configuration in the third set, if the third configuration does not exist in the fourth set, the third configuration is a newly added configuration, if the third configuration exists in the fourth set, each configuration item of the third configuration in the third set and each configuration item of the third configuration in the fourth set are compared, and if any one or more configuration items are different, the third configuration is a modified configuration; and circulating all the configurations in the fourth set, judging whether the fourth configuration exists in the third set according to the configuration identifier of the fourth configuration in the fourth set, and if the fourth configuration does not exist in the third set, deleting the configuration by the fourth configuration.
Optionally, in an embodiment, the configuration information synchronizing apparatus of a network device in an SD-WAN system further includes a control module, configured to control the network device to execute configuration according to an order of adding configuration, modifying configuration, and deleting configuration.
Optionally, in an embodiment, the control module orders the configurations in the difference configuration information according to the sequence of the new configuration, the modified configuration, and the deleted configuration, so as to control the network device to execute the configurations according to the sequence of the new configuration, the modified configuration, and the deleted configuration.
Optionally, in an embodiment, the configuration is configured to define a service attribute of the network device, the configuration information is a json file, the json file includes json data and is configured as the json data, and the first generating module and the second generating module respectively specifically execute the following steps:
mapping a json schema file corresponding to the json file into a class structure, wherein the class structure can identify the reference relation among all service attributes of the network equipment and the value of the service attribute; analyzing the json data, and mapping the json data into a data example according to the class structure; and converting each data instance corresponding to the configuration information into a configuration tree, wherein the configuration tree is a first configuration tree when the configuration information is first configuration information, and the configuration tree is a second configuration tree when the configuration information is second configuration information.
EXAMPLE six
In this fifth embodiment, a computer device is further provided, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster formed by a plurality of servers) capable of executing programs, and the like. As shown in fig. 11, the computer device 01 of the present embodiment at least includes but is not limited to: a memory 011 and a processor 012 which are communicatively connected to each other via a system bus, as shown in fig. 11. It is noted that fig. 11 only shows the computer device 01 having the component memory 011 and the processor 012, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the memory 011 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 011 can be an internal storage unit of the computer device 01, such as a hard disk or a memory of the computer device 01. In other embodiments, the memory 011 can also be an external storage device of the computer device 01, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device 01. Of course, the memory 011 can also include both internal and external memory units of the computer device 01. In this embodiment, the memory 011 is generally used to store an operating system installed in the computer device 01 and various application software, for example, a program code of a configuration information synchronization apparatus of a network device in the SD-WAN system in the fourth embodiment. Further, the memory 011 can also be used to temporarily store various kinds of data that have been output or are to be output.
The processor 012 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data Processing chip in some embodiments. The processor 012 is generally used to control the overall operation of the computer device 01. In this embodiment, the processor 012 is configured to run a program code stored in the memory 011 or process data, for example, a configuration information synchronization method of a network device in the SD-WAN system.
EXAMPLE seven
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of this embodiment is used to store a configuration information synchronization apparatus of a network device in an SD-WAN system, and when executed by a processor, implements the configuration information synchronization method of the network device in the SD-WAN system of the first embodiment.
It should be noted that, in this document, 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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for synchronizing configuration information of network equipment in an SD-WAN system, wherein the SD-WAN system comprises a management and control platform and the network equipment, and the method comprises the following steps:
acquiring configuration information of the network equipment stored in a configuration database to obtain first configuration information, wherein the configuration information comprises a plurality of configurations, each configuration comprises a plurality of configuration items, after a configuration tree is formed, each configuration corresponds to a node in the configuration tree, and the reference relationship existing among the configurations defines the position and the correlation relationship of the nodes in the configuration tree;
generating a first configuration tree by the first configuration information according to the reference relation among the configurations, wherein each node of the first configuration tree corresponds to one configuration in the first configuration information;
acquiring the configuration information in the configuration file of the network equipment to obtain second configuration information;
generating a second configuration tree by using the second configuration information according to the reference relation among the configurations, wherein each node of the second configuration tree corresponds to one configuration in the second configuration information;
obtaining difference configuration information by comparing all nodes of the first configuration tree and the second configuration tree, wherein the difference configuration information comprises a plurality of difference configurations, and the difference configurations comprise a newly added configuration, a modified configuration and a deleted configuration;
sending the difference configuration information to the network equipment; and
controlling the network equipment to execute configuration according to the sequence of the newly added configuration, the modified configuration and the deleted configuration;
wherein the step of obtaining the differential configuration information by comparing all nodes of the first configuration tree and the second configuration tree comprises:
forming all first-layer leaf nodes of the first configuration tree into a first set, and forming all first-layer leaf nodes of the second configuration tree into a second set;
circulating all the configurations in the first set, judging whether the first configuration exists in the second set according to the configuration identifier of the first configuration in the first set, if the first configuration does not exist in the second set, configuring the first configuration and all the branch nodes of the node where the first configuration is located in the first configuration tree into the newly added configuration, if the first configuration exists in the second set, forming the first configuration and the configuration corresponding to all the branch nodes of the node where the first configuration is located in the first configuration tree into a third set, and forming the first configuration and the configuration corresponding to all the branch nodes of the node where the first configuration is located in the second configuration tree into a fourth set;
circulating all configurations in the second set, judging whether the second configuration exists in the first set according to the configuration identifier of the second configuration in the second set, and if the second configuration does not exist in the first set, configuring the second configuration and all branch nodes of the node where the second configuration exists in the second configuration tree into the deletion configuration;
circulating all the configurations in the third set, judging whether the third configuration exists in the fourth set according to the configuration identifier of the third configuration in the third set, if the third configuration does not exist in the fourth set, comparing each configuration item of the third configuration in the third set with each configuration item of the third configuration in the fourth set, if any one or more configuration items are different, determining that the third configuration exists in the fourth set;
and circulating all the configurations in the fourth set, judging whether the fourth configuration exists in the third set according to the configuration identifier of the fourth configuration in the fourth set, and if the fourth configuration does not exist in the third set, the fourth configuration is the deletion configuration.
2. The method for synchronizing configuration information of network devices in an SD-WAN system according to claim 1, wherein after the sending the differential configuration information to the network devices, the method further comprises:
receiving configuration execution results fed back by the network equipment for each of the different configurations;
when the configuration execution result is execution failure, recording the failed difference configuration into a failure record, and displaying the failure reason;
and when the configuration execution result is that the execution is successful, updating the successful difference configuration to the configuration file.
3. The method for synchronizing configuration information of network devices in an SD-WAN system according to claim 2, wherein before sending the differential configuration information to the network devices, the method further comprises: and writing the difference configuration in the failure record into the difference configuration information, and clearing the failure record.
4. The method for synchronizing configuration information of network devices in an SD-WAN system according to claim 1, wherein the step of controlling the network devices to perform configuration in the order of the addition configuration, the modification configuration, and the deletion configuration comprises:
and sequencing the difference configuration in the difference configuration information according to the sequence of the newly added configuration, the modified configuration and the deleted configuration.
5. The method according to claim 1, wherein the configuration is used to define service attributes of the network device, the configuration information is a json file, the configuration is json data, and the step of generating the configuration tree from the configuration information according to a reference relationship between configurations includes:
mapping a json schema file corresponding to the json file into a class structure, wherein the class structure can identify a reference relation among all service attributes of the network equipment and a value of the service attribute;
analyzing the json data, and mapping the json data into a data instance according to the class structure;
and converting each data instance corresponding to the configuration information into a configuration tree, wherein when the configuration information is the first configuration information, the configuration tree is the first configuration tree, and when the configuration information is the second configuration information, the configuration tree is the second configuration tree.
6. The configuration information synchronization device of a network device in an SD-WAN system, characterized in that the SD-WAN system comprises a management and control platform and a network device, the device is arranged on the management and control platform, and the device comprises:
a first obtaining module, configured to obtain configuration information of the network device stored in a configuration database, to obtain first configuration information, where the configuration information includes a plurality of configurations, and each configuration includes a plurality of configuration items;
a first generating module, configured to generate a first configuration tree from the first configuration information according to a reference relationship between configurations, where each node of the first configuration tree corresponds to one of the configurations in the first configuration information;
the second obtaining module is used for obtaining the configuration information in the configuration file of the network equipment to obtain second configuration information;
a second generating module, configured to generate a second configuration tree from the second configuration information according to a reference relationship between configurations, where each node of the second configuration tree corresponds to one of the configurations in the second configuration information;
the first processing module is used for obtaining difference configuration information by comparing all nodes of the first configuration tree with all nodes of the second configuration tree, wherein the difference configuration information comprises a plurality of difference configurations, and the difference configurations comprise a new configuration, a modified configuration and a deleted configuration;
a sending module, configured to send the difference configuration information to the network device; and
a control module, configured to control the network device to execute configuration according to the sequence of the new configuration, the modified configuration and the deleted configuration,
the first processing module specifically executes the following steps:
forming all first-layer leaf nodes of the first configuration tree into a first set, and forming all first-layer leaf nodes of the second configuration tree into a second set;
circulating all the configurations in the first set, judging whether the first configuration exists in the second set according to the configuration identifier of the first configuration in the first set, if the first configuration does not exist in the second set, configuring the first configuration and all the branch nodes of the node where the first configuration is located in the first configuration tree into the newly added configuration, if the first configuration exists in the second set, forming the first configuration and the configuration corresponding to all the branch nodes of the node where the first configuration is located in the first configuration tree into a third set, and forming the first configuration and the configuration corresponding to all the branch nodes of the node where the first configuration is located in the second configuration tree into a fourth set;
circulating all configurations in the second set, judging whether the second configuration exists in the first set according to the configuration identifier of the second configuration in the second set, and if the second configuration does not exist in the first set, configuring the second configuration and all branch nodes of the node where the second configuration exists in the second configuration tree into the deletion configuration;
circulating all the configurations in the third set, judging whether the third configuration exists in the fourth set according to the configuration identifier of the third configuration in the third set, if the third configuration does not exist in the fourth set, comparing each configuration item of the third configuration in the third set with each configuration item of the third configuration in the fourth set, if any one or more configuration items are different, determining that the third configuration exists in the fourth set;
and circulating all the configurations in the fourth set, judging whether the fourth configuration exists in the third set according to the configuration identifier of the fourth configuration in the fourth set, and if the fourth configuration does not exist in the third set, the fourth configuration is the deletion configuration.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 5 are implemented by the processor when executing the computer program.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program when executed by a processor implements the steps of the method of any one of claims 1 to 5.
CN201910625186.2A 2019-07-11 2019-07-11 Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system Active CN112217656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910625186.2A CN112217656B (en) 2019-07-11 2019-07-11 Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910625186.2A CN112217656B (en) 2019-07-11 2019-07-11 Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system

Publications (2)

Publication Number Publication Date
CN112217656A CN112217656A (en) 2021-01-12
CN112217656B true CN112217656B (en) 2022-08-16

Family

ID=74048204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910625186.2A Active CN112217656B (en) 2019-07-11 2019-07-11 Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system

Country Status (1)

Country Link
CN (1) CN112217656B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010230B (en) * 2021-03-26 2024-02-09 广州市百果园网络科技有限公司 Configuration information processing method, device, equipment and storage medium
CN113542022B (en) * 2021-07-06 2024-07-26 深圳市联洲国际技术有限公司 Networking management method and device of networking system, terminal equipment and storage medium
CN113535262B (en) * 2021-07-07 2024-03-26 曙光信息产业(北京)有限公司 Proxy node start control method, device, equipment and storage medium
CN113783734A (en) * 2021-09-22 2021-12-10 杭州安恒信息技术股份有限公司 Configuration data synchronization method, storage medium and related equipment
CN114245349A (en) * 2021-12-17 2022-03-25 中国电信股份有限公司 Service opening method, device, equipment and computer readable storage medium
CN114490889A (en) * 2022-01-25 2022-05-13 成都鼎桥通信技术有限公司 Configuration information processing method, device, equipment, medium and program product
CN114500272B (en) * 2022-02-17 2024-01-05 中国工商银行股份有限公司 Configuration information acquisition processing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364894B (en) * 2011-10-21 2017-04-12 中兴通讯股份有限公司 Issuing method for configuration data file and network management equipment
US10116521B2 (en) * 2015-10-15 2018-10-30 Citrix Systems, Inc. Systems and methods for determining network configurations using historical real-time network metrics data
CN109918109B (en) * 2019-03-12 2022-07-19 赛特斯信息科技股份有限公司 System and method for realizing software version smooth upgrading function aiming at SD-WAN system

Also Published As

Publication number Publication date
CN112217656A (en) 2021-01-12

Similar Documents

Publication Publication Date Title
CN112217656B (en) Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system
US10776104B2 (en) Systems and methods for tracking configuration file changes
CN110324169A (en) A kind of method and apparatus of interface management
EP2178033A1 (en) Populating a multi-relational enterprise social network with disparate source data
CN108228814A (en) Method of data synchronization and device
US20200059415A1 (en) Systems and methods for service mapping
CN112087379A (en) Service chain arranging method and device, storage medium and electronic device
US10680852B2 (en) Configuration of a managed device
CN110738038A (en) Contract text generation method, device, equipment and computer readable storage medium
CN113301171B (en) Digital mirror image construction method and system fusing multiple Internet of things data
CN110263581A (en) Contract signs method, system, terminal device and storage medium
CN111654399A (en) Networking method, device and equipment based on SD-WAN and storage medium
CN113315754A (en) Intelligent linkage method, device, equipment and medium for firewall of container visit
CN117675555A (en) Slave gateway configuration method, electronic device, and computer-readable storage medium
US20040204778A1 (en) Method for persisting SNMP MIB data in files
CN115883512A (en) DNS domain name processing method, device, system, equipment and medium
CN111831278A (en) Service element adaptive matching method and device, electronic equipment and storage medium
CN105071965A (en) Management system of network equipment
CN110008006B (en) Container-based big data tool deployment method and system
CN107493251A (en) A kind of method and terminal for logging in destination server
CN111447080B (en) Private network decentralization control method, device and computer readable storage medium
CN111090853B (en) Account management method, system, electronic equipment and storage medium
CN111125449B (en) Object information storage method, device and storage medium
US20200099788A1 (en) Context data management interface for contact center
CN113839792B (en) Network access configuration method and device, computer equipment and readable storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 332, 3 / F, Building 102, 28 xinjiekouwei street, Xicheng District, Beijing 100088

Applicant after: QAX Technology Group Inc.

Applicant after: Qianxin Wangshen information technology (Beijing) Co.,Ltd.

Address before: Room 332, 3 / F, Building 102, 28 xinjiekouwei street, Xicheng District, Beijing 100088

Applicant before: QAX Technology Group Inc.

Applicant before: LEGENDSEC INFORMATION TECHNOLOGY (BEIJING) Inc.

GR01 Patent grant
GR01 Patent grant