[go: up one dir, main page]

CN109361550A - Method, device and device for configuration management of network equipment - Google Patents

Method, device and device for configuration management of network equipment Download PDF

Info

Publication number
CN109361550A
CN109361550A CN201811390557.5A CN201811390557A CN109361550A CN 109361550 A CN109361550 A CN 109361550A CN 201811390557 A CN201811390557 A CN 201811390557A CN 109361550 A CN109361550 A CN 109361550A
Authority
CN
China
Prior art keywords
configuration
template
data file
configuration data
management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811390557.5A
Other languages
Chinese (zh)
Other versions
CN109361550B (en
Inventor
颜靖华
邹新宇
李政
尚宪峰
王维晟
喻梁文
薛春晖
吴志敏
杨芳
王智勇
杨圣峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gongxintong (beijing) Information Technology Co Ltd
Beijing University of Posts and Telecommunications
National Computer Network and Information Security Management Center
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Gongxintong (beijing) Information Technology Co Ltd
Beijing University of Posts and Telecommunications
National Computer Network and Information Security Management Center
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gongxintong (beijing) Information Technology Co Ltd, Beijing University of Posts and Telecommunications, National Computer Network and Information Security Management Center, Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Gongxintong (beijing) Information Technology Co Ltd
Priority to CN201811390557.5A priority Critical patent/CN109361550B/en
Publication of CN109361550A publication Critical patent/CN109361550A/en
Application granted granted Critical
Publication of CN109361550B publication Critical patent/CN109361550B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0843Configuration by using pre-existing information, e.g. using templates or copying from other elements based on generic templates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0266Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Landscapes

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

Abstract

本发明公开了一种网络设备配置管理的方法、装置及设备,其中,一种网络设备配置管理的方法,包括:将配置信息嵌入到待实例化模板件中,从而得到含有配置信息的配置数据文件,所述待实例化模板件是通过精简网络设备的yang模型文件的映射模板得到的;将所述配置数据文件进行预处理,得到固定格式的配置数据文件;将所述固定格式的配置数据文件发送;接收对发送的固定格式的配置数据文件的反馈信息。解决了现有技术中存在因网络设备厂商不同而引起的管理配置命令不同,所造成众多设备之间难以维护的问题。

The invention discloses a method, device and equipment for configuration management of network equipment, wherein a method for configuration management of network equipment includes: embedding configuration information into a template to be instantiated, so as to obtain configuration data containing configuration information file, the template to be instantiated is obtained by simplifying the mapping template of the yang model file of the network device; the configuration data file is preprocessed to obtain a fixed-format configuration data file; the fixed-format configuration data File sending; receive feedback on sent fixed-format configuration data files. It solves the problem in the prior art that the management configuration commands are different due to the different network device manufacturers, and the problem of difficult maintenance among many devices is solved.

Description

The method, device and equipment of network equipments configuration management
Technical field
The present invention relates to network communication field more particularly to a kind of method, device and equipments of network equipments configuration management.
Background technique
Since network equipment vendor is numerous at this stage, brand is different, and the management configuration side between each manufacturer, between brand Formula is inconsistent, i.e., configuration order is different, so administrative staff is just needed to grasp the management between each manufacturer and each brand Order, could be managed the network equipment, directly configuring maintenance difficulty of the promotion administrative staff to numerous equipment.In the presence of because of net Management configuration order caused by network device manufacturer's difference is different, is difficult to the problem of safeguarding between caused numerous equipment.
Summary of the invention
The embodiment of the present invention provides a kind of method, device and equipment of network equipments configuration management, to solve existing skill It is different to there is the management configuration order because caused by network equipment vendor is different in art, is difficult to safeguard between caused numerous equipment The problem of.
In a first aspect, the embodiment of the present invention provides a kind of method of network equipments configuration management, comprising:
Configuration information is embedded into formwork parts to be instantiated, so that the configuration data file containing configuration information is obtained, The formwork parts to be instantiated are obtained by the mapping template for simplifying the yang model file of the network equipment;
The configuration data file is pre-processed, the configuration data file of fixed format is obtained;
The configuration data file of the fixed format is sent;
Receive the feedback information of the configuration data file to the fixed format of transmission.
It is described to pre-process the configuration data file as a kind of specific implementation of the embodiment of the present invention, After the step of obtaining the configuration data file of fixed format, further includes:
Establish NetConf session.
It is described that configuration information is embedded into formwork parts to be instantiated as a kind of specific implementation of the embodiment of the present invention In, to obtain the configuration data file containing configuration information, comprising:
Obtain the yang model file of the network equipment;
The yang model file is mapped as the template directly coupled, obtains mapping template;
Using the mapping template as instantiation template;
The instantiation template is filtered, the formwork parts to be instantiated simplified.
As a kind of specific implementation of the embodiment of the present invention, it is described using the mapping template as instantiation template, Specifically:
The mapping template of some and described instruction keyword match is chosen to be used as instantiation template according to command keyword.
As a kind of specific implementation of the embodiment of the present invention, the instantiation template is filtered, is simplified Formwork parts to be instantiated, specifically:
The instantiation template is filtered as search condition according to command keyword, generate one simplify to reality Exampleization formwork parts.
It is described that the instantiation template is filtered as a kind of specific implementation of the embodiment of the present invention, specifically Are as follows:
Filter extra node and label.
As a kind of specific implementation of the embodiment of the present invention, the mapping template, comprising:
Xml template or json string template.
As a kind of specific implementation of the embodiment of the present invention, configuration information is embedded into formwork parts to be instantiated, To obtain the configuration data file containing configuration information, specifically:
In conjunction with the description of the yang file in yang model library, mould is gone here and there by the xml label assignment in xml template or by json Json key-value pair assignment in plate, to obtain the configuration data file containing complete configuration information.
Second aspect, the embodiment of the present invention provide the device of network equipments configuration management, comprising:
It is embedded in module: for configuration information to be embedded into formwork parts to be instantiated, to obtain containing configuration information Configuration data file, the formwork parts to be instantiated are obtained by the mapping template for simplifying the yang model file of the network equipment 's;
Preprocessing module: for pre-processing the configuration data file, the configuration data text of fixed format is obtained Part;
Send request configuration module: for sending the configuration data file of the fixed format;
Receive processing echo module: for receiving the feedback information of the configuration data file to the fixed format of transmission.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, the electronic equipment, comprising: memory, processor And it is stored in the computer program that can be run on the memory and on the processor, the computer program is by the place Manage the step of realizing method as described in relation to the first aspect when device executes.
The embodiment of the present invention is mapped to obtain mapping template by the yang model file to the network equipment simplifies Obtained formwork parts to be instantiated, to configuration information is embedded into formwork parts to be instantiated, to obtain containing with confidence The configuration data file of breath, and it is sent to server-side after configuration file is converted to fixed format, and receive server-side feedback Information, so that the configuration management of the network equipment is completed, by the way that the configuration order of the network equipment of different vendor is converted to unification Configuration data file, the management configuration order because caused by network equipment vendor is different exists in the prior art to solve Difference is difficult to the problem of safeguarding between caused numerous equipment.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is the structural block diagram of NetConf protocol stack shown in the embodiment of the present invention;
Fig. 2 is the flow chart of the method for network equipments configuration management described in the embodiment of the present invention one;
Fig. 3 is that configuration information is embedded into formwork parts to be instantiated described in the embodiment of the present invention one, to be contained There is the flow chart of the configuration data file of configuration information;
Fig. 4 is the functional block diagram of the device of network equipments configuration management described in the embodiment of the present invention two;
Fig. 5 is the functional block diagram of insertion module described in the embodiment of the present invention two;
Fig. 6 is the specific architecture diagram of the device of network equipments configuration management described in the embodiment of the present invention two.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
6241 rule of RFC is deferred in existing configuration management system whole design, wherein RFC (Request For It Comments) is a series of to number the file that is ranked, file collection related Internet relevant information and unix and interconnection The software document of community is netted, almost all of Internet Standard is all embodied in RFC file, the related introduction of NetConf agreement Also within RFC Convergence-free spaces.
RFC6241, which describes NetConf agreement, should defer to C/S framework, thus according to NetConf Protocol Through Network equipment into Row management, but wherein any support net can be so used there is no the development language that regulation client and server-side use The development language of network socket programming carries out the design of client, such as java, c language, python, c# etc..And client Connection type can be SSH or HTTP, and interaction content is the byte stream or JSON string of xml format, and xml byte stream or JSON string are joined Examine the generation of yang model.
Yang model is the data modelling language that generates with NetConf agreement, has the definition of RFC 6020, is similar to The SMI of XML Schema and SNMP have good readable and scalability.It is described in detail in RFC 6044 The correlation and network management framework of NetConf and YANG model.
NetConf protocol stack as shown in Figure 1, this specification using the data structure for realizing NETCONF based on SSH and XML and Protocol interaction defines the data format of network equipment relevant configured parameter.
Transport layer, which describes client and server-side, should support SSH agreement, and the transport layer should meet wanting for RFC6242 It asks.Specifically used ssh2 connection protocol is managed for configuration, and client can support more sessions, and server-side is also required to support more Client connection.
Message layer describes the detailed configuration management information that client is interacted with server-side, and client should be disappeared using<RPC> The request that breath encapsulation is sent to server-side should complete corresponding configuration after server-side parses rpc message.If configuration successful, will match It sets relevant information to be encapsulated in<rpc-reply>message, and returns to client;If configuration failure encapsulates error message Client is returned in<rpc error>.If server-side is handled in<rpc>message process, there is no mistake or warnings, and Client does not request any data, then server-side should return to<ok>message.
Operation layer, which describes server-side and client, should support basic agreement as defined in NETCONF agreement to operate, main to wrap It includes: get, get-config, edit-config, copy-config, delete-config, lock, unlock, close- session,kill-session,execute-action.The operation that client is initiated may succeed, and server-side should be by operation As a result it is encapsulated in<rpc-reply>and returns to client.It may also fail, the result of operation should be encapsulated in < rpc- by server-side Error > middle return client.
Content layer describes between NetConf server-side and NetConf client carrying out for the network equipment for interaction Data content, the data content mainly enumerate the configuration management content to server-side.
For foregoing description, current existing client-side management tool needs user manually according to yang model editing xml, To complete the configuration management to the network equipment, although this mode directly, still has some limitations, such as at present Existing client is self configuration tool, that is, the interface of secondary development is not present, so as to cause the expansible of the tool Property reduce, so can not with existing management system carry out joint debugging, be not easy to the management and application of enterprise-level.It designs thus a Convenient for the client configuration tool of enterprise-level management and application, and the tool that can be called by other management systems urgently solves Certainly.
The embodiment of the present invention provides the method and method of a kind of network equipments configuration management, is specifically based on NetConf agreement Realize network equipments configuration management, it is different to solve the management configuration order because caused by network equipment vendor is different, thus Be difficult to the difficult problem safeguarded between caused numerous equipment, the embodiment of the present invention use ssh establish connection and transmitting-receiving xml as The data information of NetConf both sides' interaction.The embodiment of the present invention is network equipment needs using the premise of NetConf protocol communication Support NetConf management agreement, and can be with wildcard all-network if guaranteeing yang model that each device manufacturer uses unanimously Equipment, master of the embodiment of the present invention to illustrate that using command keyword technology and combine yang model file to the network equipment into Row configuration management.If necessary to the general each network equipment of management, it is thus only necessary to which unified yang model now passes through NetConf agreement completes the Routine Management function of the network equipment, and the Routine Management of the network equipment includes network device user pipe The common management function such as reason, network equipment snmp management, network equipment ntp service management, network equipment routing (route) management Can, the user management example of Configuration network equipment, is described in detail the function that the set system and method are realized.
Embodiment one:
The embodiment of the present invention provides a kind of method of network equipments configuration management, as shown in Figure 2, comprising:
Step S201: configuration information is embedded into formwork parts to be instantiated, to obtain the configuration containing configuration information Data file, the formwork parts to be instantiated are obtained by the mapping template for simplifying the yang model file of the network equipment;
All NetConf configurations meet the description of corresponding yang model file, i.e. the content layer of NetConf agreement is used This meets the description of yang model file.
According to the description of RFC 6241, the data flow of NetConf protocol client and server-side communication is the word of xml format Throttling or JSON byte stream, and a kind of file of xml that yang model is used to describe to ultimately generate as just modeling language or The format standard that JSON string should abide by, so the yang model provided network equipment provider is needed to do direct mapping, it will Yang model is mapped as mapping template, optionally, mapping template, comprising: xml template or json string template.Map it is a set of with The xml template for having direct-coupling relationship or json go here and there template, the xml message or json message configured needed for final is to be based on After current xml template or the instantiation of json mould as a result, the message or json message of the xml format of the instantiation can be used for visitor Directly it is handed down to the server-side network equipment in family end.
The mapping template of the yang model file of the network equipment is simplified i.e. to the mapping template progress as hypostazation template Filtering, optionally, the instantiation template is filtered, specifically: filter extra node and label.Since the network equipment mentions The yang model provided for quotient is most complete, and probably only configures sub-fraction therein in actual use, therefore is needed The node and label in addition to this configuration are filtered out, the function of extra node and label is filtered.
Optionally, configuration information is embedded into formwork parts to be instantiated, to obtain the configuration number containing configuration information According to file, specifically:
In conjunction with the description of the yang file in yang model library, mould is gone here and there by the xml label assignment in xml template or by json Json key-value pair assignment in plate, to obtain the configuration data file containing complete configuration information.
Step S202: the configuration data file is pre-processed, and obtains the configuration data file of fixed format;
In actual production environment, inevitably since the mistake of configuration in logic leads to configuration failure, i.e. Netconf service End can not correctly respond the configuration data that NetConf client issues, so misarrangement first have to verifying be verifying configuration number According to correctness be difficult error correction, so configuration data format just shows volume especially and if configuration data format is more mixed and disorderly It is important.Therefore it needs that configuration data file is converted to unified fixed format by pre-processing configuration data file. Such as the tree-like retraction structure of xml format is converted to, to reinforce exporting the interactivity of result.
Step S203: the configuration data file of the fixed format is sent;
In a specific application scenarios, configuration data file is converted to unified xml document, client passes through Xml document is sent to server-side by send () method, is sent rear client and is entered standby mode, that is, waits and configuring next time The transmission of data file.
Step S204: the feedback information of the configuration data file to the fixed format of transmission is received.
While client sends configuration data file, client also passes through recv () method and starts to receive from service The xml byte flow message sent is held, the state that data are described in the xml byte stream by judgement echo can determine whether that server-side is The no correct request configuration for responding client, returns to<ok>label if success.< rpc- is returned if configuring request failure error>。
As a specific embodiment of the present invention, the configuration data file is located in advance described in step S202 After the step of managing, obtaining the configuration data file of fixed format, further includes:
Establish NetConf session.
NetConf session is established between NetConf client and the server-side network equipment for supporting NetConf agreement, it is double Fang Shouxian sends and receives<hello>message, to identify the processing capacity rank of each self-supporting of both sides and the version of relevant configuration This message, to establish session between client and the server-side network equipment of support NetConf agreement, which accords with completely Close the description in RFC6241.Session connection specially is established using socket fastening means and NetConf server-side, the company of foundation Enter wait state after connecing, this pending state will wait the xml document message of some specific configuring request to be specified, in this reality Apply in example, after specifying the generated xml document of previous step, the content of specified xml data will be read, will read result by The send method of socket is sent to the server-side network equipment, and the xml configuring request of client is completed with this.
As a specific embodiment of the present invention, as shown in figure 3, described in step S201 by configuration information be embedded into It instantiates in formwork parts, to obtain the configuration data file containing configuration information, comprising:
Step S301: the yang model file of the network equipment is obtained;
Because all NetConf configurations meet the description of corresponding yang model file, the i.e. content layer of NetConf agreement Meet the description of yang model file with this.
Therefore when carrying out network equipments configuration, the yang model file for obtaining the network equipment is first had to.
Step S302: the yang model file is mapped as the template directly coupled, obtains mapping template;
Yang model file is mapped as a set of mapping template for having direct-coupling relationship therewith, mapping template, including Xml template or json string template.
Step S303: using the mapping template as instantiation template;
Because last xml message or json message as configuration data file is based on current xml template or json Result after mould instantiation.In order to which the administration order to different vendor carries out unification, need to provide a unification to administration order Template, this step will above to yang model file mapping mapping template as instantiation template, finally will configure Parameter fills in the corresponding position in the template such as corresponding instantiation.
Step S304: the instantiation template is filtered, the formwork parts to be instantiated simplified.
Since the yang model that network equipment provider provides is most complete, and only configuration very possible in actual use Sub-fraction therein, therefore need to filter out node and label in addition to this configuration, filter the function of extra node and label Energy.
As a specific embodiment of the present invention, using the mapping template as instantiation mould described in step S303 Plate, specifically:
The mapping template of some and described instruction keyword match is chosen to be used as instantiation template according to command keyword.
As a specific embodiment of the present invention, step S304 is filtered the instantiation template, obtains essence The formwork parts to be instantiated of letter, specifically:
The instantiation template is filtered as search condition according to command keyword, generate one simplify to reality Exampleization formwork parts.
Embodiment two:
As shown in figure 4, the embodiment of the present invention provides a kind of device of network equipments configuration management, comprising:
It is embedded in module 401: for configuration information to be embedded into formwork parts to be instantiated, to obtain containing configuration information Configuration data file, the formwork parts to be instantiated are obtained by the mapping template for simplifying the yang model file of the network equipment It arrives;
Preprocessing module 402: for pre-processing the configuration data file, the configuration data of fixed format is obtained File;
Send request configuration module 404: for sending the configuration data file of the fixed format;
Receive processing echo module 405: for receiving the feedback information of the configuration data file to the fixed format of transmission.
As a specific embodiment of the present invention, device further include:
Session establishment module 403: for establishing NetConf session.
As a specific embodiment of the present invention, as shown in figure 5, insertion module 401, comprising:
Yang model management module 501: the yang model file of the network equipment is obtained;
Yang model mapping block 502: it for the yang model file to be mapped as the template directly coupled, obtains To mapping template;
Instantiate formwork module 503: for using the mapping template as instantiation template;
Configuration information abstraction module 504: for being filtered to the instantiation template, the mould to be instantiated simplified Plate.
As a specific embodiment of the present invention, formwork module 503 is instantiated, specific:
For choosing the mapping template of some and described instruction keyword match to be used as instantiation mould according to command keyword Plate.
As a specific embodiment of the present invention, configuration information abstraction module 504 is specific:
For being filtered as search condition to the instantiation template according to command keyword, what generation one was simplified Formwork parts to be instantiated.
As a specific embodiment of the present invention, configuration information abstraction module 504 is specific: extra for filtering Node and label.
As a specific embodiment of the present invention, the mapping template, comprising: xml template or json string template.
As a specific embodiment of the present invention, it is embedded in module 401, specific:
For combining the description of the yang file in yang model library, by the xml label assignment in xml template or by json Json key-value pair assignment in string template, to obtain the configuration data file containing complete configuration information.
Yang model management module 501 is mainly used for storing complete yang model file, is all yang model files Aggregate, all NetConf configurations meet the description of corresponding yang model file, the i.e. content layer of NetConf agreement Meet the description of yang model file with this.
Yang model mapping block 502, according to the description of RFC 6241, NetConf protocol client and server communication Data flow be xml format byte stream or JSON byte stream, and yang model as just a kind of modeling language for describing The format standard that file or the JSON string of the xml ultimately generated should abide by, so need to provide network equipment provider Yang model does direct mapping, that is, a set of xml template for having direct-coupling relationship therewith or json string template is mapped, needed for final The xml message or json message of configuration are after being instantiated based on current xml template or json mould as a result, the instantiation The message or json message of xml format can be used for client and is directly handed down to the server-side network equipment.
The characteristics of configuration information abstraction module 504, is a dynamic abstraction module, the abstraction module be using it is preceding more Newly, it to prevent yang model file from having variation, is described with ensuring compliance with newest yang model file to the function of NetConf.By It is most complete in the yang model that network equipment provider provides, and probably only to configure therein one small in actual use Part, thus need filter out except this configuration in addition to node and label, it is this based on yang model mapping block be filtered from And the process of xml format messages stream needed for generating configuration or json format messages stream is NetConf of embodiment of the present invention configuration One feature.
Insertion module 401 further includes instantiation module 505, and instantiation module 505 is most important and most crucial system mould Block, the module inherit the instantiation of the configuration information abstraction module provided in configuration information abstraction module, the process of the instantiation It is exactly the description in conjunction with the yang file in yang model library, by xml label assignment or json key-value pair assignment, to formed Whole configuration distributing message.
About preprocessing module 402, the effect for distributing data structure rationally has been primarily served, convenient for checking and error correction, In actual production environment, inevitably since the mistake of configuration in logic leads to configuration failure, i.e. Netconf server-side can not be correct The configuration data that issues of response NetConf client, so what misarrangement first had to verifying is the correctness for verifying configuration data, And if configuration data format is more mixed and disorderly, it is difficult error correction, so just to show volume particularly important for configuration data format.
Configuration module 404 is requested about sending, has primarily served the effect of NetConf client and server-side interaction, it should The information that request configuration module 404 receives preprocessing module 402 is sent, the configuration data file of instantiation is read into memory Byte stream is formed, completes to send convenient for client.
Echo module 405 is handled about receiving, has primarily served the configuration knot that NetConf client receives server-side echo Fruit, to check the responsive state of server-side, if the success response configuration message of client, feeds back ok, such as fail into The configuring request at function customer in response end, then can feedback error message, can according to error message carry out error correction.It is mainly used for realizing NetConf client sends the design and displaying of the correlation function of configuration to server-side.The device of network equipments configuration management has Body framework is as shown in Figure 6.
Embodiment three:
The embodiment of the present invention is a specific example of the method for network equipments configuration management, specific as follows:
The present invention provides a kind of method of network equipments configuration management, is based on NetConf protocol realization network equipments configuration Management, comprising:
Step 1: configuration information extracts, and corresponds to configuration information abstraction module 504, wherein yang model mapping block 502 As configuration information extract input, yang model mapping result as yang model management module 501 as a result, for realization compared with For complete embodiment example, following yang model is now provided and is referred to as embodiment, as follows:
Further, following xml template file can then be generated according to the above yang model:
Further, in conjunction with the configuration keyword operating specification pre-defined, user can be used and such as give an order: “adduser-name admin-password 123456-user-type admin-access"rs232ssh netconf"- Status active " interpreter will carry out the instantiation of xml format, instantiation to yang file according to the instruction that user inputs Export result it is as follows, be meet the character crossfire of xml format, such as: "<edit-config><target><running></ target><default-operation>merge</default-opera tion><config><user-manage Xmlns=" http://example.com/users "><users operation="merge"><name>admin</name ><password>123456</password><user-ty pe>admin</user-type><access><ssh>true</ ssh><rs232>true</rs232><netconf>true</netconf></access><status>active</status ></users></user-manage></config></edit-c onfig>”
Step 2: configuration data pretreatment, the step processing mode is i.e. using the output xml of step 1 as the input of the step Information, format is as follows after processing:
The apparent retraction structure for optimizing xml of the step.
Step 3: establishing NetConf session, is established using socket fastening means and network equipment NetConf server-side Session connection enters wait state after establishing connection, and this pending state will wait the xml of some specific configuring request to be specified File message after the xml document for specifying previous step generated, will read the interior of specified xml data in the present embodiment Hold, read result by the send method of socket and be sent to server-side network equipment end, is asked with the xml configuration that this completes client It asks.
Step 4: sending and receiving xml byte stream, wherein xml byte stream is sent, by the number in the xml document of instantiation It opens and is read in memory according to content, sent using socket socket, to complete to match the server-side network equipment It sets, realizes the function of management user;Xml byte stream is wherein received, such as checks configuration result, to guarantee to match the network equipment Set errorless, so that carry out configuration result checks verifying, the querying command " get-config " that netconf can be used to provide, which obtains, to be used Family details complete the admin-authentication to the network equipment with this, and the xml byte stream message format received is as follows:
The xml pattern that above example only operates " edit-config " in the operation layer for illustrating NetConf agreement, But other operating protocols of the operation layer of NetConf equally may be implemented.Such as it realizes and operates as follows: " get-config ", " get ", " copy-config ", " delete-config ", " lock ", " unlock ", " close-session " and " kill- Session ", following example comply fully with RFC6241 specification description.
" get-config " operation (obtains run mode database message):
" get " operation (obtains inherent data):
" copy-config " operation (configuration of copy existing device):
" delete-config " operation (deletes the configuration of " starting up " state database):
" lock " operation (" run mode " locking, prevent its user from seizing configuration):
" unlock " operation (" run mode " unlock, allow its user configuration):
" close-session " operation (terminates NetConf session):
" kill-session " operates (forced termination NetConf session):
In conclusion method and apparatus of the present invention, complete configuration pipe using NetConf agreement for the network equipment Reason, application method is simple, powerful, easy to use, easy to use, enormously simplifies usual O&M operation, reduces fortune Tie up cost.
Also, method and apparatus described in the embodiment of the present invention, whole process are instructed using predefined simplify configuration, without using Grasp complicated programming knowledge in family, it is only necessary to whole management function of the network equipment can be completed according to the configuration-direct set in advance Can, successfully solve the disadvantage that system configuration command is complicated under the configuration order row of network equipment itself and is difficult to remember.
Example IV:
The embodiment of the present invention provides a kind of electronic equipment, the electronic equipment, comprising: memory, processor and is stored in On the memory and the computer program that can run on the processor, the computer program are executed by the processor The method and step of Shi Shixian embodiment one.
Processor can be general processor, such as central processing unit (Central Processing Unit, CPU), also It can be digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), or be arranged to implement the one or more of the embodiment of the present invention Integrated circuit.Wherein, memory is used to store the executable instruction of the processor;Memory, for storing program code, and The program code is transferred to processor.Memory may include volatile memory (Volatile Memory), such as at random It accesses memory (Random Access Memory, RAM);It also may include nonvolatile memory (Non-Volatile ), such as read-only memory (Read-Only Memory, ROM), flash memory (Flash Memory), hard disk Memory (Hard Disk Drive, HDD) or solid state hard disk (Solid-State Drive, SSD);It can also include depositing for mentioned kind The combination of reservoir.
The embodiment of the present invention also provides a kind of offer computer readable storage medium, on the computer readable storage medium It is stored with computer program, the method and step of embodiment one is realized when the computer program is executed by processor.
For the embodiment of the present invention compared with existing configuration management tool, the embodiment of the present invention has following features, passes through Based on the system and method for NetConf protocol realization network equipments configuration management, the fortune for numerous network equipments can be reduced Tie up cost and management difficulty;It is easy to operate and use, use xml byte stream as the medium of two-sided information interaction, this makes User is using xml but does not operate xml directly, avoids the dry as dust of directly operation xml;There are higher serious forgiveness, meeting one Determine the mistake input for filtering out user in degree, avoids the generation of this lower level error of xml document mistake.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service End, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of method of network equipments configuration management characterized by comprising
Configuration information is embedded into formwork parts to be instantiated, so that the configuration data file containing configuration information is obtained, it is described Formwork parts to be instantiated are obtained by the mapping template for simplifying the yang model file of the network equipment;
The configuration data file is pre-processed, the configuration data file of fixed format is obtained;
The configuration data file of the fixed format is sent;
Receive the feedback information of the configuration data file to the fixed format of transmission.
2. the method for network equipments configuration management as described in claim 1, which is characterized in that described by the configuration data text After the step of part is pre-processed, and the configuration data file of fixed format is obtained, further includes:
Establish NetConf session.
3. the method for network equipments configuration management as described in claim 1, which is characterized in that described to be embedded into configuration information In formwork parts to be instantiated, to obtain the configuration data file containing configuration information, comprising:
Obtain the yang model file of the network equipment;
The yang model file is mapped as the template directly coupled, obtains mapping template;
Using the mapping template as instantiation template;
The instantiation template is filtered, the formwork parts to be instantiated simplified.
4. the method for network equipments configuration management as claimed in claim 3, which is characterized in that described to make the mapping template To instantiate template, specifically:
The mapping template of some and described instruction keyword match is chosen to be used as instantiation template according to command keyword.
5. the method for network equipments configuration management as claimed in claim 3, which is characterized in that carried out to the instantiation template Filtering, the formwork parts to be instantiated simplified, specifically:
The instantiation template is filtered as search condition according to command keyword, generation one is simplified to be instantiated Formwork parts.
6. the method for network equipments configuration management as claimed in claim 3, which is characterized in that described to the instantiation template It is filtered, specifically:
Filter extra node and label.
7. the method for network equipments configuration management as described in claim 1, which is characterized in that the mapping template, comprising:
Xml template or json string template.
8. the method for network equipments configuration management as claimed in claim 7, which is characterized in that being embedded into configuration information to reality In exampleization formwork parts, so that the configuration data file containing configuration information is obtained, specifically:
In conjunction with the description of the yang file in yang model library, gone here and there in template by the xml label assignment in xml template or by json Json key-value pair assignment, to obtain the configuration data file containing complete configuration information.
9. a kind of device of network equipments configuration management characterized by comprising
It is embedded in module: for configuration information to be embedded into formwork parts to be instantiated, to obtain the configuration containing configuration information Data file, the formwork parts to be instantiated are obtained by the mapping template for simplifying the yang model file of the network equipment;
Preprocessing module: for pre-processing the configuration data file, the configuration data file of fixed format is obtained;
Send request configuration module: for sending the configuration data file of the fixed format;
Receive processing echo module: for receiving the feedback information of the configuration data file to the fixed format of transmission.
10. a kind of electronic equipment, which is characterized in that the electronic equipment, comprising: memory, processor and be stored in described deposit On reservoir and the computer program that can run on the processor, the computer program are realized when being executed by the processor The step of method as claimed in any one of claims 1 to 8.
CN201811390557.5A 2018-11-21 2018-11-21 Method, device and device for configuration management of network equipment Active CN109361550B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811390557.5A CN109361550B (en) 2018-11-21 2018-11-21 Method, device and device for configuration management of network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811390557.5A CN109361550B (en) 2018-11-21 2018-11-21 Method, device and device for configuration management of network equipment

