











技术领域technical field
本申请涉及通信技术领域,特别涉及一种基于网络配置协议的设备配置方法及装置。The present application relates to the field of communication technologies, and in particular, to a device configuration method and apparatus based on a network configuration protocol.
背景技术Background technique
网络配置协议(英文:Network Configuration Protocol;缩写:NETCONF)是一种基于可扩展标记语言(英文:Extensible Markup Language;缩写:XML)的网络管理协议。NETCONF协议采用四层体系结构,包括:安全传输(英文:Secure Transport)层、消息(英文:Messages)层、操作(英文:Operations)层和内容(英文:Content)层。目前,NETCONF协议的安全传输层、消息层和操作层已经有标准来定义,但内容层尚未有标准的数据建模语言和相关的数据模型,这成为制约NETCONF协议真正普及应用的重要因素。Network Configuration Protocol (English: Network Configuration Protocol; Abbreviation: NETCONF) is a network management protocol based on Extensible Markup Language (English: Extensible Markup Language; Abbreviation: XML). The NETCONF protocol adopts a four-layer architecture, including: a secure transport (English: Secure Transport) layer, a message (English: Messages) layer, an operation (English: Operations) layer and a content (English: Content) layer. At present, the security transport layer, message layer and operation layer of the NETCONF protocol have been defined by standards, but there is no standard data modeling language and related data model for the content layer, which has become an important factor restricting the real popularization and application of the NETCONF protocol.
近年来,YANG(英文:Yet Another Next Generation)数据建模语言(英文:datamodeling language)被国际互联网工程任务组(英文:The Internet Engineering TaskForce;缩写:IETF)作为标准的NETCONF数据建模语言。它不仅可以建立配置数据的模型(英文:model configuration data),还可以建立各种操作和通知的模型,具有良好的可读性和可扩展性。目前,YANG语言可以对NETCONF协议的内容层、操作层和消息层进行数据建模。In recent years, YANG (English: Yet Another Next Generation) data modeling language (English: datamodeling language) has been adopted by the Internet Engineering Task Force (English: The Internet Engineering TaskForce; abbreviation: IETF) as the standard NETCONF data modeling language. It can not only build models of configuration data (English: model configuration data), but also models of various operations and notifications, with good readability and scalability. At present, the YANG language can model the content layer, operation layer and message layer of the NETCONF protocol.
NETCONF协议采用客户端/服务器(英文:Client/Server;缩写:C/S)架构。如图1所示,其示出了NETCONF与YANG的关系示意图。NETCONF客户端与NETCONF服务器之间基于NETCONF协议通信。NETCONF客户端使用YANG语言建立配置数据的模型,而后采用XML对建模后的配置数据进行编码得到XML文件,NETCONF客户端向NETCONF服务器下发的NETCONF消息中携带上述XML文件。NETCONF服务器从NETCONF客户端接收到NETCONF消息之后,对消息内容进行解析处理得到配置数据。The NETCONF protocol adopts a client/server (English: Client/Server; abbreviation: C/S) architecture. As shown in Figure 1, it shows a schematic diagram of the relationship between NETCONF and YANG. The communication between the NETCONF client and the NETCONF server is based on the NETCONF protocol. The NETCONF client uses the YANG language to build a model of configuration data, and then uses XML to encode the modeled configuration data to obtain an XML file. The NETCONF message sent by the NETCONF client to the NETCONF server carries the above XML file. After the NETCONF server receives the NETCONF message from the NETCONF client, it parses and processes the message content to obtain configuration data.
如图2所示,其示出了一种设备级联场景的示意图。网管设备21与被管理设备22相连,被管理设备22与若干个下级设备23相连。其中,网管设备21作为NETCONF客户端,被管理设备22作为NETCONF服务器,网管设备21与被管理设备22之间基于NETCONF协议通信。被管理设备22与下级设备23之间可基于任意的配置管理协议通信。例如,被管理设备22与下级设备23之间基于无线接入点的控制和配置协议(英文:Control And Provisioning ofWireless Access Points Protocol Specification;缩写:CAPWAP)通信。网管设备21通过NETCONF协议,配置被管理设备22和下级设备23配置。下级设备23不直接与网管设备21相连,而是通过CAPWAP接收被管理设备22发送的配置数据。被管理设备22接收网管设备21发送的配置数据,包括对被管理设备22的配置数据和下级设备23的配置数据。对于网管设备21下发的对下级设备23的配置数据,被管理设备22终结网管设备21下发的NETCONF消息,对消息内容进行解析处理得到配置数据,而后将配置数据重新封装为CAPWAP报文并发送至下级设备23。As shown in FIG. 2 , it shows a schematic diagram of a device cascading scenario. The network management device 21 is connected to the managed device 22 , and the managed device 22 is connected to several lower-level devices 23 . The network management device 21 acts as a NETCONF client, the managed device 22 acts as a NETCONF server, and the network management device 21 and the managed device 22 communicate based on the NETCONF protocol. Communication between the managed device 22 and the subordinate device 23 may be based on any configuration management protocol. For example, the communication between the managed device 22 and the subordinate device 23 is based on the Control And Provisioning of Wireless Access Points Protocol Specification (English: Control And Provisioning of Wireless Access Points Protocol Specification; abbreviation: CAPWAP). The network management device 21 configures the configuration of the managed device 22 and the subordinate device 23 through the NETCONF protocol. The lower-level device 23 is not directly connected to the network management device 21, but receives configuration data sent by the managed device 22 through CAPWAP. The managed device 22 receives the configuration data sent by the network management device 21 , including the configuration data for the managed device 22 and the configuration data for the lower-level device 23 . For the configuration data to the subordinate device 23 sent by the network management device 21, the managed device 22 terminates the NETCONF message sent by the network management device 21, parses the content of the message to obtain the configuration data, and then re-encapsulates the configuration data into a CAPWAP message and sends Sent to the lower-level device 23 .
对于上述图2所示的设备级联场景,在采用NETCONF协议进行配置管理时存在如下问题:在标准的NETCONF消息中,并没有体现配置数据与被配置设备之间的关系。也即,被管理设备22无法获知NETCONF消息中携带的配置数据是下发给哪个或哪些下级设备23的。为了解决上述问题,在现有技术中,通过在NETCONF消息中添加扩展字段,利用该扩展字段实现附加信息的传递。具体来讲,网管设备21向被管理设备22下发的NETCONF消息中包括内容字段和扩展字段。其中,内容字段按照YANG语言定义的数据模型,携带配置数据;扩展字段携带设备信息,该设备信息用于指示该NETCONF消息中的配置数据的目标下级设备。For the device cascading scenario shown in FIG. 2, the following problems exist when using the NETCONF protocol for configuration management: the standard NETCONF message does not reflect the relationship between the configuration data and the configured device. That is, the managed device 22 cannot know to which subordinate device or devices 23 the configuration data carried in the NETCONF message is delivered. In order to solve the above problems, in the prior art, an extension field is added to the NETCONF message, and the extension field is used to realize the transmission of additional information. Specifically, the NETCONF message delivered by the network management device 21 to the managed device 22 includes a content field and an extension field. The content field carries configuration data according to the data model defined by the YANG language; the extension field carries device information, and the device information is used to indicate the target subordinate device of the configuration data in the NETCONF message.
然而,上述现有技术至少存在如下技术问题:However, the above-mentioned prior art at least has the following technical problems:
1、由于需要在NETCONF消息中添加扩展字段,以增加私有的设备信息,导致网管设备和第三方供应商提供的被管理设备无法对接,方案的通用性较差;1. Due to the need to add an extension field in the NETCONF message to increase the private device information, the network management device and the managed device provided by the third-party supplier cannot be connected, and the generality of the solution is poor;
2、一条NETCONF消息中,只能携带对于某个下级设备的配置数据或者携带对于某些下级设备均相同的配置数据,不同的配置数据需要通过多条NETCONF消息分多次发送,导致配置处理的效率较低;2. A NETCONF message can only carry configuration data for a certain subordinate device or carry the same configuration data for some subordinate devices. Different configuration data needs to be sent multiple times through multiple NETCONF messages, resulting in configuration processing. less efficient;
3、被管理设备需要根据扩展字段,针对不同的下级设备生成多个不同的数据库,以分别存储相应的配置数据,导致保存数据的处理流程较为复杂。3. The managed device needs to generate a plurality of different databases for different subordinate devices according to the extension fields, so as to store corresponding configuration data respectively, which leads to a complicated processing flow for saving data.
发明内容SUMMARY OF THE INVENTION
为了解决现有技术中针对设备级联场景,采用在NETCONF消息中添加扩展字段的方式指示NETCONF消息中的配置数据的目标下级设备,所存在的方案的通用性较差、配置处理的效率较低、以及保存数据的处理流程较为复杂的问题,本申请实施例提供了一种基于网络配置协议的设备配置方法及装置。所述技术方案如下:In order to solve the device cascading scenario in the prior art, an extension field is added to the NETCONF message to indicate the target subordinate device of the configuration data in the NETCONF message. The existing solution has poor generality and low efficiency of configuration processing. , and the problem that the processing flow of saving data is relatively complex, the embodiments of the present application provide a device configuration method and device based on a network configuration protocol. The technical solution is as follows:
第一方面,提供了一种基于NETCONF协议的设备配置方法,该方法应用于网管设备中。网管设备与被管理设备相连,被管理设备与若干个下级设备相连,网管设备和被管理设备支持NETCONF协议。该方法包括:采用预定义YANG模型建立配置数据的模型;其中,预定义YANG模型中包括n个引用字段以及与每一个引用字段分别对应的若干个对象字段,引用字段用于指示在预定义YANG模型中被引用的YANG模型,第i个引用字段对应的对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据的目标下级设备和/或下级设备群组,下级设备群组是指由若干个下级设备构成的群组,1≤i≤n且i、n为正整数;基于NETCONF协议向被管理设备发送上述配置数据。In a first aspect, a device configuration method based on the NETCONF protocol is provided, and the method is applied to a network management device. The network management device is connected to the managed device, the managed device is connected to several lower-level devices, and the network management device and the managed device support the NETCONF protocol. The method includes: using a predefined YANG model to establish a model of configuration data; wherein, the predefined YANG model includes n reference fields and several object fields corresponding to each reference field respectively, and the reference fields are used to indicate that in the predefined YANG The YANG model referenced in the model, the object field corresponding to the i-th reference field is used to indicate the target subordinate device and/or subordinate device group of the target configuration data modeled by the YANG model referenced in the i-th reference field, the subordinate device A group refers to a group composed of several subordinate devices, 1≤i≤n and i, n are positive integers; the above configuration data is sent to the managed device based on the NETCONF protocol.
在第一方面的第一种可能的实施方式中,引用字段采用第一声明进行定义,第一声明用于在一个YANG模型中引用另一YANG模型所定义的模型树。In a first possible implementation manner of the first aspect, the reference field is defined using a first statement, and the first statement is used to reference a model tree defined by another YANG model in one YANG model.
结合第一方面或者第一方面的第一种可能的实施方式,在第一方面的第二种可能的实施方式中,对象字段采用leaf-list特性进行定义,leaf-list特性用于描述一组相同类型的叶子节点。With reference to the first aspect or the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, the object field is defined using the leaf-list property, and the leaf-list property is used to describe a group of Leaf nodes of the same type.
结合第一方面、第一方面的第一种可能的实施方式或者第一方面的第二种可能的实施方式,在第一方面的第三种可能的实施方式中,第i个引用字段对应的对象字段包括:若干个第一对象字段和/或若干个第二对象字段。每一个第一对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据所要下发至的一个下级设备。每一个第二对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据所要下发至的一个下级设备群组。With reference to the first aspect, the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, in the third possible implementation manner of the first aspect, the i-th reference field corresponds to The object fields include: several first object fields and/or several second object fields. Each first object field is used to indicate a subordinate device to which the target configuration data modeled by the YANG model referenced in the ith reference field is to be delivered. Each second object field is used to indicate a subordinate device group to which the target configuration data modeled by the YANG model referenced in the ith reference field is to be delivered.
第二方面,提供了一种基于NETCONF协议的设备配置方法,该方法应用于被管理设备中。被管理设备与网管设备相连,被管理设备还与若干个下级设备相连,网管设备和被管理设备支持NETCONF协议。该方法包括:接收网管设备基于NETCONF协议发送的配置数据;其中,配置数据由网管设备采用预定义YANG模型模型化;根据预定义YANG模型解析配置数据;根据解析得到的配置数据配置下级设备。In a second aspect, a device configuration method based on the NETCONF protocol is provided, and the method is applied to a managed device. The managed device is connected with the network management device, and the managed device is also connected with several subordinate devices. The network management device and the managed device support the NETCONF protocol. The method includes: receiving configuration data sent by a network management device based on the NETCONF protocol; wherein the configuration data is modeled by the network management device using a predefined YANG model; parsing the configuration data according to the predefined YANG model; configuring lower-level devices according to the parsed configuration data.
在第二方面的第一种可能的实施方式中,根据解析得到的配置数据配置下级设备,包括:对于第i个引用字段中引用的YANG模型模型化的目标配置数据,根据第i个引用字段对应的对象字段确定目标配置数据的目标下级设备,目标下级设备是指第i个引用字段对应的对象字段所指示的下级设备和/或下级设备群组中的下级设备;基于目标配置管理协议向目标下级设备发送目标配置数据,目标配置管理协议是被管理设备和目标下级设备支持的配置管理协议。In a first possible implementation manner of the second aspect, configuring the subordinate device according to the configuration data obtained by parsing includes: for the target configuration data modeled by the YANG model referenced in the ith reference field, according to the ith reference field The corresponding object field determines the target subordinate device of the target configuration data, and the target subordinate device refers to the subordinate device and/or the subordinate device in the subordinate device group indicated by the object field corresponding to the ith reference field; The target subordinate device sends target configuration data, and the target configuration management protocol is a configuration management protocol supported by the managed device and the target subordinate device.
结合第二方面或者第二方面的第一种可能的实施方式,在第二方面的第二种可能的实施方式中,根据预定义YANG模型解析配置数据之后,还包括:将解析得到的配置数据存储至同一配置数据库中。With reference to the second aspect or the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect, after parsing the configuration data according to the predefined YANG model, the method further includes: parsing the obtained configuration data stored in the same configuration database.
第三方面,提供了一种基于NETCONF协议的设备配置装置,该装置包括至少一个单元,该至少一个单元用于实现上述第一方面或者第一方面中任意一种可能的实施方式所提供的设备配置方法。In a third aspect, a device configuration device based on the NETCONF protocol is provided, the device includes at least one unit, and the at least one unit is configured to implement the first aspect or the device provided by any possible implementation manner of the first aspect configuration method.
第四方面,提供了一种基于NETCONF协议的设备配置装置,该装置包括至少一个单元,该至少一个单元用于实现上述第二方面或者第二方面中任意一种可能的实施方式所提供的设备配置方法。In a fourth aspect, a device configuration device based on the NETCONF protocol is provided, the device includes at least one unit, and the at least one unit is used to implement the second aspect or the device provided by any possible implementation manner of the second aspect configuration method.
第五方面,提供了一种基于NETCONF协议的设备配置系统,该系统包括:网管设备、被管理设备和若干个下级设备。其中,网管设备与被管理设备相连,被管理设备与若干个下级设备相连,网管设备和被管理设备支持NETCONF协议。网管设备包括如第三方面所述的设备配置装置;被管理设备包括如第四方面所述的设备配置装置。In a fifth aspect, a device configuration system based on the NETCONF protocol is provided, and the system includes: a network management device, a managed device, and several subordinate devices. The network management device is connected to the managed device, the managed device is connected to several subordinate devices, and the network management device and the managed device support the NETCONF protocol. The network management device includes the device configuration device according to the third aspect; the managed device includes the device configuration device according to the fourth aspect.
第六方面,提供了一种网管设备,该网管设备包括:处理器、存储器和收发器,存储器用于存储一个或者一个以上的指令,该指令被配置成由处理器执行,该指令用于实现上述第一方面或者第一方面中任意一种可能的实施方式所提供的设备配置方法。In a sixth aspect, a network management device is provided, the network management device includes: a processor, a memory, and a transceiver, the memory is used to store one or more instructions, the instructions are configured to be executed by the processor, and the instructions are used to implement The device configuration method provided by the first aspect or any possible implementation manner of the first aspect.
第七方面,提供了一种被管理设备,该被管理设备包括:处理器、存储器和收发器,存储器用于存储一个或者一个以上的指令,该指令被配置成由处理器执行,该指令用于实现上述第二方面或者第二方面中任意一种可能的实施方式所提供的设备配置方法。In a seventh aspect, a managed device is provided, the managed device includes: a processor, a memory, and a transceiver, the memory is used to store one or more instructions, the instructions are configured to be executed by the processor, and the instructions use The device configuration method provided by the second aspect or any one of the possible implementation manners of the second aspect.
本申请实施例提供的技术方案带来的有益效果包括:The beneficial effects brought by the technical solutions provided in the embodiments of the present application include:
通过网管设备采用预定义YANG模型建立配置数据的模型,而后基于NETCONF协议向被管理设备发送上述配置数据,被管理设备根据该预定义YANG模型解析配置数据,并根据解析得到的配置数据配置下级设备;解决了现有技术中针对设备级联场景,采用在NETCONF消息中添加扩展字段的方式指示NETCONF消息中的配置数据的目标下级设备,所存在的方案的通用性较差、配置处理的效率较低、以及保存数据的处理流程较为复杂的问题。The network management device uses the predefined YANG model to establish a model of configuration data, and then sends the above configuration data to the managed device based on the NETCONF protocol. The managed device parses the configuration data according to the predefined YANG model, and configures the lower-level devices according to the parsed configuration data. Solved in the prior art for equipment cascading scene, adopt the mode of adding extension field in NETCONF message to indicate the target subordinate equipment of the configuration data in NETCONF message, the generality of existing scheme is poor, the efficiency of configuration processing is relatively low, and the process of saving data is more complicated.
在不修改已经定义的YANG模型的前提下,通过预定义YANG模型,在该预定义YANG模型中设计引用字段和对象字段,实现引用配置数据,以及指示配置数据的目标下级设备和/或下级设备群组,所达到的技术效果包括:Under the premise of not modifying the already defined YANG model, by pre-defining the YANG model, design reference fields and object fields in the predefined YANG model, realize the reference configuration data, and indicate the target subordinate device and/or subordinate device of the configuration data The technical effects achieved include:
第一,由于并未在NETCONF消息中添加扩展字段,因而无需扩展NETCONF协议,使得网管设备与被管理设备之间仍然基于标准的NETCONF协议通信,方案的通用性更好;First, because the extension field is not added to the NETCONF message, there is no need to extend the NETCONF protocol, so that the communication between the network management device and the managed device is still based on the standard NETCONF protocol, and the generality of the solution is better;
第二,由于可通过多个引用字段在预定义YANG模型中引用多个YANG模型模型化的配置数据,且每一项配置数据的目标下级设备和/或下级设备群组可分别标识,因此在一条NETCONF消息中,可以携带针对不同的下级设备/下级设备群组所下发的不同的配置数据,从而提高配置处理的效率;Second, since the configuration data modeled by multiple YANG models can be referenced in the predefined YANG model through multiple reference fields, and the target subordinate device and/or subordinate device group of each item of configuration data can be identified separately, so in the A NETCONF message can carry different configuration data issued for different subordinate devices/subordinate device groups, thereby improving the efficiency of configuration processing;
第三,由于网管设备下发的NETCONF消息中携带的配置数据,统一使用预定义YANG模型进行建模,使得被管理设备中可以只维护与预定义YANG模型对应的数据库,无需为不同的下级设备和下级设备群组分别维护多个不同的数据库,简化了数据库的配置管理,同时也简化了保存数据的处理流程。Third, because the configuration data carried in the NETCONF message sent by the network management device is uniformly modeled using the predefined YANG model, the managed device can only maintain the database corresponding to the predefined YANG model, and there is no need for different subordinate devices. It maintains multiple different databases with subordinate device groups, which simplifies the configuration management of the database, and also simplifies the process of saving data.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例及现有技术描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments and the prior art.
图1示出了NETCONF与YANG的关系示意图;Figure 1 shows a schematic diagram of the relationship between NETCONF and YANG;
图2示出了一种设备级联场景的示意图;Figure 2 shows a schematic diagram of a device cascading scenario;
图3A示出了本申请实施例涉及的一种应用场景的示意图;FIG. 3A shows a schematic diagram of an application scenario involved in an embodiment of the present application;
图3B示出了本申请实施例涉及的另一应用场景的示意图;FIG. 3B shows a schematic diagram of another application scenario involved in the embodiment of the present application;
图4示出了无线局域网中的设备级联场景的网络架构图;4 shows a network architecture diagram of a device cascading scenario in a wireless local area network;
图5A/图5B示出了本申请一个实施例提供的网络设备的框图;5A/5B show a block diagram of a network device provided by an embodiment of the present application;
图6示出了本申请一个实施例提供的基于NETCONF协议的设备配置方法的流程图;6 shows a flowchart of a device configuration method based on the NETCONF protocol provided by an embodiment of the present application;
图7示出了本申请另一实施例提供的基于NETCONF协议的设备配置方法的流程图;7 shows a flowchart of a device configuration method based on the NETCONF protocol provided by another embodiment of the present application;
图8示出了本申请另一实施例提供的基于NETCONF协议的设备配置方法的流程图;8 shows a flowchart of a device configuration method based on the NETCONF protocol provided by another embodiment of the present application;
图9示出了本申请一个实施例提供的基于NETCONF协议的设备配置装置的框图;9 shows a block diagram of a device configuration device based on the NETCONF protocol provided by an embodiment of the present application;
图10示出了本申请另一实施例提供的基于NETCONF协议的设备配置装置的框图。FIG. 10 shows a block diagram of a device configuration apparatus based on the NETCONF protocol provided by another embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
在本文中提及的“模块”是指存储在存储器中的能够实现某些功能的程序或指令;在本文中提及的“单元”是指按照逻辑划分的功能性结构,该“单元”可以由纯硬件实现,或者由软硬件的结合实现。The "module" mentioned in this article refers to a program or instruction stored in a memory that can realize certain functions; the "unit" mentioned in this article refers to a functional structure divided by logic, and the "unit" can It is realized by pure hardware, or realized by a combination of software and hardware.
在本文中提及的“若干个”是指一个或多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。As used herein, "several" refers to one or more, and "plurality" refers to two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects are an "or" relationship.
本申请实施例提供的技术方案,应用于如图2所示的设备级联场景中。在一种可能的实施方式中,如图3A所示,网管设备21作为NETCONF客户端,被管理设备22作为NETCONF服务器。网管设备21与被管理设备22之间基于NETCONF协议通信,而被管理设备22与下级设备23之间基于非NETCONF协议通信。例如,当该设备级联场景应用于无线局域网(英文:wireless local area network;缩写:WLAN)中时,上述非NETCONF协议可以是CAPWAP。The technical solutions provided by the embodiments of the present application are applied in the device cascade scenario as shown in FIG. 2 . In a possible implementation manner, as shown in FIG. 3A , the network management device 21 acts as a NETCONF client, and the managed device 22 acts as a NETCONF server. The communication between the network management device 21 and the managed device 22 is based on the NETCONF protocol, and the communication between the managed device 22 and the subordinate device 23 is based on the non-NETCONF protocol. For example, when the device cascading scenario is applied to a wireless local area network (English: wireless local area network; abbreviation: WLAN), the above-mentioned non-NETCONF protocol may be CAPWAP.
在另一种可能的实施方式中,如图3B所示,网管设备21作为NETCONF客户端,被管理设备22作为NETCONF代理,下级设备23作为NETCONF服务器。对于网管设备21,NETCONF代理实现NETCONF服务器的功能;对于下级设备23,NETCONF代理实现NETCONF客户端的功能。网管设备21与被管理设备22之间基于NETCONF协议通信,且被管理设备22与下级设备23之间也基于NETCONF协议通信。In another possible implementation, as shown in FIG. 3B , the network management device 21 acts as a NETCONF client, the managed device 22 acts as a NETCONF proxy, and the lower-level device 23 acts as a NETCONF server. For the network management device 21, the NETCONF proxy implements the function of the NETCONF server; for the lower-level device 23, the NETCONF proxy implements the function of the NETCONF client. Communication between the network management device 21 and the managed device 22 is based on the NETCONF protocol, and communication between the managed device 22 and the subordinate device 23 is also based on the NETCONF protocol.
需要说明的一点是,NETCONF客户端、NETCONF服务器和NETCONF代理均是运行在设备中的软件进程,而非硬件。It should be noted that the NETCONF client, NETCONF server, and NETCONF proxy are software processes running on the device, not hardware.
如图4所示,以WLAN中的设备级联场景为例,该网络架构包括:控制器41、本地控制器(英文:local access controller;缩写:LAC)42和若干个接入点(英文:access point;缩写:AP)。控制器41与LAC42之间基于NETCONF协议通信,LAC42与AP之间基于CAPWAP通信。As shown in FIG. 4 , taking the device cascading scenario in WLAN as an example, the network architecture includes: a controller 41 , a local access controller (English: local access controller; abbreviation: LAC) 42 and several access points (English: access point; abbreviation: AP). The communication between the controller 41 and the LAC42 is based on the NETCONF protocol, and the communication between the LAC42 and the AP is based on CAPWAP.
控制器41作为NETCONF客户端。控制器41用于通过NETCONF协议配置LAC42和各个AP。控制器41也可称为集中控制器或敏捷控制器,用于集中式管理其下属的AP。控制器41下属管理的AP的数量可达到十万级、甚至百万级。The controller 41 acts as a NETCONF client. The controller 41 is used to configure the LAC 42 and each AP through the NETCONF protocol. The controller 41 may also be called a centralized controller or agile controller, and is used to centrally manage its subordinate APs. The number of APs subordinately managed by the controller 41 can reach one hundred thousand, or even one million.
LAC42作为NETCONF服务器。LAC42用于接收控制器41发送的配置数据,包括对LAC42的配置数据和对LAC42管理的AP的配置数据。对于控制器41下发的NETCONF消息,LAC42终结该NETCONF消息,对解析消息内容得到配置数据,而后将配置数据重新封装为CAPWAP报文并发送给相应的AP。LAC42也可称为轻量级接入控制器(英文:light accesscontroller)。LAC42与AP之间通过局域网建立通信连接。例如,LAC42可通过一级或多级交换机与AP相连;再例如,LAC42也可通过一级或多级路由器与AP相连。LAC42 as NETCONF server. The LAC42 is used for receiving configuration data sent by the controller 41, including the configuration data for the LAC42 and the configuration data for the AP managed by the LAC42. For the NETCONF message sent by the controller 41, the LAC 42 terminates the NETCONF message, parses the content of the message to obtain configuration data, and then re-encapsulates the configuration data into a CAPWAP message and sends it to the corresponding AP. The LAC42 may also be called a light access controller (English: light access controller). A communication connection is established between the LAC42 and the AP through the local area network. For example, the LAC42 can be connected to the AP through one or more switches; for another example, the LAC42 can also be connected to the AP through one or more routers.
AP不直接与控制器41相连,而是通过CAPWAP接收LAC42发送的配置数据。The AP is not directly connected to the controller 41, but receives configuration data sent by the LAC 42 through CAPWAP.
此外,每个LAC42可用于管理若干个AP和/或若干个AP组。每一个AP组中包括至少一个AP。例如,图4中左侧的LAC42用于管理AP3和两个AP组(组1和组2),组1中包括AP1和AP2,组2中包括AP4。Furthermore, each LAC 42 may be used to manage several APs and/or several AP groups. Each AP group includes at least one AP. For example, the LAC42 on the left in Figure 4 is used to manage AP3 and two AP groups (group 1 and group 2), group 1 includes AP1 and AP2, and group 2 includes AP4.
若采用现有技术提供的在NETCONF消息中添加扩展字段的方式,对AP的动态主动配置协议(英文:Dynamic Host Configuration Protocol;缩写:DHCP)、域名系统(英文:Domain Name System;缩写:DNS)等特性进行配置,具体流程如下:If the method of adding an extension field in the NETCONF message provided by the prior art is used, the dynamic active configuration protocol (English: Dynamic Host Configuration Protocol; Abbreviation: DHCP), Domain Name System (English: Domain Name System; Abbreviation: DNS) of the AP is used. and other features to configure, the specific process is as follows:
1、控制器采用YANG模型建立配置数据的模型;1. The controller uses the YANG model to build a model of configuration data;
以对AP的DHCP特性进行配置为例,假设相应的YANG模型为hw-dhcp.yang,控制器采用hw-dhcp.yang所定义的数据模型,对DHCP配置数据建模。Taking the configuration of the DHCP feature of the AP as an example, it is assumed that the corresponding YANG model is hw-dhcp.yang, and the controller uses the data model defined by hw-dhcp.yang to model the DHCP configuration data.
2、控制器生成NETCONF消息;2. The controller generates a NETCONF message;
NETCONF消息中包括内容字段和扩展字段。其中,内容字段携带采用YANG模型构建的配置数据,例如采用hw-dhcp.yang模型化的DHCP配置数据。扩展字段携带设备信息,该设备信息用于指示该NETCONF消息中的配置数据所要下发至的AP和/或AP组。例如,当AP3和group1中的AP1、AP2均适用上述DHCP配置数据时,扩展字段携带AP3和group1所对应的标识信息。The NETCONF message includes content fields and extension fields. The content field carries configuration data constructed using the YANG model, for example, DHCP configuration data modeled using hw-dhcp.yang. The extension field carries device information, where the device information is used to indicate the AP and/or AP group to which the configuration data in the NETCONF message is to be delivered. For example, when both AP3 and AP1 and AP2 in group1 apply the above-mentioned DHCP configuration data, the extension field carries the identification information corresponding to AP3 and group1.
例如,该NETCONF消息如下:For example, the NETCONF message is as follows:
3、控制器向LAC发送NETCONF消息;3. The controller sends a NETCONF message to the LAC;
相应地,LAC从控制器接收NETCONF消息。Accordingly, the LAC receives the NETCONF message from the controller.
4、LAC解析NETCONF消息,得到扩展字段中携带的设备信息和内容字段中携带的配置数据。4. The LAC parses the NETCONF message to obtain the device information carried in the extension field and the configuration data carried in the content field.
5、LAC将配置数据分别存入扩展字段所指示的AP和/或AP组所对应的数据库中。5. The LAC stores the configuration data in the database corresponding to the AP and/or AP group indicated by the extension field, respectively.
例如,LAC将DHCP配置数据存入group1所对应的数据库DB1中;以及,将DHCP配置数据存入AP3所对应的数据库DB2中。For example, the LAC stores the DHCP configuration data in the database DB1 corresponding to the group1; and stores the DHCP configuration data in the database DB2 corresponding to the AP3.
6、LAC根据设备信息和配置数据配置AP。6. The LAC configures the AP according to the device information and configuration data.
LAC中用于配置管理AP的功能模块,在监测到数据库中的配置数据发生变化后,从数据库读取配置数据,并将配置数据分别发送给相应的AP和/或AP组。The function module in the LAC for configuring and managing APs, after monitoring the change of the configuration data in the database, reads the configuration data from the database, and sends the configuration data to the corresponding AP and/or AP group respectively.
因此,针对设备级联场景,采用现有技术提供的在NETCONF消息中添加扩展字段的方式配置下级设备,存在方案的通用性较差、配置处理的效率较低、以及保存数据的处理流程较为复杂的问题。Therefore, for the device cascading scenario, using the method of adding an extension field in the NETCONF message provided by the prior art to configure the subordinate devices has the disadvantages of poor generality of the solution, low efficiency of configuration processing, and complicated processing flow for saving data. The problem.
下面,通过几个实施例对本申请提供的技术方案进行介绍和说明。Hereinafter, the technical solutions provided by the present application will be introduced and described through several embodiments.
请参考图5A/图5B,其示出了本申请一个实施例提供的网络设备的框图。网络设备500可以是本申请实施例中涉及的网管设备(例如图4所示网络架构中的控制器),也可以是本申请实施例中涉及的被管理设备(例如图4所示网络架构中的LAC)。Please refer to FIG. 5A/FIG. 5B, which shows a block diagram of a network device provided by an embodiment of the present application. The network device 500 may be a network management device (eg, a controller in the network architecture shown in FIG. 4 ) involved in the embodiment of the present application, or may be a managed device (eg, the network architecture shown in FIG. 4 ) involved in the embodiment of the present application. LAC).
网络设备500可以包括:处理器510、存储器520、收发器530以及总线540。存储器520和收发器530通过总线540与处理器510相连。The network device 500 may include a
处理器510包括一个或者一个以上处理核心。处理器510通过运行软件程序以及模块,从而执行各种功能应用以及数据处理。处理器510包括运算逻辑部件、寄存器部件以及控制部件等,其可以是独立的中央处理器,或者也可以是嵌入式处理器,比如微处理器(英文:micro processor unit;缩写:MPU)、微控制器(英文:micro controller unit;缩写:MCU)或者数字信号处理器(英文:embedded digital signal processor;缩写:EDSP)等。
存储器520可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(英文:static random access memory;缩写:SRAM),电可擦除可编程只读存储器(英文:electrically erasable programmable read-only memory;缩写:EEPROM),可擦除可编程只读存储器(英文:erasable programmable read-only memory;缩写:EPROM),可编程只读存储器(英文:programmable read-only memory;缩写:PROM),只读存储器(英文:readonly memory;缩写:ROM),磁存储器,快闪存储器,磁盘或光盘。存储器520可用于存储软件程序以及模块等可执行的指令。The
处理器510被配置为执行存储器520中存储的指令。当网络设备500为网管设备时,处理器510通过执行该指令来实现下述方法:采用预定义YANG模型建立配置数据的模型;控制收发器530基于NETCONF协议向被管理设备发送上述配置数据。预定义YANG模型中包括n个引用字段以及与每一个引用字段分别对应的若干个对象字段。引用字段用于指示在预定义YANG模型中被引用的YANG模型。第i个引用字段对应的对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据的目标下级设备和/或下级设备群组。下级设备群组是指由若干个下级设备构成的群组。其中,1≤i≤n且i、n为正整数。当网络设备500为被管理设备时,处理器510通过执行该指令来实现下述方法:控制收发器530接收网管设备基于NETCONF协议发送的配置数据;根据预定义YANG模型解析配置数据;根据解析得到的配置数据配置下级设备。
收发器530用于对外通信,其可以包括多种类型接口。例如,当网络设备500为网管设备时,收发器530用于基于NETCONF协议向被管理设备发送配置数据。当网络设备500为被管理设备时,收发器530用于接收网管设备基于NETCONF协议发送的配置数据。The
可选地,存储器520可存储操作系统522以及至少一个功能所需的应用程序模块524。操作系统522可以是实时操作系统、LINUX、UNIX、WINDOWS或OS X之类的操作系统。当网络设备500为网管设备时,如图5A所示,应用程序模块524可以包括:建模模块524a和发送模块524b。建模模块524a用于采用预定义YANG模型建立配置数据的模型。发送模块524b用于基于NETCONF协议向被管理设备发送上述配置数据。当网络设备500为被管理设备时,如图5B所示,应用程序模块524可以包括:接收模块524c、解析模块524d和配置模块524e。接收模块524c用于接收网管设备基于NETCONF协议发送的配置数据。解析模块524d用于根据预定义YANG模型解析配置数据。配置模块524e用于根据解析得到的配置数据配置下级设备。Optionally,
可选地,网络设备500还可以包括输入/输出组件(图中未示出)。输入/输出组件包括有用于显示信息的显示器和用于用户输入信息的诸如鼠标、键盘之类的输入设备。其中,显示器和输入设备都通过总线540与处理器510相连。Optionally, the network device 500 may further include an input/output component (not shown in the figure). Input/output components include a display for displaying information and input devices such as a mouse, keyboard, etc., for user input of information. Wherein, both the display and the input device are connected to the
请参考图6,其示出了本申请一个实施例提供的基于NETCONF协议的设备配置方法的流程图。本实施例提供的方法应用于网管设备中。其中,网管设备与被管理设备相连,被管理设备与若干个下级设备相连,网管设备和被管理设备支持NETCONF协议。该方法包括如下几个步骤。Please refer to FIG. 6 , which shows a flowchart of a device configuration method based on the NETCONF protocol provided by an embodiment of the present application. The method provided in this embodiment is applied to a network management device. The network management device is connected to the managed device, the managed device is connected to several subordinate devices, and the network management device and the managed device support the NETCONF protocol. The method includes the following steps.
步骤602,采用预定义YANG模型建立配置数据的模型。
预定义YANG模型中包括n个引用字段以及与每一个引用字段分别对应的若干个对象字段。引用字段用于指示在预定义YANG模型中被引用的YANG模型。第i个引用字段对应的对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据的目标下级设备和/或下级设备群组。下级设备群组是指由若干个下级设备构成的群组。其中,1≤i≤n且i、n为正整数。The predefined YANG model includes n reference fields and several object fields corresponding to each reference field. The reference field is used to indicate the YANG model that is referenced in the predefined YANG models. The object field corresponding to the ith reference field is used to indicate the target subordinate device and/or the subordinate device group of the target configuration data modeled by the YANG model referenced in the ith reference field. A subordinate device group refers to a group composed of several subordinate devices. Among them, 1≤i≤n and i and n are positive integers.
步骤604,基于NETCONF协议向被管理设备发送上述配置数据。Step 604: Send the above configuration data to the managed device based on the NETCONF protocol.
综上所述,本实施例提供的方法,通过网管设备采用预定义YANG模型建立配置数据的模型,而后基于NETCONF协议向被管理设备发送上述配置数据;解决了现有技术中针对设备级联场景,采用在NETCONF消息中添加扩展字段的方式指示NETCONF消息中的配置数据的目标下级设备,所存在的方案的通用性较差、配置处理的效率较低、以及保存数据的处理流程较为复杂的问题。在不修改已经定义的YANG模型的前提下,通过预定义YANG模型,在该预定义YANG模型中设计引用字段和对象字段,实现引用配置数据,以及指示配置数据的目标下级设备和/或下级设备群组,所达到的技术效果包括:To sum up, in the method provided by this embodiment, a network management device adopts a predefined YANG model to establish a model of configuration data, and then sends the above-mentioned configuration data to the managed device based on the NETCONF protocol; it solves the problem of the device cascade scenario in the prior art. , by adding an extension field in the NETCONF message to indicate the target subordinate device of the configuration data in the NETCONF message, the existing scheme has poor generality, low configuration processing efficiency, and the processing flow of saving data is more complicated. . Under the premise of not modifying the already defined YANG model, by pre-defining the YANG model, design reference fields and object fields in the predefined YANG model, realize the reference configuration data, and indicate the target subordinate device and/or subordinate device of the configuration data The technical effects achieved include:
第一,由于并未在NETCONF消息中添加扩展字段,因而无需扩展NETCONF协议,使得网管设备与被管理设备之间仍然基于标准的NETCONF协议通信,方案的通用性更好;First, because the extension field is not added to the NETCONF message, there is no need to extend the NETCONF protocol, so that the communication between the network management device and the managed device is still based on the standard NETCONF protocol, and the generality of the solution is better;
第二,由于可通过多个引用字段在预定义YANG模型中引用多个YANG模型模型化的配置数据,且每一项配置数据的目标下级设备和/或下级设备群组可分别标识,因此在一条NETCONF消息中,可以携带针对不同的下级设备/下级设备群组所下发的不同的配置数据,从而提高配置处理的效率;Second, since the configuration data modeled by multiple YANG models can be referenced in the predefined YANG model through multiple reference fields, and the target subordinate device and/or subordinate device group of each item of configuration data can be identified separately, so in the A NETCONF message can carry different configuration data issued for different subordinate devices/subordinate device groups, thereby improving the efficiency of configuration processing;
第三,由于网管设备下发的NETCONF消息中携带的配置数据,统一使用预定义YANG模型进行建模,使得被管理设备中可以只维护与预定义YANG模型对应的数据库,无需为不同的下级设备和下级设备群组分别维护多个不同的数据库,简化了数据库的配置管理,同时也简化了保存数据的处理流程。Third, because the configuration data carried in the NETCONF message sent by the network management device is uniformly modeled using the predefined YANG model, the managed device can only maintain the database corresponding to the predefined YANG model, and there is no need for different subordinate devices. It maintains multiple different databases with subordinate device groups, which simplifies the configuration management of the database, and also simplifies the process of saving data.
请参考图7,其示出了本申请另一实施例提供的基于NETCONF协议的设备配置方法的流程图。本实施例提供的方法应用于被管理设备中。其中,被管理设备与网管设备相连,被管理设备还与若干个下级设备相连,网管设备和被管理设备支持NETCONF协议。该方法包括如下几个步骤。Please refer to FIG. 7 , which shows a flowchart of a device configuration method based on the NETCONF protocol provided by another embodiment of the present application. The method provided in this embodiment is applied to a managed device. The managed device is connected to the network management device, the managed device is also connected to several subordinate devices, and the network management device and the managed device support the NETCONF protocol. The method includes the following steps.
步骤702,接收网管设备基于NETCONF协议发送的配置数据。Step 702: Receive configuration data sent by the network management device based on the NETCONF protocol.
配置数据由网管设备采用预定义YANG模型构建。预定义YANG模型中包括n个引用字段以及与每一个引用字段分别对应的若干个对象字段。引用字段用于指示在预定义YANG模型中被引用的YANG模型。第i个引用字段对应的对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据的目标下级设备和/或下级设备群组。下级设备群组是指由若干个下级设备构成的群组。其中,1≤i≤n且i、n为正整数。The configuration data is constructed by the network management device using the predefined YANG model. The predefined YANG model includes n reference fields and several object fields corresponding to each reference field. The reference field is used to indicate the YANG model that is referenced in the predefined YANG models. The object field corresponding to the ith reference field is used to indicate the target subordinate device and/or the subordinate device group of the target configuration data modeled by the YANG model referenced in the ith reference field. A subordinate device group refers to a group composed of several subordinate devices. Among them, 1≤i≤n and i and n are positive integers.
步骤704,根据预定义YANG模型解析配置数据。
步骤706,根据解析得到的配置数据配置下级设备。
综上所述,本实施例提供的方法,通过被管理设备接收网管设备基于NETCONF协议发送的配置数据,该配置数据由网管设备采用预定义YANG模型构建,被管理设备根据预定义YANG模型解析配置数据,并根据解析得到的配置数据配置下级设备;解决了现有技术中针对设备级联场景,采用在NETCONF消息中添加扩展字段的方式指示NETCONF消息中的配置数据的目标下级设备,所存在的方案的通用性较差、配置处理的效率较低、以及保存数据的处理流程较为复杂的问题。在不修改已经定义的YANG模型的前提下,通过预定义YANG模型,在该预定义YANG模型中设计引用字段和对象字段,实现引用配置数据,以及指示配置数据的目标下级设备和/或下级设备群组;达到了提高方案的通用性,提高配置处理的效率,以及简化数据库的配置管理,简化保存数据的处理流程的技术效果。To sum up, in the method provided in this embodiment, the managed device receives the configuration data sent by the network management device based on the NETCONF protocol, the configuration data is constructed by the network management device using the predefined YANG model, and the managed device parses the configuration according to the predefined YANG model. data, and configure the lower-level equipment according to the configuration data obtained by analysis; it solves the problem that in the prior art, for the device cascading scenario, the target lower-level equipment of the configuration data in the NETCONF message is indicated by adding an extension field in the NETCONF message. The generality of the scheme is poor, the efficiency of configuration processing is low, and the processing flow of saving data is more complicated. Under the premise of not modifying the already defined YANG model, by pre-defining the YANG model, design reference fields and object fields in the predefined YANG model, realize the reference configuration data, and indicate the target subordinate device and/or subordinate device of the configuration data It achieves the technical effect of improving the versatility of the scheme, improving the efficiency of configuration processing, simplifying the configuration management of the database, and simplifying the processing flow of saving data.
请参考图8,其示出了本申请另一实施例提供的基于NETCONF协议的设备配置方法的流程图。Please refer to FIG. 8 , which shows a flowchart of a device configuration method based on the NETCONF protocol provided by another embodiment of the present application.
步骤801,网管设备采用预定义YANG模型建立配置数据的模型。Step 801, the network management device establishes a model of configuration data by using a predefined YANG model.
预定义YANG模型中包括n个引用字段以及与每一个引用字段分别对应的若干个对象字段。引用字段用于指示在预定义YANG模型中被引用的YANG模型。第i个引用字段对应的对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据的目标下级设备和/或下级设备群组。下级设备群组是指由若干个下级设备构成的群组。其中,1≤i≤n且i、n为正整数。预定义YANG模型是指预先在基于NETCONF协议通信的两端设备(在本实施例中即网管设备和被管理设备)定义的YANG模型,也即预先在NETCONF客户端和NETCONF服务器两端定义的YANG模型。The predefined YANG model includes n reference fields and several object fields corresponding to each reference field. The reference field is used to indicate the YANG model that is referenced in the predefined YANG models. The object field corresponding to the ith reference field is used to indicate the target subordinate device and/or the subordinate device group of the target configuration data modeled by the YANG model referenced in the ith reference field. A subordinate device group refers to a group composed of several subordinate devices. Among them, 1≤i≤n and i and n are positive integers. The predefined YANG model refers to the YANG model defined in advance at the two end devices (in this embodiment, the network management device and the managed device) that communicate based on the NETCONF protocol, that is, the YANG model defined in advance at both ends of the NETCONF client and the NETCONF server. Model.
引用字段采用第一声明进行定义,第一声明用于在一个YANG模型中引用另一YANG模型所定义的模型树(英文:schema tree)。The reference field is defined by using the first statement, and the first statement is used to refer to a model tree (in English: schema tree) defined by another YANG model in one YANG model.
在一种可能的实施方式中,通过扩展YANG语言语法,所述第一声明为新增的refer声明。引用字段采用refer声明进行定义。refer声明用于在一个YANG模型中引用另一YANG模型所定义的模型树。refer声明的参数为被引用的YANG模型的名称。例如,假设在YANG模型module y中引用另一个YANG模型module x所定义的模型树,则module y中的引用字段可表示为:refer x。In a possible implementation manner, by extending the YANG language grammar, the first declaration is a newly added refer declaration. Reference fields are defined using a refer statement. The refer statement is used in one YANG model to refer to the model tree defined by another YANG model. The parameter of the refer statement is the name of the referenced YANG model. For example, if the model tree defined by another YANG model module x is referenced in the YANG model module y, the reference field in module y can be expressed as: refer x.
假设预定义YANG模型为module y,被引用的YANG模型为module x。其中,module x的语法结构如下:Suppose the predefined YANG model is module y, and the referenced YANG model is module x. Among them, the syntax structure of module x is as follows:
module y的语法结构如下:The syntax structure of module y is as follows:
则,上述module y的语法结构等同于:Then, the grammatical structure of the above module y is equivalent to:
可选地,对象字段采用leaf-list特性进行定义。leaf-list特性用于描述一组相同类型的叶子节点,其功能类似于C语言中的数组。通过leaf-list特性,可以定义一个或多个下级设备,或者定义一个或多个下级设备群组。例如,采用leaf-list devices描述配置数据的目标下级设备,采用leaf-list device-groups描述配置数据的目标下级设备群组。Optionally, object fields are defined using the leaf-list feature. The leaf-list feature is used to describe a group of leaf nodes of the same type, and its function is similar to an array in C language. Through the leaf-list feature, one or more subordinate devices can be defined, or one or more subordinate device groups can be defined. For example, leaf-list devices are used to describe the target subordinate devices of the configuration data, and leaf-list device-groups are used to describe the target subordinate device groups of the configuration data.
此外,第i个引用字段对应的对象字段包括:若干个第一对象字段和/或若干个第二对象字段。每一个第一对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据所要下发至的一个下级设备。例如,第一对象字段采用leaf-list devices表示。每一个第二对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据所要下发至的一个下级设备群组。例如,第二对象字段采用leaf-list device-groups表示。In addition, the object field corresponding to the ith reference field includes: several first object fields and/or several second object fields. Each first object field is used to indicate a subordinate device to which the target configuration data modeled by the YANG model referenced in the ith reference field is to be delivered. For example, the first object field is represented by leaf-list devices. Each second object field is used to indicate a subordinate device group to which the target configuration data modeled by the YANG model referenced in the ith reference field is to be delivered. For example, the second object field is represented by leaf-list device-groups.
结合参考图4所示的网络架构,控制器配置AP的DHCP、DNS等特性。这里以配置AP的DHCP特性为例,其它特性的配置可采用类似方式完成。基于AP的不同特性,已经定义了一系列YANG模型,包括用于配置AP的DHCP特性的YANG模型hw-dhcp.yang。在hw-dhcp.yang中,定义了AP所使用的DHCP服务器组名称,DHCP服务器对应的IP地址等特性所对应的数据模型。示例性地,该hw-dhcp.yang的语法结构如下:With reference to the network architecture shown in FIG. 4 , the controller configures features such as DHCP and DNS of the AP. The configuration of the DHCP feature of the AP is taken as an example here. The configuration of other features can be done in a similar manner. Based on the different characteristics of the AP, a series of YANG models have been defined, including the YANG model hw-dhcp.yang for configuring the DHCP characteristics of the AP. In hw-dhcp.yang, the data model corresponding to the characteristics such as the DHCP server group name used by the AP and the IP address corresponding to the DHCP server is defined. Exemplarily, the grammatical structure of the hw-dhcp.yang is as follows:
假设预定义YANG模型为master-device.yang,该master-device.yang的语法结构如下:Assuming that the predefined YANG model is master-device.yang, the grammatical structure of the master-device.yang is as follows:
由于可通过多个引用字段在预定义YANG模型中引用多个YANG模型模型化的配置数据,且每一项配置数据的目标下级设备和/或下级设备群组可分别标识,因此在一条NETCONF消息中,可以携带针对不同的下级设备/下级设备群组所下发的不同的配置数据,从而提高配置处理的效率。Since multiple YANG model-modeled configuration data can be referenced in the predefined YANG model through multiple reference fields, and the target subordinate device and/or subordinate device group of each item of configuration data can be identified separately, so in a NETCONF message can carry different configuration data issued for different subordinate devices/subordinate device groups, thereby improving the efficiency of configuration processing.
步骤802,网管设备基于NETCONF协议向被管理设备发送上述配置数据。Step 802, the network management device sends the above configuration data to the managed device based on the NETCONF protocol.
网管设备采用XML语言对建模完成的上述配置数据进行编码,而后网管设备向被管理设备发送NETCONF消息,该NETCONF消息中携带编码后的配置数据。The network management device uses XML language to encode the above-mentioned configuration data after modeling, and then the network management device sends a NETCONF message to the managed device, where the NETCONF message carries the encoded configuration data.
相应地,被管理设备接收网管设备基于NETCONF协议发送的配置数据。Correspondingly, the managed device receives the configuration data sent by the network management device based on the NETCONF protocol.
步骤803,被管理设备根据预定义YANG模型解析配置数据。Step 803, the managed device parses the configuration data according to the predefined YANG model.
被管理设备从网管设备接收到NETCONF消息之后,采用预定义YANG模型对消息内容进行解析,得到配置数据。After the managed device receives the NETCONF message from the network management device, it uses the predefined YANG model to parse the message content to obtain configuration data.
可选地,被管理设备将解析得到的配置数据存储至同一配置数据库中。由于网管设备下发的NETCONF消息中携带的配置数据,统一使用预定义YANG模型进行建模,使得被管理设备中可以只维护与预定义YANG模型对应的数据库,无需为不同的下级设备和下级设备群组分别维护多个不同的数据库,简化了数据库的配置管理,同时也简化了保存数据的处理流程。Optionally, the managed device stores the parsed configuration data in the same configuration database. Because the configuration data carried in the NETCONF message sent by the network management device is uniformly modeled using the predefined YANG model, the managed device can only maintain the database corresponding to the predefined YANG model, and there is no need for different subordinate devices and subordinate devices. Groups maintain multiple different databases, which simplifies database configuration management and simplifies the process of saving data.
步骤804,被管理设备根据解析得到的配置数据配置下级设备。Step 804, the managed device configures the subordinate device according to the configuration data obtained by parsing.
对于第i个引用字段中引用的YANG模型模型化的目标配置数据,被管理设备根据第i个引用字段对应的对象字段确定目标配置数据所要下发至的目标下级设备。目标下级设备是指第i个引用字段对应的对象字段所指示的下级设备和/或下级设备群组中的下级设备。被管理设备基于目标配置管理协议向目标下级设备发送目标配置数据。其中,目标配置管理协议是指被管理设备和目标下级设备支持的配置管理协议。For the target configuration data modeled by the YANG model referenced in the ith reference field, the managed device determines the target subordinate device to which the target configuration data is to be delivered according to the object field corresponding to the ith reference field. The target subordinate device refers to the subordinate device and/or the subordinate device in the subordinate device group indicated by the object field corresponding to the ith reference field. The managed device sends the target configuration data to the target subordinate device based on the target configuration management protocol. The target configuration management protocol refers to a configuration management protocol supported by the managed device and the target subordinate device.
在本申请实施例中,对被管理设备与下级设备之间所采用的配置管理协议不作限定。在一种可能的实施方式中,结合参考图3A,被管理设备与目标下级设备之间基于非NETCONF协议通信。例如,当图3A所示的设备级联场景应用于WLAN中时,该非NETCONF协议可以是CAPWAP。对于需要下发至目标下级设备的目标配置数据,被管理设备将目标配置数据封装为CAPWAP报文并发送给目标下级设备。在另一种可能的实施方式中,结合参考图3B,被管理设备作为NETCONF代理,被管理设备与目标下级设备之间也基于NETCONF协议通信。对于需要下发至目标下级设备的目标配置数据,被管理设备将目标配置数据封装为NETCONF消息并发送给目标下级设备。当然,除CAPWAP和NETCONF协议之外,目标配置管理协议还可以是其它类型的配置管理协议,对于其它类型的配置管理协议,被管理设备在配置管理目标下级设备时,所做处理基本类似,此处不再一一赘述。In the embodiment of the present application, the configuration management protocol adopted between the managed device and the lower-level device is not limited. In a possible implementation, with reference to FIG. 3A , the communication between the managed device and the target subordinate device is based on a non-NETCONF protocol. For example, when the device cascading scenario shown in FIG. 3A is applied in WLAN, the non-NETCONF protocol may be CAPWAP. For the target configuration data that needs to be delivered to the target subordinate device, the managed device encapsulates the target configuration data into a CAPWAP message and sends it to the target subordinate device. In another possible implementation, with reference to FIG. 3B , the managed device acts as a NETCONF agent, and the managed device and the target subordinate device also communicate based on the NETCONF protocol. For the target configuration data that needs to be delivered to the target subordinate device, the managed device encapsulates the target configuration data into a NETCONF message and sends it to the target subordinate device. Of course, in addition to the CAPWAP and NETCONF protocols, the target configuration management protocol can also be other types of configuration management protocols. For other types of configuration management protocols, when the managed device configures and manages the target subordinate device, the processing is basically similar. I won't go into details here.
此外,被管理设备对下级设备完成配置之后,可向网管设备反馈响应消息。响应消息的反馈流程可采用NETCONF协议规定的已有机制实现。In addition, after the managed device completes the configuration of the subordinate device, it can feed back a response message to the network management device. The feedback process of the response message can be implemented by using the existing mechanism specified by the NETCONF protocol.
综上所述,本实施例提供的方法,通过网管设备采用预定义YANG模型建立配置数据的模型,而后基于NETCONF协议向被管理设备发送上述配置数据,被管理设备根据该预定义YANG模型解析配置数据,并根据解析得到的配置数据配置下级设备;解决了现有技术中针对设备级联场景,采用在NETCONF消息中添加扩展字段的方式指示NETCONF消息中的配置数据的目标下级设备,所存在的方案的通用性较差、配置处理的效率较低、以及保存数据的处理流程较为复杂的问题。To sum up, in the method provided in this embodiment, a network management device uses a predefined YANG model to establish a model of configuration data, and then sends the above configuration data to the managed device based on the NETCONF protocol, and the managed device parses the configuration according to the predefined YANG model. data, and configure the lower-level equipment according to the configuration data obtained by analysis; it solves the problem that in the prior art, for the device cascading scenario, the target lower-level equipment of the configuration data in the NETCONF message is indicated by adding an extension field in the NETCONF message. The generality of the scheme is poor, the efficiency of configuration processing is low, and the processing flow of saving data is more complicated.
在不修改已经定义的YANG模型的前提下,通过预定义YANG模型,在该预定义YANG模型中设计引用字段和对象字段,实现引用配置数据,以及指示配置数据的目标下级设备和/或下级设备群组,所达到的技术效果包括:Under the premise of not modifying the already defined YANG model, by pre-defining the YANG model, design reference fields and object fields in the predefined YANG model, realize the reference configuration data, and indicate the target subordinate device and/or subordinate device of the configuration data The technical effects achieved include:
第一,由于并未在NETCONF消息中添加扩展字段,因而无需扩展NETCONF协议,使得网管设备与被管理设备之间仍然基于标准的NETCONF协议通信,方案的通用性更好;First, because the extension field is not added to the NETCONF message, there is no need to extend the NETCONF protocol, so that the communication between the network management device and the managed device is still based on the standard NETCONF protocol, and the generality of the solution is better;
第二,由于可通过多个引用字段在预定义YANG模型中引用多个YANG模型模型化的配置数据,且每一项配置数据的目标下级设备和/或下级设备群组可分别标识,因此在一条NETCONF消息中,可以携带针对不同的下级设备/下级设备群组所下发的不同的配置数据,从而提高配置处理的效率;Second, since the configuration data modeled by multiple YANG models can be referenced in the predefined YANG model through multiple reference fields, and the target subordinate device and/or subordinate device group of each item of configuration data can be identified separately, so in the A NETCONF message can carry different configuration data issued for different subordinate devices/subordinate device groups, thereby improving the efficiency of configuration processing;
第三,由于网管设备下发的NETCONF消息中携带的配置数据,统一使用预定义YANG模型进行建模,使得被管理设备中可以只维护与预定义YANG模型对应的数据库,无需为不同的下级设备和下级设备群组分别维护多个不同的数据库,简化了数据库的配置管理,同时也简化了保存数据的处理流程。Third, because the configuration data carried in the NETCONF message sent by the network management device is uniformly modeled using the predefined YANG model, the managed device can only maintain the database corresponding to the predefined YANG model, and there is no need for different subordinate devices. It maintains multiple different databases with subordinate device groups, which simplifies the configuration management of the database, and also simplifies the process of saving data.
另外,通过扩展YANG语言语法,增加第一声明,可以实现在一个YANG模型中方便地引用任何一个已经定义的YANG模型中的模型树,从而有效解决设备级联场景下的YANG模型复用问题,实现在设备级联场景下利用NETCONF协议和YANG模型配置下级设备。In addition, by extending the YANG language syntax and adding the first statement, it is possible to easily refer to the model tree in any defined YANG model in a YANG model, thereby effectively solving the problem of YANG model reuse in the device cascade scenario. Realize the use of NETCONF protocol and YANG model to configure lower-level devices in the device cascading scenario.
另外,通过leaf-list特性,实现定义一个或多个下级设备,或者定义一个或多个下级设备群组,从而方便、灵活地定义配置数据的目标下级设备和/或下级设备群组。In addition, through the leaf-list feature, it is possible to define one or more subordinate devices, or define one or more subordinate device groups, so as to conveniently and flexibly define the target subordinate device and/or subordinate device group of the configuration data.
需要补充说明的一点是,在现有的YANG语言语法中,也存在两种YANG模型复用的机制:module-submodule和uses-grouping。A point that needs to be added is that in the existing YANG language grammar, there are also two mechanisms for YANG model reuse: module-submodule and uses-grouping.
采用module-submodule方式实现的YANG模型复用机制如下:首先定义一个submodule,声明其从属于(belongs-to)某一个module,并定义与submodule相对应的模型树;而后定义一个module,在该module中包括(include)之前定义的submodule,从而实现在该module中引用submodule所定义的模型树。采用module-submodule方式实现的YANG模型复用存在如下缺陷:module中只能引用已经定义的且从属于该module的submodule,而不是任意的submodule或者module,而已经定义的YANG模型中,一般都是按照YANG模型所配置的功能特性形成一个个独立的module,因此无法实现在一个module中引用另一个module所定义的模型树。The YANG model reuse mechanism implemented in the module-submodule mode is as follows: first define a submodule, declare that it belongs to a certain module, and define the model tree corresponding to the submodule; then define a module, in the module Include (include) the submodule defined before, so that the model tree defined by the submodule is referenced in the module. The YANG model reuse implemented by the module-submodule method has the following defects: the module can only refer to the submodule that has been defined and belongs to the module, not any submodule or module. In the defined YANG model, generally According to the functional characteristics configured by the YANG model, independent modules are formed, so it is impossible to refer to the model tree defined by another module in one module.
此外,采用uses-grouping方式实现的YANG模型复用所存在的缺陷为:由于uses只支持复用在本模型或者引入模型中用grouping定义的模型树,而已经定义的YANG模型中,没有哪一个YANG模型会定义一个包含本模型所有字段的grouping,因此采用uses-grouping方式同样无法解决设备级联场景下的YANG模型复用问题。In addition, the defects of YANG model reuse implemented by uses-grouping are: because uses only support the reuse of model trees defined by grouping in this model or imported models, and there is no one of the defined YANG models. The YANG model defines a grouping that includes all the fields of the model. Therefore, the uses-grouping method also cannot solve the problem of YANG model reuse in the device cascade scenario.
基于上述分析,在不修改已经定义的YANG模型的前提下,采用module-submodule方式或者uses-grouping方式均无法解决设备级联场景下的YANG模型复用问题。本申请实施例提供的技术方案,通过扩展YANG语言语法,增加refer声明,可以实现在一个YANG模型中方便地引用任何一个已经定义的YANG模型中的模型树,从而有效解决设备级联场景下的YANG模型复用问题,实现在设备级联场景下利用NETCONF协议和YANG模型配置下级设备管理。Based on the above analysis, without modifying the defined YANG model, neither the module-submodule method nor the uses-grouping method can solve the YANG model reuse problem in the device cascade scenario. The technical solutions provided by the embodiments of the present application, by extending the YANG language grammar and adding a refer statement, can easily refer to a model tree in any defined YANG model in a YANG model, thereby effectively solving the problem of device cascading scenarios. The problem of YANG model reuse is to implement the lower-level device management using the NETCONF protocol and the YANG model in the device cascade scenario.
还需要补充说明的一点是,在本申请实施例中,仅以在YANG语言语法中增加的声明类型的名称为“refer声明”为例进行举例说明,在实际应用中,该增加的声明类型可能被命名为其它不同的名称,如引用声明、自定义声明等等,本申请实施例对此不做限定。不论该增加的声明类型被命名为何种名称,其作用与上文介绍的“refer声明”的作用相同,用于在一个YANG模型中引用另一YANG模型所定义的模型树。Another point that needs to be supplemented is that in the embodiment of this application, only the name of the declaration type added in the YANG language grammar is "refer declaration" as an example for illustration. In practical applications, the added declaration type may be It is named with other different names, such as a reference statement, a self-defined statement, etc., which is not limited in this embodiment of the present application. No matter what name the added declaration type is named, its function is the same as that of the "refer declaration" introduced above, which is used to refer to a model tree defined by another YANG model in one YANG model.
下面,通过一个具体的例子对配置数据示例进行介绍。Below, an example of configuration data is introduced through a specific example.
用于配置AP的DHCP特性的YANG模型hw-dhcp.yang对应的一个配置数据实例如下:An example of configuration data corresponding to the YANG model hw-dhcp.yang used to configure the DHCP feature of the AP is as follows:
假设预定义YANG模型为lac-device.yang,在lac-device.yang中,通过refer声明引用hw-dhcp.yang,从而配置LAC的下级设备AP的DHCP特性。IP地址10.163.18.1和10.163.23.6属于一个dhcp-server-group,其名字为dhcp-cfg1。控制器配置LAC的下级设备的时候,这份dhcp-server-group的配置数据会下发到下级设备ap3,下级设备组group1和group2上获得应用。lac-device.yang对应的一个配置数据实例如下:Assuming that the predefined YANG model is lac-device.yang, in lac-device.yang, refer to hw-dhcp.yang through the refer statement, so as to configure the DHCP feature of the lower-level device AP of the LAC. The IP addresses 10.163.18.1 and 10.163.23.6 belong to a dhcp-server-group named dhcp-cfg1. When the controller configures the subordinate devices of the LAC, the configuration data of the dhcp-server-group will be delivered to the subordinate device ap3, and applied to the subordinate device groups group1 and group2. An example of configuration data corresponding to lac-device.yang is as follows:
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are apparatus embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
请参考图9,其示出了本申请一个实施例提供的基于NETCONF协议的设备配置装置的框图。本实施例提供的装置可以为网管设备的部分或全部。其中,网管设备与被管理设备相连,被管理设备与若干个下级设备相连,网管设备和被管理设备支持NETCONF协议。该装置可以包括:建模单元(英文:modeling unit)910和发送单元920。Please refer to FIG. 9 , which shows a block diagram of a device configuration apparatus based on the NETCONF protocol provided by an embodiment of the present application. The apparatus provided in this embodiment may be part or all of the network management equipment. The network management device is connected to the managed device, the managed device is connected to several subordinate devices, and the network management device and the managed device support the NETCONF protocol. The apparatus may include: a modeling unit (English: modeling unit) 910 and a sending
建模单元910,用于采用预定义YANG模型建立配置数据的模型。The
预定义YANG模型中包括n个引用字段以及与每一个引用字段分别对应的若干个对象字段。引用字段用于指示在预定义YANG模型中被引用的YANG模型。第i个引用字段对应的对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据的目标下级设备和/或下级设备群组。下级设备群组是指由若干个下级设备构成的群组。其中,1≤i≤n且i、n为正整数。The predefined YANG model includes n reference fields and several object fields corresponding to each reference field. The reference field is used to indicate the YANG model that is referenced in the predefined YANG models. The object field corresponding to the ith reference field is used to indicate the target subordinate device and/or the subordinate device group of the target configuration data modeled by the YANG model referenced in the ith reference field. A subordinate device group refers to a group composed of several subordinate devices. Among them, 1≤i≤n and i and n are positive integers.
发送单元920,用于基于NETCONF协议向被管理设备发送建模单元910模型化的配置数据。The sending
综上所述,本实施例提供的装置,通过网管设备采用预定义YANG模型建立配置数据的模型,而后基于NETCONF协议向被管理设备发送上述配置数据;解决了现有技术中针对设备级联场景,采用在NETCONF消息中添加扩展字段的方式指示NETCONF消息中的配置数据的目标下级设备,所存在的方案的通用性较差、配置处理的效率较低、以及保存数据的处理流程较为复杂的问题。在不修改已经定义的YANG模型的前提下,通过预定义YANG模型,在该预定义YANG模型中设计引用字段和对象字段,实现引用配置数据,以及指示配置数据的目标下级设备和/或下级设备群组;达到了提高方案的通用性,提高配置处理的效率,以及简化数据库的配置管理,简化保存数据的处理流程的技术效果。To sum up, the device provided in this embodiment uses a predefined YANG model to establish a configuration data model through a network management device, and then sends the above configuration data to a managed device based on the NETCONF protocol; it solves the problem of device cascade scenarios in the prior art. , by adding an extension field in the NETCONF message to indicate the target subordinate device of the configuration data in the NETCONF message, the existing scheme has poor generality, low configuration processing efficiency, and the processing flow of saving data is more complicated. . Under the premise of not modifying the already defined YANG model, by pre-defining the YANG model, design reference fields and object fields in the predefined YANG model, realize the reference configuration data, and indicate the target subordinate device and/or subordinate device of the configuration data It achieves the technical effect of improving the versatility of the scheme, improving the efficiency of configuration processing, simplifying the configuration management of the database, and simplifying the processing flow of saving data.
在基于图9所示实施例提供的一个可选实施例中,引用字段采用第一声明进行定义,第一声明用于在一个YANG模型中引用另一YANG模型所定义的模型树。In an optional embodiment provided based on the embodiment shown in FIG. 9 , the reference field is defined by using a first statement, and the first statement is used to reference a model tree defined by another YANG model in one YANG model.
在基于图9所示实施例提供的另一可选实施例中,对象字段采用leaf-list特性进行定义,leaf-list特征用于描述一组相同类型的叶子节点。In another optional embodiment provided based on the embodiment shown in FIG. 9 , the object field is defined by using a leaf-list feature, and the leaf-list feature is used to describe a group of leaf nodes of the same type.
在基于图9所示实施例提供的另一可选实施例中,第i个引用字段对应的对象字段包括:若干个第一对象字段和/或若干个第二对象字段。每一个第一对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据所要下发至的一个下级设备。每一个第二对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据所要下发至的一个下级设备群组。In another optional embodiment provided based on the embodiment shown in FIG. 9 , the object field corresponding to the i-th reference field includes: several first object fields and/or several second object fields. Each first object field is used to indicate a subordinate device to which the target configuration data modeled by the YANG model referenced in the ith reference field is to be delivered. Each second object field is used to indicate a subordinate device group to which the target configuration data modeled by the YANG model referenced in the ith reference field is to be delivered.
请参考图10,其示出了本申请另一实施例提供的基于NETCONF协议的设备配置装置的框图。本实施例提供的装置可以为被管理设备的部分或全部。其中,被管理设备与网管设备相连,被管理设备还与若干个下级设备相连,网管设备和被管理设备支持NETCONF协议。该装置可以包括:接收单元1010、解析单元1020和配置单元1030。Please refer to FIG. 10 , which shows a block diagram of a device configuration apparatus based on the NETCONF protocol provided by another embodiment of the present application. The apparatus provided in this embodiment may be part or all of the managed device. The managed device is connected to the network management device, the managed device is also connected to several subordinate devices, and the network management device and the managed device support the NETCONF protocol. The apparatus may include: a receiving
接收单元1010,用于接收网管设备基于NETCONF协议发送的配置数据。The receiving
配置数据由网管设备采用预定义YANG模型构建。预定义YANG模型中包括n个引用字段以及与每一个引用字段分别对应的若干个对象字段。引用字段用于指示在预定义YANG模型中被引用的YANG模型。第i个引用字段对应的对象字段用于指示第i个引用字段中引用的YANG模型模型化的目标配置数据的目标下级设备和/或下级设备群组。下级设备群组是指由若干个下级设备构成的群组。其中,1≤i≤n且i、n为正整数。The configuration data is constructed by the network management device using the predefined YANG model. The predefined YANG model includes n reference fields and several object fields corresponding to each reference field. The reference field is used to indicate the YANG model that is referenced in the predefined YANG models. The object field corresponding to the ith reference field is used to indicate the target subordinate device and/or the subordinate device group of the target configuration data modeled by the YANG model referenced in the ith reference field. A subordinate device group refers to a group composed of several subordinate devices. Among them, 1≤i≤n and i and n are positive integers.
解析单元1020,用于根据预定义YANG模型解析配置数据。The
配置单元1030,用于根据解析得到的配置数据配置下级设备。The
综上所述,本实施例提供的装置,通过被管理设备接收网管设备基于NETCONF协议发送的配置数据,该配置数据由网管设备采用预定义YANG模型构建,被管理设备根据预定义YANG模型解析配置数据,并根据解析得到的配置数据配置下级设备;解决了现有技术中针对设备级联场景,采用在NETCONF消息中添加扩展字段的方式指示NETCONF消息中的配置数据的目标下级设备,所存在的方案的通用性较差、配置处理的效率较低、以及保存数据的处理流程较为复杂的问题。在不修改已经定义的YANG模型的前提下,通过预定义YANG模型,在该预定义YANG模型中设计引用字段和对象字段,实现引用配置数据,以及指示配置数据的目标下级设备和/或下级设备群组;达到了提高方案的通用性,提高配置处理的效率,以及简化数据库的配置管理,简化保存数据的处理流程的技术效果。To sum up, the device provided in this embodiment receives configuration data sent by the network management device based on the NETCONF protocol through the managed device. The configuration data is constructed by the network management device using a predefined YANG model, and the managed device parses the configuration according to the predefined YANG model. data, and configure the lower-level equipment according to the configuration data obtained by analysis; it solves the problem that in the prior art, for the device cascading scenario, the target lower-level equipment of the configuration data in the NETCONF message is indicated by adding an extension field in the NETCONF message. The generality of the scheme is poor, the efficiency of configuration processing is low, and the processing flow of saving data is more complicated. Under the premise of not modifying the already defined YANG model, by pre-defining the YANG model, design reference fields and object fields in the predefined YANG model, realize the reference configuration data, and indicate the target subordinate device and/or subordinate device of the configuration data It achieves the technical effect of improving the versatility of the scheme, improving the efficiency of configuration processing, simplifying the configuration management of the database, and simplifying the processing flow of saving data.
在基于图10所示实施例提供的一个可选实施例中,配置单元1030,具体用于:In an optional embodiment provided based on the embodiment shown in FIG. 10, the
对于第i个引用字段中引用的YANG模型模型化的目标配置数据,根据第i个引用字段对应的对象字段确定目标配置数据所要下发至的目标下级设备;其中,目标下级设备是指第i个引用字段对应的对象字段所指示的下级设备和/或下级设备群组中的下级设备;For the target configuration data modeled by the YANG model referenced in the i-th reference field, determine the target subordinate device to which the target configuration data is to be delivered according to the object field corresponding to the i-th reference field; wherein, the target subordinate device refers to the i-th subordinate device The subordinate device and/or the subordinate device in the subordinate device group indicated by the object field corresponding to each reference field;
基于目标配置管理协议向目标下级设备发送目标配置数据,目标配置管理协议是指被管理设备和目标下级设备支持的配置管理协议。The target configuration data is sent to the target subordinate device based on the target configuration management protocol. The target configuration management protocol refers to a configuration management protocol supported by the managed device and the target subordinate device.
在基于图10所示实施例提供的另一可选实施例中,该装置还包括存储单元,用于将解析得到的配置数据存储至同一配置数据库中。In another optional embodiment provided based on the embodiment shown in FIG. 10 , the apparatus further includes a storage unit, configured to store the configuration data obtained by parsing in the same configuration database.
本申请一个实施例还提供了一种基于METCONF协议的设备配置系统。结合参考图2,该系统包括:网管设备、被管理设备和若干个下级设备。其中,网管设备与被管理设备相连,被管理设备与上述若干个下级设备相连。网管设备和被管理设备支持NETCONF协议。网管设备包括如图9所示实施例提供的设备配置装置;被管理设备包括如图10所示实施例提供的设备配置装置。An embodiment of the present application also provides a device configuration system based on the METCONF protocol. With reference to FIG. 2 , the system includes: a network management device, a managed device and several subordinate devices. The network management device is connected to the managed device, and the managed device is connected to the above-mentioned several lower-level devices. The network management device and the managed device support the NETCONF protocol. The network management device includes the device configuration device provided by the embodiment shown in FIG. 9 ; the managed device includes the device configuration device provided by the embodiment shown in FIG. 10 .
需要说明的是:上述实施例提供的装置在实现其功能时,仅以上述各功能单元的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元完成,即将设备的内部结构划分成不同的功能单元,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the device provided in the above embodiment realizes its functions, only the division of the above functional units is used as an example for illustration. The internal structure is divided into different functional units to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments, which will not be repeated here.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection of the present application. within the range.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610234776.9ACN107302443B (en) | 2016-04-15 | 2016-04-15 | Device configuration method and device based on network configuration protocol |
| PCT/CN2017/079558WO2017177856A1 (en) | 2016-04-15 | 2017-04-06 | Device configuration method and apparatus based on network configuration protocol |
| ES17781832TES2806696T3 (en) | 2016-04-15 | 2017-04-06 | Device configuration method and apparatus that are based on a network configuration protocol |
| JP2018554012AJP6704472B2 (en) | 2016-04-15 | 2017-04-06 | Device configuration method and apparatus based on network configuration protocol |
| EP17781832.5AEP3432517B1 (en) | 2016-04-15 | 2017-04-06 | Device configuration method and apparatus based on network configuration protocol |
| US16/160,358US11323316B2 (en) | 2016-04-15 | 2018-10-15 | Device configuration method and apparatus that are based on network configuration protocol |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610234776.9ACN107302443B (en) | 2016-04-15 | 2016-04-15 | Device configuration method and device based on network configuration protocol |
| Publication Number | Publication Date |
|---|---|
| CN107302443A CN107302443A (en) | 2017-10-27 |
| CN107302443Btrue CN107302443B (en) | 2020-10-16 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610234776.9AActiveCN107302443B (en) | 2016-04-15 | 2016-04-15 | Device configuration method and device based on network configuration protocol |
| Country | Link |
|---|---|
| US (1) | US11323316B2 (en) |
| EP (1) | EP3432517B1 (en) |
| JP (1) | JP6704472B2 (en) |
| CN (1) | CN107302443B (en) |
| ES (1) | ES2806696T3 (en) |
| WO (1) | WO2017177856A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11075793B2 (en)* | 2016-09-19 | 2021-07-27 | Telefonaktiebolaget Lm Ericsson (Publ) | Method for network management based on NETCONF protocol, and associated network device |
| KR102424056B1 (en)* | 2017-10-31 | 2022-07-25 | 한국전자통신연구원 | Method for modeling network system instructions with yang language and apparatus for the same |
| CN110351107B (en)* | 2018-04-03 | 2021-04-09 | 华为技术有限公司 | Configuration management method and device |
| CN110855459B (en) | 2018-08-20 | 2021-07-09 | 华为技术有限公司 | Network configuration method, device and system |
| CN109194519B (en)* | 2018-09-27 | 2021-11-16 | 锐捷网络股份有限公司 | Configuration method and device of network equipment, controller and computer storage medium |
| CN109951315B (en)* | 2019-02-14 | 2022-02-22 | 烽火通信科技股份有限公司 | Method and system for mapping YANG model to internal model |
| US20200274753A1 (en)* | 2019-02-26 | 2020-08-27 | Huawei Technologies Co., Ltd. | Method for creating and managing permissions for accessing yang data in yang-based datastores |
| CN112671549B (en)* | 2019-10-16 | 2024-12-03 | 华为技术有限公司 | A data processing method, device and system |
| CN112688794A (en)* | 2019-10-18 | 2021-04-20 | 华为技术有限公司 | YANG model management method, device, system, equipment and storage medium |
| CN112187525B (en) | 2019-10-31 | 2021-08-20 | 华为技术有限公司 | Device management method, device, system, device and storage medium |
| CN111010305A (en)* | 2019-12-23 | 2020-04-14 | 烽火通信科技股份有限公司 | Configuration management system and method based on NETCONF protocol |
| CN111371601A (en)* | 2020-02-26 | 2020-07-03 | 苏州浪潮智能科技有限公司 | A server configuration method, apparatus, device, and computer-readable storage medium |
| CN113824573B (en)* | 2020-06-18 | 2022-12-13 | 华为技术有限公司 | Object management method and device |
| CN112636973A (en)* | 2020-12-22 | 2021-04-09 | 南方电网深圳数字电网研究院有限公司 | NETCONF protocol-based automatic cloud network fusion method |
| WO2022167837A1 (en)* | 2021-02-04 | 2022-08-11 | ラクテン・シンフォニー・シンガポール・プライベート・リミテッド | Network service management system and network service management method |
| US12244458B2 (en)* | 2021-03-09 | 2025-03-04 | Ciena Corporation | Limiting the scope of a declarative configuration editing operation |
| CN113300888B (en)* | 2021-05-21 | 2022-07-22 | 刘超 | YANG model browser and client device |
| CN116185947A (en)* | 2021-11-29 | 2023-05-30 | 华为技术有限公司 | YANG model file management method, device and system |
| CN117376122A (en)* | 2022-06-30 | 2024-01-09 | 中兴通讯股份有限公司 | Network configuration method and device, storage medium and electronic device |
| CN117411759A (en)* | 2022-07-07 | 2024-01-16 | 中兴通讯股份有限公司 | Network element management method, electronic device, computer readable medium |
| US12407573B2 (en) | 2023-01-04 | 2025-09-02 | Hcl Technologies Limited | Method and system for group aware distributed configuration transactions management across network devices |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2597816B1 (en)* | 2007-09-26 | 2019-09-11 | Nicira Inc. | Network operating system for managing and securing networks |
| CN102223291A (en)* | 2010-04-14 | 2011-10-19 | 华为技术有限公司 | Method, device and communication system for realizing device access |
| US8837493B2 (en)* | 2010-07-06 | 2014-09-16 | Nicira, Inc. | Distributed network control apparatus and method |
| US8838653B2 (en)* | 2010-11-01 | 2014-09-16 | Cisco Technology, Inc. | Translating an object-oriented data model to a YANG data model |
| CN103281197B (en)* | 2013-04-08 | 2016-03-30 | 浙江工商大学 | A kind of ForCES collocation method based on NETCONF |
| CN104243198B (en)* | 2013-06-21 | 2019-07-26 | 中兴通讯股份有限公司 | A kind of network management and system based on network configuration protocol |
| US10084650B2 (en)* | 2013-07-09 | 2018-09-25 | Tail-f Systems AB | Graphical user interface for customizing graphical representations based on registry data |
| CN103701653B (en)* | 2014-01-06 | 2016-09-07 | 迈普通信技术股份有限公司 | The processing method of a kind of interface hot plug configuration data and network configuration server |
| CN104883266B (en) | 2014-02-28 | 2018-10-12 | 新华三技术有限公司 | network configuration access method and device |
| CN104065514A (en)* | 2014-07-02 | 2014-09-24 | 清华大学 | A Home Network Management Method Based on NETCONF Relay |
| US10797942B2 (en)* | 2015-04-01 | 2020-10-06 | Nokia Of America Corporation | Provisioning network services for cable systems |
| US9900209B2 (en)* | 2015-09-14 | 2018-02-20 | Cisco Technology, Inc. | Techniques for YANG model version control validation |
| Publication number | Publication date |
|---|---|
| ES2806696T3 (en) | 2021-02-18 |
| JP2019514297A (en) | 2019-05-30 |
| US20190052526A1 (en) | 2019-02-14 |
| EP3432517A4 (en) | 2019-02-27 |
| JP6704472B2 (en) | 2020-06-03 |
| US11323316B2 (en) | 2022-05-03 |
| WO2017177856A1 (en) | 2017-10-19 |
| EP3432517B1 (en) | 2020-05-13 |
| EP3432517A1 (en) | 2019-01-23 |
| CN107302443A (en) | 2017-10-27 |
| Publication | Publication Date | Title |
|---|---|---|
| CN107302443B (en) | Device configuration method and device based on network configuration protocol | |
| US20240179103A1 (en) | Network slice configuration | |
| EP3143511B1 (en) | Method and apparatus for affinity-based network configuration | |
| US10785278B2 (en) | Network management interface | |
| US11075793B2 (en) | Method for network management based on NETCONF protocol, and associated network device | |
| US20030074436A1 (en) | Management information base object model | |
| CN113381870B (en) | Message processing method and device | |
| CN110413418A (en) | Cache synchronization device and method, cache synchronization system, electronic equipment | |
| CN110971438A (en) | Method and device for configuring data | |
| KR102168188B1 (en) | System and method for Intent-based application to provision the virtual network infrastructure and computer readable medium storing a program of the same | |
| US20160134474A1 (en) | Method and apparatus for model-driven, affinity-based, network functions | |
| CN112448915B (en) | Verification method and device for configuration message and computer storage medium | |
| US11368353B2 (en) | Context-aware software defined networking policy management and enforcement using semantic data modeling | |
| CN109194519B (en) | Configuration method and device of network equipment, controller and computer storage medium | |
| CN117596050A (en) | Data access control method and device and electronic equipment | |
| WO2020220272A1 (en) | Method and system for changing resource state, terminal, and storage medium | |
| TWI609349B (en) | Service Model Collaborative Control System | |
| EP3629616A1 (en) | Data interaction method, device and equipment | |
| US12009970B2 (en) | Flexible network management system for configuring network devices | |
| CN110891239A (en) | PNF configuration and PNFD TOSCA implementation method and device | |
| An et al. | Design and implementation of YANG based wireless access point controller using RPC | |
| WO2019154121A1 (en) | Processing method and device for parameter configuration, storage medium and processor | |
| CN120528860A (en) | A BFD-based session management method, device, and medium | |
| CN119729512A (en) | Site data splitting method and device |
| 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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |