NETCONF batch configuration method, client, server and system

By extracting and manipulating reusable configuration data from the server during the NETCONF batch configuration process, the problems of configuration data redundancy and resource consumption are solved, achieving efficient and convenient batch configuration that is applicable to different YANG model data.

CN122053384APending Publication Date: 2026-05-15FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
Filing Date
2026-03-10
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

NETCONF batch configuration suffers from issues such as redundant configuration data being transmitted repeatedly, large configuration messages consuming excessive resources, and a lack of versatility.

Method used

The client sends a batch configuration message to the server. The server extracts reusable configuration data from the specified data area and performs corresponding operations on the reusable configuration data according to the batch configuration message before applying it to other configuration objects in batches. These operations include direct copying, modifying nodes and copying, and pruning subtrees and copying.

Benefits of technology

It reduces the transmission and processing of redundant configuration data, lowers the consumption of bandwidth and device data processing resources, and is universal, suitable for batch configuration of different YANG model data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122053384A_ABST
    Figure CN122053384A_ABST
Patent Text Reader

Abstract

The invention discloses an NETCONF batch configuration method, a client, a server and a system, and relates to the technical field of network equipment management. The NETCONF batch configuration method comprises the following steps: a server receives a batch configuration message sent by a client; extracting reusable configuration data from a specified data area of the server according to the received batch configuration message; and performing corresponding operation on the extracted reusable configuration data according to the batch configuration message, and then applying the reusable configuration data to other configuration objects in batches. The method can effectively solve the problems that in the NETCONF batch configuration process, configuration data is redundant and repeatedly transmitted, a configuration message is large, too many resources need to be consumed, and universality is not achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network device management technology, specifically to a NETCONF batch configuration method, client, server, and system. Background Technology

[0002] NETCONF (Network Configuration Protocol) is a network configuration management protocol. It establishes a session between the network administrator or controller (NETCONF client) and the managed network device (NETCONF server). The client uses Remote Procedure Calls (RPC) and a data protocol based on Extensible Markup Language (XML) to configure and manage the server. Figure 1 As shown.

[0003] The NETCONF protocol defines a series of datastores and operations for manipulating configuration data. The relevant datastores and operations include: Running data area <running>Used to save the currently active configuration data of the device; Candidate data area <candidate>: Used to cache the configuration data currently being edited by the client. The configuration data in the candidate data area will not take effect immediately. It needs to wait for the client to perform the submission operation and pass the verification before the data is copied to the running data area to take effect. Edit Configuration <edit-config>Edit configuration data; the target can be the running data area or the candidate data area. submit <commit>Submit the contents of the candidate data area to the running data area.

[0004] The NETCONF protocol uses YANG as its data modeling language. Configuration data in NETCONF messages and data areas are modeled as data trees using YANG. The configuration data of a certain object in the device corresponds to a configuration data instance composed of leaf nodes or subtrees in the data tree.

[0005] Currently, when network administrators or controllers configure network devices via NETCONF / YANG, they typically use the ietf-netconf module. <edit-config>Edit configuration data in a specified datastore area of ​​the device. <edit-config>For the process of performing batch configuration, please refer to [link / reference]. Figure 2 As shown. <edit-config>The operation can include multiple configuration data and supports batch configuration of multiple objects on the device, but in actual use, this operation has the following problems: (1) Use <edit-config>When configuring multiple objects in batches, the configuration data of each object is independently encoded. When a large number of objects on the device have the same or similar configurations, a large amount of identical configuration data is repeatedly transmitted and processed. (2) In <edit-config>In the configuration message, the configuration data is encoded in XML. Although XML encoding has many advantages in terms of data readability, scalability, and compatibility, its structured tag design produces information redundancy, resulting in a large configuration message size. This requires more bandwidth and device data processing resources, and this problem is more obvious in batch configuration scenarios. (3) Some YANG modules can reuse the same configuration data through templates for specific functions, but this solution can only solve the batch configuration problem of a single functional module and does not have universality.

[0006] Therefore, how to overcome the shortcomings of the existing technology is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0007] The purpose of this invention is to provide a NETCONF batch configuration method, client, server, and system, which can effectively solve the problems of redundant configuration data and repeated transmission, large configuration messages that consume too many resources, and lack of universality in the NETCONF batch configuration process.

[0008] To achieve the above objectives, in a first aspect, embodiments of the present invention provide a NETCONF batch configuration method, the method comprising: a client sending a batch configuration message to a server; the batch configuration message being used by the server to extract reusable configuration data from a specified data area of ​​the server according to the batch configuration message, and to batch apply the reusable configuration data to other configuration objects after performing corresponding operations on the reusable configuration data according to the batch configuration message.

[0009] In conjunction with the first aspect, in one implementation, the batch configuration message sent by the client to the server includes a batch configuration message for direct copying; the batch configuration message for direct copying carries parameters including: configuration data source, data instance source, configuration data target, and target data instance.

[0010] In conjunction with the first aspect, in one implementation, the batch configuration message sent by the client to the server includes a batch configuration message for modifying and copying nodes; the batch configuration message for modifying and copying nodes carries parameters including: configuration data source, data instance source, configuration data target, target data instance, and modified node information.

[0011] In conjunction with the first aspect, in one implementation, the batch configuration message sent by the client to the server includes a batch configuration message for pruning and copying subtrees; the batch configuration message for pruning and copying subtrees carries parameters including: configuration data source, data instance source, configuration data target, target data instance, and information on the pruned subtree.

[0012] In conjunction with the first aspect, in one implementation, the method further includes a capability negotiation process: after the client and the server establish a NETCONF session, they perform batch configuration capability negotiation.

[0013] Secondly, embodiments of the present invention also provide a NETCONF batch configuration method, the method comprising: a server receiving a batch configuration message sent by a client; extracting reusable configuration data from a specified data area of ​​the server according to the batch configuration message; and performing corresponding operations on the reusable configuration data according to the batch configuration message and then applying it in batches to other configuration objects.

[0014] In conjunction with the second aspect, in one implementation, the batch configuration message carries parameters including: configuration data source and data instance source; the server extracts a specified instance of reusable configuration data from a specified data area of ​​the server based on the configuration data source and data instance source carried in the batch configuration message.