Publications (2)

Publication Number Publication Date
CN109361550A true CN109361550A (en) 2019-02-19
CN109361550B CN109361550B (en) 2021-06-08

Family

ID=65338277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811390557.5A Active CN109361550B (en) 2018-11-21 2018-11-21 Method, device and device for configuration management of network equipment

Country Status (1)

Country Link
CN (1) CN109361550B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311826A (en) * 2019-08-08 2019-10-08 迈普通信技术股份有限公司 Method for configuring network equipment and device
CN110474794A (en) * 2019-07-10 2019-11-19 烽火通信科技股份有限公司 A kind of information conversion method and system of SDN framework
CN111711532A (en) * 2020-04-30 2020-09-25 国家计算机网络与信息安全管理中心 A unified management method for heterogeneous network devices
WO2020207051A1 (en) * 2019-04-11 2020-10-15 华为技术有限公司 Method and apparatus for network verification
CN112187525A (en) * 2019-10-31 2021-01-05 华为技术有限公司 Device management method, device, system, device and storage medium
CN112600685A (en) * 2020-10-30 2021-04-02 中盈优创资讯科技有限公司 Automatic detection and issuing method for IP RAN network equipment configuration specification
CN112597343A (en) * 2020-12-21 2021-04-02 安徽皖通邮电股份有限公司 Netconf automatic configuration generation method
CN113326159A (en) * 2020-02-29 2021-08-31 华为技术有限公司 Method, apparatus, system, and computer-readable storage medium for fault injection
CN114844756A (en) * 2022-05-09 2022-08-02 杭州云合智网技术有限公司 A method for managing network equipment based on NETCONF proxy server
US20220278897A1 (en) * 2021-02-26 2022-09-01 Hewlett Packard Enterprise Development Lp Systems and methods for preprocessing automated network device configuration generation templates
CN115037587A (en) * 2022-06-23 2022-09-09 未鲲(上海)科技服务有限公司 Method, device, equipment and storage medium for automatically issuing network equipment configuration
CN115174398A (en) * 2022-06-24 2022-10-11 浪潮卓数大数据产业发展有限公司 Network equipment configuration method, equipment and medium based on python interactive shell
CN117278396A (en) * 2023-09-21 2023-12-22 中科驭数(北京)科技有限公司 DPU network card configuration method and device
WO2024016726A1 (en) * 2022-07-20 2024-01-25 华为技术有限公司 Device configuration method, network device, chip and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559251A (en) * 2015-09-30 2017-04-05 中兴通讯股份有限公司 A kind of Compilation Method and corresponding interface, component and system based on YANG models
US9715380B2 (en) * 2015-05-26 2017-07-25 Cisco Technology, Inc. Techniques for enabling dynamic update of device data models
US20180013662A1 (en) * 2016-07-05 2018-01-11 Cisco Technology, Inc. Method and apparatus for mapping network data models
CN108055142A (en) * 2017-09-30 2018-05-18 广州西麦科技股份有限公司 A kind of interface automatic configuration method and system of vCPE equipment
CN108055143A (en) * 2017-09-30 2018-05-18 广州西麦科技股份有限公司 The collocation method and system of a kind of SDN-Hub

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9715380B2 (en) * 2015-05-26 2017-07-25 Cisco Technology, Inc. Techniques for enabling dynamic update of device data models
CN106559251A (en) * 2015-09-30 2017-04-05 中兴通讯股份有限公司 A kind of Compilation Method and corresponding interface, component and system based on YANG models
US20180013662A1 (en) * 2016-07-05 2018-01-11 Cisco Technology, Inc. Method and apparatus for mapping network data models
CN108055142A (en) * 2017-09-30 2018-05-18 广州西麦科技股份有限公司 A kind of interface automatic configuration method and system of vCPE equipment
CN108055143A (en) * 2017-09-30 2018-05-18 广州西麦科技股份有限公司 The collocation method and system of a kind of SDN-Hub

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
AUTOMATION: "Configuring Cisco IOS XE With YANG-based YAML Files", 《HTTPS://NETWORKOP.CO.UK/BLOG/2017/03/13/YAML-YANG》 *
AUTOMATION: "Getting Started With NETCONF and YANG on Cisco IOS XE", 《HTTPS://NETWORKOP.CO.UK/BLOG/2017/01/25/NETCONF-INTRO/》 *
AUTOMATION: "Introduction ot YANG Programming and RESTCONF on Cisco IOS XE", 《HTTPS://NETWORKOP.CO.UK/BLOG/2017/02/15/RESTCONF-YANG/#DISQUS_THREAD》 *

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020207051A1 (en) * 2019-04-11 2020-10-15 华为技术有限公司 Method and apparatus for network verification
US11909744B2 (en) 2019-04-11 2024-02-20 Huawei Technologies Co., Ltd. Network verification method and apparatus
CN110474794B (en) * 2019-07-10 2021-04-27 烽火通信科技股份有限公司 An information conversion method and system for SDN architecture
CN110474794A (en) * 2019-07-10 2019-11-19 烽火通信科技股份有限公司 A kind of information conversion method and system of SDN framework
CN110311826A (en) * 2019-08-08 2019-10-08 迈普通信技术股份有限公司 Method for configuring network equipment and device
CN110311826B (en) * 2019-08-08 2022-05-17 迈普通信技术股份有限公司 Network equipment configuration method and device
CN112751698A (en) * 2019-10-31 2021-05-04 华为技术有限公司 Device management method, device, system, device and storage medium
CN112187525B (en) * 2019-10-31 2021-08-20 华为技术有限公司 Device management method, device, system, device and storage medium
US12095637B2 (en) 2019-10-31 2024-09-17 Huawei Technologies Co., Ltd. Device management method, apparatus, system, and device, and storage medium
CN112187525A (en) * 2019-10-31 2021-01-05 华为技术有限公司 Device management method, device, system, device and storage medium
CN112751698B (en) * 2019-10-31 2023-10-24 华为技术有限公司 Device management method, device, system, device and storage medium
CN113326159B (en) * 2020-02-29 2023-02-03 华为技术有限公司 Method, apparatus, system and computer readable storage medium for fault injection
CN113326159A (en) * 2020-02-29 2021-08-31 华为技术有限公司 Method, apparatus, system, and computer-readable storage medium for fault injection
CN111711532B (en) * 2020-04-30 2022-10-04 国家计算机网络与信息安全管理中心 Unified management method for heterogeneous network equipment
CN111711532A (en) * 2020-04-30 2020-09-25 国家计算机网络与信息安全管理中心 A unified management method for heterogeneous network devices
CN112600685A (en) * 2020-10-30 2021-04-02 中盈优创资讯科技有限公司 Automatic detection and issuing method for IP RAN network equipment configuration specification
CN112597343A (en) * 2020-12-21 2021-04-02 安徽皖通邮电股份有限公司 Netconf automatic configuration generation method
US11770299B2 (en) * 2021-02-26 2023-09-26 Hewlett Packard Enterprise Development Lp Systems and methods for preprocessing automated network device configuration generation templates
US20220278897A1 (en) * 2021-02-26 2022-09-01 Hewlett Packard Enterprise Development Lp Systems and methods for preprocessing automated network device configuration generation templates
CN114844756A (en) * 2022-05-09 2022-08-02 杭州云合智网技术有限公司 A method for managing network equipment based on NETCONF proxy server
CN115037587A (en) * 2022-06-23 2022-09-09 未鲲(上海)科技服务有限公司 Method, device, equipment and storage medium for automatically issuing network equipment configuration
CN115037587B (en) * 2022-06-23 2024-03-22 佛山领客易选科技服务有限公司 Automatic issuing method, device, equipment and storage medium for network equipment configuration
CN115174398A (en) * 2022-06-24 2022-10-11 浪潮卓数大数据产业发展有限公司 Network equipment configuration method, equipment and medium based on python interactive shell
WO2024016726A1 (en) * 2022-07-20 2024-01-25 华为技术有限公司 Device configuration method, network device, chip and computer readable storage medium
CN117278396A (en) * 2023-09-21 2023-12-22 中科驭数(北京)科技有限公司 DPU network card configuration method and device
CN117278396B (en) * 2023-09-21 2024-10-18 中科驭数(北京)科技有限公司 DPU network card configuration method and device