[0015] In conjunction with the second aspect, in one implementation, when the batch configuration message received by the server is a batch configuration message for direct copying, the batch configuration message for direct copying also carries parameters: configuration data target and target data instance; After performing corresponding operations on the reusable configuration data according to the batch configuration message, the server applies it to other configuration objects in batches. This includes: the server traversing each target data instance in the batch configuration message and performing the following operations for each target data instance: directly copying the extracted reusable configuration data to the current target data instance; and writing the generated new target data instance into the configuration data target specified in the batch configuration message.

[0016] In conjunction with the second aspect, in one implementation, when the batch configuration message received by the server is a batch configuration message for modifying and copying nodes, the batch configuration message for modifying and copying nodes also carries parameters: configuration data target, target data instance, and modified node information. After the server performs corresponding operations on the reusable configuration data according to the batch configuration message, it applies the data to other configuration objects in batches. This includes: the server traversing each target data instance in the batch configuration message and performing the following operations for each target data instance: modifying the extracted reusable configuration data according to the node information modified in the batch configuration message and copying it to the current target data instance; and writing the generated new target data instance into the configuration data target specified in the batch configuration message.

[0017] In conjunction with the second aspect, in one implementation, when the batch configuration message received by the server is a batch configuration message for pruning and copying subtrees, the batch configuration message for pruning and copying subtrees also carries parameters: configuration data target, target data instance, and information on the pruned subtrees; After performing corresponding operations on the reusable configuration data according to the batch configuration message, the server applies it to other configuration objects in batches. This includes: the server traversing each target data instance in the batch configuration message and performing the following operations for each target data instance: pruning the extracted reusable configuration data according to the pruning subtree information in the batch configuration message and copying it to the current target data instance; and writing the generated new target data instance into the configuration data target specified in the batch configuration message.

[0018] In conjunction with the second aspect, in one implementation, the method further includes a capability negotiation process: after the server and client establish a NETCONF session, they perform batch configuration capability negotiation.

[0019] Thirdly, embodiments of the present invention also provide a client for implementing the method in the first aspect embodiment, the client including a batch configuration message sending module; The batch configuration message sending module is used to: send a batch configuration message to the server; the batch configuration message is used by the server to extract reusable configuration data from a specified data area of ​​the server according to the batch configuration message, and to apply the reusable configuration data to other configuration objects in batches after performing corresponding operations on the reusable configuration data according to the batch configuration message.

[0020] Fourthly, embodiments of the present invention also provide a server for implementing the method in the second aspect embodiment, the server including a batch configuration message receiving module, a reusable configuration data extraction module, and a batch application module; The batch configuration message receiving module is used to: receive batch configuration messages sent by the client; the reusable configuration data extraction module is used to: extract reusable configuration data from a specified data area on the server according to the batch configuration message; the batch application module is used to: perform corresponding operations on the reusable configuration data according to the batch configuration message and then apply it in batches to other configuration objects.

[0021] Fifthly, embodiments of the present invention also provide a NETCONF batch configuration system, which includes a client as described in the third aspect embodiment and a server as described in the fourth aspect embodiment.

[0022] The beneficial effects of the technical solutions provided in this application include: This application embodiment addresses the issue of batch configuration when a device contains a large amount of identical or similar configuration data. It employs a method of reusing existing configuration data from the NETCONF server's data area. Specifically, the client can send batch configuration messages to the server based on specific configuration requirements. By utilizing the various parameters carried in these messages, the server can extract reusable configuration data from a designated data area. After performing corresponding operations on the reusable configuration data according to the batch configuration messages, the generated new configuration data is applied in batches to other configuration objects. This avoids the transmission and processing of large amounts of redundant configuration data, reducing the consumption of bandwidth and device data processing resources. Furthermore, this batch configuration method is universal; its implementation is independent of device type, functional characteristics, and business model, and can be used for batch configuration of data from different YANG models. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of a network management architecture based on NETCONF; Figure 2 For use in existing technology <edit-config>A flowchart illustrating the process of batch configuration. Figure 3 This is a flowchart illustrating an embodiment of the NETCONF batch configuration method of the first aspect of this application; Figure 4 This is a schematic diagram of a data tree corresponding to reusable configuration data in an example; Figure 5 This is an example illustrating how reusable configuration data is directly copied and applied to other configuration objects. Figure 6 This is an example illustrating how reusable configuration data can be modified and copied to other configuration objects. Figure 7 This is an example illustrating how reusable configuration data is trimmed and copied to other configuration objects. Figure 8 This is a flowchart illustrating yet another embodiment of the NETCONF batch configuration method according to the first aspect of this application; Figure 9 This is a schematic diagram illustrating the capability negotiation process between the client and the server in an embodiment of this application. Figure 10 This is a flowchart illustrating an embodiment of the NETCONF bulk configuration method of the second aspect of this application; Figure 11 This is a flowchart illustrating the method of this application when the batch configuration message is a batch configuration message used for direct copying, as an example. Figure 12 This is a flowchart illustrating the method of this application when the batch configuration message is a batch configuration message used to modify and copy nodes, as an example. Figure 13 This is a flowchart illustrating the method of this application when the batch configuration message is a batch configuration message used for pruning and copying subtrees in an example. Figure 14 This is a flowchart illustrating yet another embodiment of the NETCONF bulk configuration method according to the second aspect of this application; Figure 15 This is a schematic diagram of the functional modules of a client embodiment of this application; Figure 16 This is a schematic diagram of the functional modules of another embodiment of the client in this application; Figure 17 This is a schematic diagram of the functional modules of one embodiment of the server in this application; Figure 18 This is a schematic diagram of the functional modules of another embodiment of the server in this application; Figure 19 This is a schematic diagram of an embodiment of the NETCONF batch configuration system of this application. Detailed Implementation

[0024] To make the technical problems, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] However, it should be noted that the examples described below are merely specific examples and are not intended to limit the embodiments of the present invention to the specific steps, values, conditions, data, order, etc. Those skilled in the art can utilize the concept of the present invention to construct more embodiments not mentioned in this specification by reading this specification. However, all other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0026] Firstly, embodiments of this application provide a NETCONF batch configuration method.