Also Published As

Publication number Publication date
CN109361550B (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN109361550A (en) Method, device and device for configuration management of network equipment
WO2017054531A1 (en) Yang model-based compiling method, and corresponding interface, component, and system
Medved et al. Opendaylight: Towards a model-driven sdn controller architecture
US7751339B2 (en) Method and apparatus for simply configuring a subscriber appliance for performing a service controlled by a separate service provider
US8099456B2 (en) Application programming interface for implementing directory service access using directory service markup language
EP3432517B1 (en) Device configuration method and apparatus based on network configuration protocol
CN103297475B (en) Mock service system and the processing method of Mock service
KR100453824B1 (en) XML based network management system and method for configuration management of heterogeneous network devices
US6804816B1 (en) Method and template for developing device-centric network management applications
CN104883266B (en) network configuration access method and device
CN106776313A (en) A kind of method of analog service, device and centralized management platform
EP3170284A1 (en) Enhanced operations between service layer and management layer in an m2m system by allowing the execution of a plurality of commands on a plurality of devices
US20130290453A1 (en) System and method for a connector being able to adapt to newer features introduced to a messaging provider with only configuration changes
US20030131075A1 (en) Language and interface for unified network service creation, provision and deployment
CN107133024A (en) Business management system based on OSGI frameworks
CN113296987B (en) Interface calling method and device for calling module, computer equipment and storage medium
CN114254606A (en) Microservice framework model
CN115883669B (en) Data distribution method, system, equipment and medium
WO2017219778A1 (en) Method for configuring service for router, router, and storage medium
KR20180058458A (en) Virtualized network function management method and virtualized network function manager using TOSCA based information model, and network function virtualization system using the same
CN106453686B (en) Connection method and connection device of JMX client
CN115866069A (en) Method and system for processing remote call request and electronic equipment
CN110955537B (en) Method and device for containing pipes by physical machine
CN116701004A (en) Cloud function development method, device, electronic device and storage medium
CN115550468A (en) Service request processing method, device, equipment and medium

Legal Events

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