[0027] In one embodiment, reference is made to Figure 3 , Figure 3 This is a flowchart illustrating an embodiment of the NETCONF batch configuration method according to the first aspect of this application. Figure 3 As shown, a NETCONF batch configuration method includes: Step A1: The client sends a batch configuration message to the server. The batch configuration message is used by the server to extract reusable configuration data from the server's specified data area according to the batch configuration message, and then apply the reusable configuration data to other configuration objects in batches after performing corresponding operations on the reusable configuration data according to the batch configuration message.

[0028] It can be understood that, in order to effectively solve the problems of redundant configuration data and repeated transmission, large configuration messages consuming excessive resources, and lack of universality in the NETCONF batch configuration process, this application embodiment is specifically designed to achieve batch configuration by reusing existing configuration data in the NETCONF server data area when the device contains a large amount of identical or similar configuration data. Specifically, the client can send a batch configuration message to the server according to specific configuration requirements. Through the various parameter information carried in the batch configuration message, the server can extract reusable configuration data from a specified data area on the server according to the parameter information in the message. After performing corresponding operations on the reusable configuration data according to the batch configuration message (such as directly copying / modifying nodes and copying / pruning subtrees and copying), the generated new configuration data is applied to other configuration objects in batches. This avoids the transmission and processing of a large amount of redundant configuration data and reduces the consumption of bandwidth and device data processing resources by configuration operations. Furthermore, this batch configuration method is universal; the implementation scheme is independent of device type, functional characteristics, and business model, and can be used for batch configuration of data from different YANG models.

[0029] Furthermore, in some possible implementations, the batch configuration messages sent by the client to the server may include: batch configuration messages for direct copying, batch configuration messages for modifying nodes and copying, and batch configuration messages for pruning subtrees and copying.

[0030] When the batch configuration message sent by the client to the server is a batch configuration message for direct copying, the message carries parameters including: configuration data source, data instance source, configuration data target, and target data instance. The configuration data source indicates how to extract reusable configuration data from a specified data area on the server. In this embodiment, the specified data area for extracting reusable configuration data may include a candidate data area (…). <candidate>), running data area ( <running>) and data storage area ( <startup>The data instance source is used to indicate an instance of reusable configuration data. For example, to select the VLAN configuration of vlan-sub-interface.1 in the data area as the data instance source, its VLAN configuration instance can be identified using the following XPath expression: / interfaces / interface[name="vlan-sub-interface.1"] / inline-frame-processing. The configuration data target is used to indicate the target data area to which the data is applied (edited). Similarly, the target data areas supported in this embodiment include candidate data areas (... <candidate>), running data area ( <running>) and data storage area ( <startup>The target data instance is used to indicate one or more object instances that are the targets of the application. For example, to apply extracted reusable configuration data in batches to two target object instances, vlan-sub-interface.2 and vlan-sub-interface.3, the following XPath expression can be used to identify both target data instances simultaneously: / interfaces / interface[name="vlan-sub-interface.2" or name="vlan-sub-interface.3"].

[0031] Accordingly, after receiving the batch configuration message sent by the client for direct copying, the server can extract reusable configuration data from the specified data area of ​​the server according to the parameters carried in the message, and directly copy the reusable configuration data according to the batch configuration message. Then, the generated new configuration data is applied to other configuration objects in batches, thereby realizing efficient and convenient NETCONF batch configuration.

[0032] When a client sends a batch configuration message to the server for modifying and copying nodes, the message carries parameters including: configuration data source, data instance source, configuration data target, target data instance, and the node information to be modified. The modified node information indicates the path of the node to be modified in the configuration tree and its modified value. For example, the following XPath expression can be used to identify the path of the node to be modified in the configuration tree: / interfaces / [1] / [2] / [1] / / [3] / / [2] / [2]. In this expression, " [1] indicates matching the first child node among all child nodes of the parent node. If the parent node has only one child node, it can be omitted. The subsequent index. It's understandable that since the modified node information only needs to express the node's position in the configuration data tree, without needing to parse the parameter meanings, this method reduces the size of the configuration message and effectively avoids consuming excessive bandwidth and device data processing resources.

[0033] Accordingly, after receiving the batch configuration message from the client for modifying and copying nodes, the server can extract reusable configuration data from the specified data area on the server according to the parameters carried in the message. Then, it modifies and copies the reusable configuration data according to the batch configuration message, and applies the generated new configuration data in batches to other configuration objects, thereby achieving efficient and convenient NETCONF batch configuration. It should be noted that the "modifying and copying nodes" described in this article refers to both modifying and copying the reusable configuration data; the specific order of operations is not limited. In practice, the reusable configuration data can be modified first, and then the modified configuration data can be copied to generate new configuration data; alternatively, the reusable configuration data can be copied first, and then the modified configuration data can be modified to generate new configuration data. Similarly, the "pruning subtrees and copying" described below follows the same principle.

[0034] When a client sends a batch configuration message to the server for pruning and copying subtrees, the message carries parameters including: configuration data source, data instance source, configuration data target, target data instance, and information about the subtree to be pruned. The subtree information indicates the path of the node to be pruned in the configuration tree and specifies the deletion of that node and its subtrees.

[0035] Accordingly, after receiving the batch configuration message from the client for pruning and copying subtrees, the server can extract reusable configuration data from the specified data area of ​​the server according to the parameters carried in the message. After pruning and copying the reusable configuration data according to the batch configuration message, the newly generated configuration data is applied to other configuration objects in batches, thereby achieving efficient and convenient NETCONF batch configuration.

[0036] For example, taking the VLAN sub-interface object commonly found in OLT devices as an example, the reuse logic and the batch configuration messages sent by the client in this embodiment will be specifically explained.

[0037] Assuming this example involves 5 VLAN sub-interfaces, their corresponding names and VLAN rules are shown in Table 1 below: Table 1 VLAN sub-interface name VLAN rules vlan-sub-interface.1 Ingress rule: Allow untagged Ethernet packets to enter the interface and add a VLAN tag, where the VLAN-ID is 100 and the pbit is 0. Egress rule: Remove one VLAN tag. vlan-sub-interface.2 Same as vlan-sub-interface.1 vlan-sub-interface.3 Same as vlan-sub-interface.1 vlan-sub-interface.4 Ingress rule: Allow untagged Ethernet packets to enter the interface and add a VLAN tag, where the VLAN-ID is 400 and the pbit is 1. Egress rule: Remove a VLAN tag. vlan-sub-interface.5 Ingress rule: Allow untagged Ethernet packets to enter the interface and add a VLAN tag, where the VLAN-id is 100 and the pbit is 0. Egress rule: No processing. For the configuration in the example above, the VLAN configuration of sub-interface vlan-sub-interface.1 can be used as reusable configuration data. The data tree corresponding to the configuration data of sub-interface vlan-sub-interface.1 can be found in [reference needed]. Figure 4 As shown. Figure 4 As shown, the configuration tree starts from the root node "interfaces" and lists the configuration data nodes of the interface from top to bottom. The green nodes are leaf nodes containing values, and the other nodes are the root nodes and intermediate nodes used to identify the hierarchical structure of the configuration tree.

[0038] Therefore, the multiplexing logic for reusing the VLAN configuration of sub-interface vlan-sub-interface.1 to the other four VLAN sub-interfaces can be as follows: (1) For sub-interfaces vlan-sub-interface.2 and vlan-sub-interface.3, the VLAN configuration of sub-interface vlan-sub-interface.1 can be directly copied to the corresponding locations of vlan-sub-interface.2 and vlan-sub-interface.3. For example, the subtree of the VLAN configuration of vlan-sub-interface.1 can be copied to the following location of the configuration tree of vlan-sub-interface.2: / interfaces / interface[name="vlan-sub-interface.2"] / inline-frame-processing; the configuration tree of vlan-sub-interface.2 after copying can be found in [reference]. Figure 5 As shown. The client can implement this reuse logic by sending a bulk configuration message for direct copying. For example, the bulk configuration message for direct copying can be sent as follows: <?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:fh-bc="urn:fh:yang:batch-config" message-id="1"> <batch-config xmlns="urn:fh:yang:batch-config"> <source> <!--Select the operation data area as the configured data source--> <running / > <!--Select the VLAN configuration of vlan-sub-interface.1 as the data instance source--> <instance> / interfaces / interface[name="vlan-sub-interface.1"] / inline-frame-processing< / instance> <target> <!--Select the candidate data area as the configuration data target--> <candidate / > <instance> <!--Configure the xpath expression to specify 2 VLAN sub-interfaces as the target data instances--> <path> / interfaces / interface[name="vlan-sub-interface.2" or name="vlan-sub-interface.3"]< / path> < / instance> < / target> < / rpc> (2) For sub-interface vlan-sub-interface.4, the values ​​of vlan-id and write-pbit leaf nodes in the VLAN configuration of sub-interface vlan-sub-interface.1 can be modified accordingly and copied to the corresponding locations in vlan-sub-interface.4. The configuration tree of vlan-sub-interface.4 after modification and copying can be found in [reference needed]. Figure 6 As shown. The client can implement this reuse logic by sending a batch configuration message for modifying nodes and replicating them. For example, the batch configuration message for modifying nodes and replicating them could be as follows: <?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:fh-bc="urn:fh:yang:batch-config" message-id="1"> <batch-config xmlns="urn:fh:yang:batch-config"> <source> <!--Select the running data area as the configuration data source--> <running / > <!--Select the VLAN configuration of vlan-sub-interface.1 as the data instance source--> <instance> / interfaces / interface[name="vlan-sub-interface.1"] / inline-frame-processing< / instance> <target> <!--Select the candidate data area as the configuration data target--> <candidate / > <instance> <!--Configure the xpath expression to specify vlan-sub-interface.4 as the target data instance--> <path> / interfaces / interface[name="vlan-sub-interface.4"]< / path> <modification> <!--Configure the path of the vlan-id node in the configuration tree and the modified value--> <node-path> / interfaces / [1] / [2] / [1] / / [3] / / [2] / [2] <altered-value> 400< / altered-value> < / modification> <modification> <!--Configure the path of the write-pbit node in the configuration tree and the modified value--> <node-path> / interfaces / [1] / [2] / [1] / / [3] / / [2] / [3] <altered-value> 1< / altered-value> < / modification> < / instance> < / target> < / rpc> (3) For sub-interface vlan-sub-interface.5, the egress-rewrite node and its subtree in the VLAN configuration of sub-interface vlan-sub-interface.1 can be pruned and copied to the corresponding location in vlan-sub-interface.5. The configuration tree of vlan-sub-interface.5 after pruning and copying can be found in [reference needed]. Figure 7 As shown. The client can implement this reuse logic by sending a batch configuration message for pruning and copying subtrees. For example, the batch configuration message for pruning and copying subtrees could be as follows: <?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:fh-bc="urn:fh:yang:batch-config" message-id="1"> <batch-config xmlns="urn:fh:yang:batch-config"> <source> <!--Select the running data area as the configured data source--> <running / > <!--Select the VLAN configuration of vlan-sub-interface.1 as the data instance source--> <instance> / interfaces / interface[name="vlan-sub-interface.1"] / inline-frame-processing< / instance> <target> <candidate / > <instance> <!--Configure the xpath expression to specify vlan-sub-interface.5 as the target data instance--> <path> / interfaces / interface[name="vlan-sub-interface.5"]< / path> <modification> <!--Configure the path of the egress-rewrite node in the configuration tree and specify to delete the node and its subtree--> <node-path> / interfaces / [1] / [2] / [2] <delete-node / > < / modification> < / instance> < / target> < / rpc> By following the steps described above, the client-side processing of NETCONF batch configuration can be completed. As can be seen from the above, this embodiment, when the device contains a large amount of identical or similar configuration data, reuses existing configuration data in the NETCONF server data area. New configuration data is generated directly or after minor adjustments (modification or trimming), and then applied in batches to other configuration objects. This avoids the transmission and processing of large amounts of redundant configuration data, reduces the consumption of bandwidth and device data processing resources by configuration operations, and effectively solves the problems of redundant configuration data and repeated transmission, large configuration messages consuming excessive resources, and lack of universality in existing NETCONF batch configuration processes.

[0039] In another embodiment, to ensure that both the client and server are devices that support NETCONF batch configuration in actual applications, thereby guaranteeing the normal implementation of the batch configuration function, the NETCONF batch configuration method in this embodiment also includes a capability negotiation process. (See also...) Figure 8 , Figure 8 This is a flowchart illustrating yet another embodiment of the NETCONF batch configuration method according to the first aspect of this application. Figure 8 As shown, a NETCONF batch configuration method also includes: Step A0: After the client and server establish a NETCONF session, they negotiate batch configuration capabilities.

[0040] Furthermore, such as Figure 9 As shown, in some possible implementations, after the client and server establish a NETCONF session, they perform batch configuration capability negotiation, which may include: Step 901: The client and server establish a NETCONF session; Step 902, Client sends <hello>The message announces the batch configuration capabilities it supports. Step 903: The client receives the data sent by the server. <hello>The message retrieves the batch configuration capabilities supported by the server.

[0041] It is understood that this embodiment defines the NETCONF batch configuration method (function) through the newly added YANG module, for example, defined by the newly added fh-batch-config.yang module. If the client supports the NETCONF batch configuration method, it will send... <hello>The message announces that it supports the newly added YANG module. Similarly, it can also be sent via the server. <hello>The message retrieves the batch configuration capabilities supported by the server. If both sides support batch configuration capabilities, the client can use the batch configuration operations defined by the newly added YANG module in this NETCONF session. <batch-config>.

[0042] Exemplarily, the newly added fh-batch-config.yang module can be specifically defined as follows: module fh-batch-config { yang-version 1.1; namespace "urn:fh:yang:batch-config"; prefix fh-bc; import ietf-yang-types { prefix yang; } import ietf-netconf { prefix nc; } organization "Fiberhome."; revision 2025-03-12 { description "Initial revision."; } rpc batch-config { description "Batch configuration."; input { container source { description "The source configuration."; choice datastore { mandatory true; description "The source configuration datastore."; leaf candidate { if-feature "nc:candidate"; type empty; description "The candidate configuration."; } leaf running { if-feature "nc:writable-running"; type empty; description "The running configuration."; } leaf startup { if-feature "nc:startup"; type empty; description "The startup configuration."; } } leaf instance { description "Instance of configuration data."; type instance-identifier { require-instance "true"; } } } container target { description "Configuration target."; choice datastore { mandatory true; description "The target configuration datastore."; leaf candidate { if-feature "nc:candidate"; type empty; description "The candidate configuration."; } leaf running { if-feature "nc:writable-running"; type empty; description "The running configuration."; } } list instance { description "List of instance to be configed."; key path; leaf path { description "Xpath to the instance."; type yang:xpath1.0; mandatory true; } list modification { description "List of modification to configuration."; key node-path; leaf node-path { description "Schema node path."; type yang:xpath1.0; } choice method { leaf altered-value { description "Altered value of the node."; type string; } leaf delete-node { description "Delete node and its subtree."; type empty; } } } } } } } } It should be noted that steps 902 and 903 above do not have a specific order requirement. Figure 9 This is just one example. And in practical applications, <hello>Please refer to the following for the specific content and format of the message: <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <capabilities> <capability> urn:ietf:params:netconf:base:1.1 < / capability> <capability> <!-- Support batch configuration ability --> urn:fiberhome:yang:batch-config < / capability> < / capabilities> <!-- Session ID shall be carried in server-side messages. --> <session-id> 4< / session-id> < / hello> Secondly, embodiments of this application also provide a NETCONF batch configuration method.

[0043] In one embodiment, reference is made to Figure 10 As shown, Figure 10 This is a flowchart illustrating an embodiment of the NETCONF bulk configuration method according to the second aspect of this application. Figure 10 As shown, a NETCONF batch configuration method includes: Step B1: The server receives the batch configuration message sent by the client.

[0044] For details regarding the batch configuration messages sent by the client, please refer to the detailed description in the first section; it will not be repeated here.

[0045] Step B2: The server extracts reusable configuration data from the designated data area of ​​the server according to the batch configuration message.

[0046] Specifically, the server can extract a specified instance of reusable configuration data from a specified data area on the server based on the configuration data source parameters and data instance source parameters carried in the batch configuration message.

[0047] For example, taking the VLAN sub-interface object corresponding to Table 1 in the first aspect as an example, the server can extract the configuration data instance of sub-interface vlan-sub-interface.1 from the server's runtime data area based on the configuration data source and data instance source carried in the batch configuration message, and use it as reusable configuration data. The extracted VLAN configuration of sub-interface vlan-sub-interface.1 can be as follows (only the VLAN configurations relevant to the example are listed, and other irrelevant configurations are omitted): <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name> vlan-sub-interface.1< / name> <!-- Only the interface VLAN configuration is listed here, other configurations are omitted. --> <inline-frame-processing xmlns="urn:bbf:yang:bbf-sub-interfaces"> <ingress-rule> <rule> <name> defaut-vlan< / name> <flexible-match> <match-criteria xmlns="urn:bbf:yang:bbf-sub-interface-tagging"> <untagged / > < / match-criteria> < / flexible-match> <ingress-rewrite> <push-tag xmlns="urn:bbf:yang:bbf-sub-interface-tagging"> <index> 0< / index> <dot1q-tag> <tag-type xmlns:bbf-dot1qt="urn:bbf:yang:bbf-dot1q-types"> bbf-dot1qt:s-vlan< / tag-type> <vlan-id> 100< / vlan-id> <write-pbit> 0< / write-pbit> < / dot1q-tag> < / push-tag> < / ingress-rewrite> < / rule> < / ingress-rule> <egress-rewrite> <pop-tags xmlns="urn:bbf:yang:bbf-sub-interface-tagging"> 1< / pop-tags> < / egress-rewrite> < / inline-frame-processing> < / interface> < / interfaces> The data tree corresponding to the above configuration data can be found at [link to relevant documentation]. Figure 4 As shown.

[0048] Step B3: The server performs the corresponding operations on the reusable configuration data according to the batch configuration message and then applies it to other configuration objects in batches.

[0049] Furthermore, in some possible implementations, when the batch configuration message received by the server is a batch configuration message for direct replication, step B3 specifically includes: The server iterates through each target data instance in the batch configuration message and performs the following operations for each target data instance: directly copies the reusable configuration data extracted in step B2 to the current target data instance; and writes the generated new target data instance into the configuration data target specified in the batch configuration message.

[0050] It is understood that, according to the NETCONF protocol, the operable data area can be any one of the candidate data area, the running data area, and the saved data area. The configuration data target (data area) in this embodiment also supports candidate data areas, running data areas, and saved data areas. Specifically, when the specified configuration data target is a candidate data area, step B3 further includes: the server receiving a message from the client performing a commit operation (i.e.,...) <commit>After receiving the message, the configuration of the candidate data area is copied to the running data area to make the configuration effective.

[0051] To better understand the above content, the following example, using the VLAN sub-interface object corresponding to Table 1 in the first aspect, illustrates the application scenario where the batch configuration message is a batch configuration message used for direct copying.

[0052] See Figure 11 As shown, a NETCONF batch configuration method includes: Step 1101: The client sends a batch configuration message for direct copying. <batch-config>The message carries parameters including the configuration data source, data instance source, configuration data target, and target data instance. The configuration data source is set to the running data area, the data instance source is set to the VLAN configuration of vlan-sub-interface.1, the configuration data target is set to the candidate data area, and the target data instance is set to the two sub-interfaces vlan-sub-interface.2 and vlan-sub-interface.3. Correspondingly, the server receives the aforementioned batch configuration message from the client.

[0053] Step 1102: The server extracts the VLAN configuration of sub-interface vlan-sub-interface.1 from the server's running data area based on the configuration data source parameters and data instance source parameters carried in the batch configuration message.

[0054] Step 1103: The server iterates through the two target data instances vlan-sub-interface.2 and vlan-sub-interface.3 in the batch configuration message, and performs the following operations for each target data instance: directly copy the extracted VLAN configuration of vlan-sub-interface.1 to the current target data instance (vlan-sub-interface.2 / vlan-sub-interface.3); write the generated new target data instance (vlan-sub-interface.2 / vlan-sub-interface.3) into the candidate data area.

[0055] Step 1104: The server sends a message to the client in response to the batch configuration operation. <batch-config>success.

[0056] Step 1105: The client sends a message to the server. <commit>Message, submit configuration.

[0057] Step 1106: The server copies the configuration from the candidate data area to the running data area to make the configuration effective.

[0058] Step 1107: The server sends a message to the client and responds. <commit>Operation successful.

[0059] Furthermore, in some possible implementations, when the batch configuration message received by the server is a batch configuration message for modifying nodes and replicating, step B3 specifically includes: The server iterates through each target data instance in the batch configuration message and performs the following operations for each target data instance: Modify the reusable configuration data extracted in step B2 according to the node information modified in the batch configuration message and copy it to the current target data instance; Write the generated new target data instance into the configuration data target specified in the batch configuration message.

[0060] Similarly, when the specified configuration data target is a candidate data area, step B3 further includes: the server receiving a message from the client performing a commit operation (i.e., <commit>After receiving the message, the configuration of the candidate data area is copied to the running data area to make the configuration effective.

[0061] To better understand the above content, the following example, using the VLAN sub-interface object corresponding to Table 1 in the first aspect, illustrates the application scenario of batch configuration messages used to modify and replicate nodes.

[0062] See Figure 12 As shown, a NETCONF batch configuration method includes: Step 1201: The client sends a batch configuration message for modifying nodes and replicating them. <batch-config>This message carries parameters including the configuration data source, data instance source, configuration data target, target data instance, and modified node information. Specifically, the configuration data source is set to the running data area, the data instance source is set to the VLAN configuration of vlan-sub-interface.1, the configuration data target is set to the candidate data area, the target data instance is set to the vlan-sub-interface.4 sub-interface, and the modified node information includes the path and modified value of the vlan-id node and the write-pbit node in the configuration tree. Correspondingly, the server receives the aforementioned batch configuration message from the client.

[0063] Step 1202: The server extracts the VLAN configuration of sub-interface vlan-sub-interface.1 from the server's running data area based on the configuration data source parameters and data instance source parameters carried in the batch configuration message.

[0064] Step 1203: The server iterates through the target data instance vlan-sub-interface.4 in the batch configuration messages and performs the following operations for the target data instance: For the extracted vlan-sub-interface.1 VLAN configuration, modify the values ​​of the vlan-id node and write-pbit node according to the modified node information, and copy them to the current target data instance (vlan-sub-interface.4); Write the generated new target data instance (vlan-sub-interface.4) into the candidate data area.

[0065] Step 1204: The server sends a message to the client in response to the batch configuration operation. <batch-config>success.

[0066] Step 1205: The client sends a message to the server. <commit>Message, submit configuration.

[0067] Step 1206: The server copies the configuration from the candidate data area to the running data area to make the configuration effective.

[0068] Step 1207: The server sends a message to the client and responds. <commit>Operation successful.

[0069] Furthermore, in some possible implementations, when the batch configuration message received by the server is a batch configuration message for pruning and copying subtrees, step B3 specifically includes: The server iterates through each target data instance in the batch configuration message and performs the following operations for each target data instance: the reusable configuration data extracted in step B2 is pruned according to the subtree information in the batch configuration message and copied to the current target data instance; the generated new target data instance is written to the configuration data target specified in the batch configuration message.

[0070] Similarly, when the specified configuration data target is a candidate data area, step B3 further includes: the server receiving a message from the client performing a commit operation (i.e., <commit>After receiving the message, the configuration of the candidate data area is copied to the running data area to make the configuration effective.

[0071] To better understand the above content, the following example, using the VLAN sub-interface object corresponding to Table 1 in the first aspect, illustrates the application scenario of batch configuration messages used for pruning and copying subtrees.

[0072] See Figure 13 As shown, a NETCONF batch configuration method includes: Step 1301: The client sends a batch configuration message for pruning and copying subtrees. <batch-config>This message carries parameters including the configuration data source, data instance source, configuration data target, target data instance, and pruned subtree information. Specifically, the configuration data source is set to the running data area, the data instance source is set to the VLAN configuration of vlan-sub-interface.1, the configuration data target is set to the candidate data area, the target data instance is set to the vlan-sub-interface.5 sub-interface, and the pruned subtree information includes the path of the egress-rewrite node in the configuration tree and specifies the deletion of that node and its subtree. Correspondingly, the server receives the aforementioned batch configuration message from the client.

[0073] Step 1302: The server extracts the VLAN configuration of sub-interface vlan-sub-interface.1 from the server's running data area based on the configuration data source parameters and data instance source parameters carried in the batch configuration message.

[0074] Step 1303: The server iterates through the target data instance vlan-sub-interface.5 in the batch configuration messages and performs the following operations for the target data instance: For the extracted vlan-sub-interface.1 vlan configuration, the egress-rewrite node and its subtree are pruned according to the pruned subtree information and copied to the current target data instance (vlan-sub-interface.5); The newly generated target data instance (vlan-sub-interface.5) is written to the candidate data area.

[0075] Step 1304: The server sends a message to the client in response to the batch configuration operation. <batch-config>success.

[0076] Step 1305: The client sends a message to the server. <commit>Message, submit configuration.

[0077] Step 1306: The server copies the configuration from the candidate data area to the running data area to make the configuration effective.

[0078] Step 1307: The server sends a message to the client and responds. <commit>Operation successful.

[0079] Through the above steps, the server-side processing of NETCONF batch configuration can be completed. As can be seen from the above, this embodiment, when the device contains a large amount of identical or similar configuration data, reuses existing configuration data in the NETCONF server data area. New configuration data is generated directly or after minor adjustments (modification or trimming), and then applied in batches to other configuration objects. This avoids the transmission and processing of large amounts of redundant configuration data, reduces the consumption of bandwidth and device data processing resources by configuration operations, and effectively solves the problems of redundant configuration data and repeated transmission, large configuration messages consuming excessive resources, and lack of universality in existing NETCONF batch configuration processes.

[0080] In another embodiment, reference is made to Figure 14 , Figure 14 This is a flowchart illustrating yet another embodiment of the NETCONF bulk configuration method according to the second aspect of this application. Figure 14 As shown, a NETCONF batch configuration method further includes step B0 (capability negotiation process): after the server and client establish a NETCONF session, they perform batch configuration capability negotiation. This capability negotiation process ensures that both the client and server are devices that support NETCONF batch configuration in actual applications, thereby guaranteeing that the batch configuration function can be implemented normally. For the specific negotiation process, please refer to the relevant description in the first aspect of this application; for the sake of brevity, it will not be detailed here.

[0081] Thirdly, embodiments of this application also provide a client for implementing the method in the first aspect embodiment.

[0082] In one embodiment, reference is made to Figure 15 As shown, Figure 15 This is a schematic diagram of the functional modules of one embodiment of the client application of this application. Figure 15 As shown, a client includes a batch configuration message sending module.

[0083] The batch configuration message sending module is used to: send batch configuration messages to the server; the batch configuration messages are used by the server to extract reusable configuration data from a specified data area of ​​the server, and apply the reusable configuration data to other configuration objects in batches after performing corresponding operations on the reusable configuration data according to the batch configuration messages.

[0084] In another embodiment, reference is made to Figure 16 As shown, Figure 16 This is a schematic diagram of the functional modules of another embodiment of the client in this application. For example... Figure 16 As shown, a client also includes a capability negotiation module. This capability negotiation module is used to: after establishing a NETCONF session with the server, perform batch configuration capability negotiation.

[0085] It should be noted that the various variations and other specific examples of the method in the first aspect embodiment described above are also applicable to the client of this embodiment. Through the detailed description of the method described above, those skilled in the art can clearly understand the implementation method of the client in this embodiment. Therefore, for the sake of brevity, they will not be described in detail here.

[0086] Fourthly, embodiments of this application also provide a server for implementing the method in the second aspect embodiment.

[0087] In one embodiment, reference is made to Figure 17 As shown, Figure 17 This is a schematic diagram of the functional modules of one embodiment of the server-side software in this application. Figure 17 As shown, a server includes a batch configuration message receiving module, a reusable configuration data extraction module, and a batch application module.

[0088] The system includes a batch configuration message receiving module, used to receive batch configuration messages from the client; a reusable configuration data extraction module, used to extract reusable configuration data from a specified data area on the server according to the batch configuration messages; and a batch application module, used to perform corresponding operations on the reusable configuration data according to the batch configuration messages and then apply it in batches to other configuration objects.

[0089] In another embodiment, reference is made to Figure 18 As shown, Figure 18 This is a schematic diagram of the functional modules of another embodiment of the server in this application. Figure 18 As shown, a server-side application also includes a capability negotiation module. This capability negotiation module is used to: after establishing a NETCONF session with the client, perform batch configuration capability negotiation.

[0090] It should be noted that the various variations and other specific examples of the method in the second aspect embodiment described above are also applicable to the server in this embodiment. Through the detailed description of the method described above, those skilled in the art can clearly understand the implementation method of the server in this embodiment. Therefore, for the sake of brevity, they will not be described in detail here.

[0091] Fifthly, embodiments of the present invention also provide a NETCONF batch configuration system.

[0092] In one embodiment, reference is made to Figure 19 As shown, Figure 19 This is a schematic diagram of an embodiment of the NETCONF batch configuration system of this application. Figure 19 As shown, a NETCONF batch configuration system includes a client as described in the third aspect embodiment and a server as described in the fourth aspect embodiment.

[0093] Note: The specific embodiments described above are merely examples and not limitations. Those skilled in the art can combine and integrate some steps and devices from the various embodiments described separately above to achieve the effects of the present invention. Such combined and integrated embodiments are also included in the present invention, but will not be described one by one here.

[0094] The advantages, benefits, and effects mentioned in the embodiments of this invention are merely examples and not limitations. They should not be considered as essential features of each embodiment of this invention. Furthermore, the specific details disclosed in the embodiments of this invention are for illustrative and facilitative purposes only and are not limitations. These details do not restrict the embodiments of this invention from being implemented using these specific details.

[0095] The various operations in the embodiments of the present invention can be performed by any suitable means capable of performing the corresponding functions. Such means may include various hardware and / or software components and / or modules, including but not limited to hardware circuits or processors.

[0096] Those skilled in the art can make various changes, substitutions, and modifications to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.

[0097] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the invention. Therefore, the invention is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein. Furthermore, anything not described in detail in this specification is prior art well known to those skilled in the art.< / commit> < / commit> < / commit> < / commit> < / commit> < / commit> < / commit> < / commit> < / commit> < / hello> < / hello> < / hello> < / hello> < / hello> < / startup> < / running> < / candidate> < / startup> < / running> < / candidate> < / commit> < / candidate> < / running>

Claims

1. A method for batch configuration of NETCONF, characterized in that, The method includes: The client sends a batch configuration message to the server; the batch configuration message is used by the server to extract reusable configuration data from the server's specified data area according to the batch configuration message, and then apply the reusable configuration data to other configuration objects in batches after performing corresponding operations according to the batch configuration message.

2. The NETCONF batch configuration method as described in claim 1, characterized in that, The bulk configuration messages sent by the client to the server include bulk configuration messages for direct copying; The batch configuration message used for direct copying carries parameters including: configuration data source, data instance source, configuration data target, and target data instance.

3. The NETCONF batch configuration method as described in claim 1, characterized in that, The batch configuration messages sent by the client to the server include batch configuration messages for modifying nodes and replicating them; The batch configuration message used to modify and copy nodes carries parameters including: configuration data source, data instance source, configuration data target, target data instance, and modified node information.

4. The NETCONF batch configuration method as described in claim 1, characterized in that, The batch configuration messages sent by the client to the server include batch configuration messages for pruning and copying subtrees; The batch configuration message used for pruning and copying subtrees carries parameters including: configuration data source, data instance source, configuration data target, target data instance, and information about the pruned subtree.

5. The NETCONF batch configuration method as described in claim 1, characterized in that, The method also includes a capability negotiation process: after the client and server establish a NETCONF session, they perform batch configuration capability negotiation.

6. A method for batch configuration of NETCONF, characterized in that, The method includes: The server receives batch configuration messages from the client; Reusable configuration data is extracted from the specified data area of ​​the server according to the batch configuration message; After performing the corresponding operations on the reusable configuration data according to the batch configuration message, it is applied in batches to other configuration objects.

7. The NETCONF batch configuration method as described in claim 6, characterized in that, The batch configuration message carries parameters including: configuration data source and data instance source; The server extracts a specified instance of reusable configuration data from a specified data area on the server based on the configuration data source and data instance source carried in the batch configuration message.

8. The NETCONF batch configuration method as described in claim 7, characterized in that, When the batch configuration message received by the server is a batch configuration message for direct copying, the batch configuration message for direct copying also carries parameters: configuration data target and target data instance; After the server performs corresponding operations on the reusable configuration data according to the batch configuration message, it applies the data to other configuration objects in batches, including: The server iterates through each target data instance in the batch configuration message and performs the following operations for each target data instance: directly copies the extracted reusable configuration data to the current target data instance; and writes the generated new target data instance into the configuration data target specified in the batch configuration message.

9. The NETCONF batch configuration method as described in claim 7, characterized in that, When the batch configuration message received by the server is a batch configuration message for modifying and copying nodes, the batch configuration message for modifying and copying nodes also carries parameters: configuration data target, target data instance, and modified node information; After the server performs corresponding operations on the reusable configuration data according to the batch configuration message, it applies the data to other configuration objects in batches, including: The server iterates through each target data instance in the batch configuration message and performs the following operations for each target data instance: for the extracted reusable configuration data, it modifies the node information modified in the batch configuration message and copies it to the current target data instance; the generated new target data instance is written to the configuration data target specified in the batch configuration message.

10. The NETCONF batch configuration method as described in claim 7, characterized in that, When the batch configuration message received by the server is a batch configuration message for pruning and copying subtrees, the batch configuration message for pruning and copying subtrees also carries parameters: configuration data target, target data instance, and information on the pruned subtrees. After the server performs corresponding operations on the reusable configuration data according to the batch configuration message, it applies the data to other configuration objects in batches, including: The server iterates through each target data instance in the batch configuration message and performs the following operations for each target data instance: for the extracted reusable configuration data, it prunes the data according to the subtree information in the batch configuration message and copies it to the current target data instance; the server writes the generated new target data instance to the configuration data target specified in the batch configuration message.

11. The NETCONF batch configuration method as described in claim 6, characterized in that, The method also includes a capability negotiation process: after the server and client establish a NETCONF session, they perform batch configuration capability negotiation.

12. A client implementing the method of any one of claims 1 to 5, characterized in that, This client includes a batch configuration message sending module; The batch configuration message sending module is used to: send a batch configuration message to the server; the batch configuration message is used by the server to extract reusable configuration data from a specified data area of ​​the server according to the batch configuration message, and to apply the reusable configuration data to other configuration objects in batches after performing corresponding operations on the reusable configuration data according to the batch configuration message.

13. A server that implements the method of any one of claims 6 to 11, characterized in that, The server includes a batch configuration message receiving module, a reusable configuration data extraction module, and a batch application module; The batch configuration message receiving module is used to: receive batch configuration messages sent by the client; The reusable configuration data extraction module is used to: extract reusable configuration data from a specified data area on the server according to the batch configuration message; The batch application module is used to: perform corresponding operations on the reusable configuration data according to the batch configuration message and then apply it in batches to other configuration objects.

14. A NETCONF batch configuration system, characterized in that: The system includes the client as described in claim 12 and the server as described in claim 13.