CN109361550B - Method, device and equipment for network equipment configuration management - Google Patents
Method, device and equipment for network equipment configuration management Download PDFInfo
- Publication number
- CN109361550B CN109361550B CN201811390557.5A CN201811390557A CN109361550B CN 109361550 B CN109361550 B CN 109361550B CN 201811390557 A CN201811390557 A CN 201811390557A CN 109361550 B CN109361550 B CN 109361550B
- Authority
- CN
- China
- Prior art keywords
- template
- configuration
- data file
- configuration data
- instantiated
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/084—Configuration by using pre-existing information, e.g. using templates or copying from other elements
- H04L41/0843—Configuration by using pre-existing information, e.g. using templates or copying from other elements based on generic templates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/0246—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
- H04L41/0266—Exchanging 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]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration 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
The invention discloses a method, a device and equipment for network equipment configuration management, wherein the method for network equipment configuration management comprises the following steps: embedding the configuration information into a template component to be instantiated, so as to obtain a configuration data file containing the configuration information, wherein the template component to be instantiated is obtained by simplifying a mapping template of a yang model file of the network equipment; preprocessing the configuration data file to obtain a configuration data file with a fixed format; sending the configuration data file with the fixed format; and receiving feedback information of the transmitted configuration data file with the fixed format. The problem that in the prior art, a plurality of devices are difficult to maintain due to different management configuration commands caused by different network device manufacturers is solved.
Description
Technical Field
The present invention relates to the field of network communications, and in particular, to a method, an apparatus, and a device for network device configuration management.
Background
At present, network equipment manufacturers are numerous and brands are different, management configuration modes of manufacturers and brands are different, namely configuration commands are different, so that management personnel are required to master the management commands of the manufacturers and the brands to manage the network equipment, and the difficulty in configuration and maintenance of numerous equipment by the management personnel is directly improved. The problem that the management configuration commands are different due to different network equipment manufacturers, and therefore maintenance among a plurality of equipment is difficult is solved.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, and a device for network device configuration management, so as to solve the problem in the prior art that a plurality of devices are difficult to maintain due to different management configuration commands caused by different network device manufacturers.
In a first aspect, an embodiment of the present invention provides a method for network device configuration management, where the method includes:
embedding the configuration information into a template component to be instantiated, so as to obtain a configuration data file containing the configuration information, wherein the template component to be instantiated is obtained by simplifying a mapping template of a yang model file of the network equipment;
preprocessing the configuration data file to obtain a configuration data file with a fixed format;
sending the configuration data file with the fixed format;
and receiving feedback information of the transmitted configuration data file with the fixed format.
As a specific implementation manner of the embodiment of the present invention, after the step of preprocessing the configuration data file to obtain the configuration data file with a fixed format, the method further includes:
a NetConf session is established.
As a specific implementation manner of the embodiment of the present invention, the embedding the configuration information into the template component to be instantiated to obtain the configuration data file containing the configuration information includes:
acquiring a yang model file of the network equipment;
mapping the yang model file into a template directly coupled with the yang model file to obtain a mapping template;
taking the mapping template as an instantiation template;
and filtering the instantiation template to obtain a simplified template component to be instantiated.
As a specific implementation manner of the embodiment of the present invention, the taking the mapping template as an instantiation template specifically includes:
and selecting a mapping template matched with the instruction keywords as an instantiation template according to the instruction keywords.
As a specific implementation manner of the embodiment of the present invention, the instantiated template is filtered to obtain a simplified template component to be instantiated, which specifically includes:
and filtering the instantiation template according to the instruction keywords as search conditions to generate a simplified template component to be instantiated.
As a specific implementation manner of the embodiment of the present invention, the filtering the instantiated template specifically includes:
redundant nodes and labels are filtered.
As a specific implementation manner of the embodiment of the present invention, the mapping template includes:
an xml template or a json string template.
As a specific implementation manner of the embodiment of the present invention, the configuration information is embedded into the template component to be instantiated, so as to obtain a configuration data file containing the configuration information, specifically:
and assigning an xml tag in an xml template or assigning a json key value pair in a json string template by combining the description of the yang file in the yang model library, thereby obtaining a configuration data file containing complete configuration information.
In a second aspect, an embodiment of the present invention provides an apparatus for network device configuration management, where the apparatus includes:
embedding a module: the template component to be instantiated is obtained by simplifying the mapping template of the yang model file of the network equipment;
a preprocessing module: the device is used for preprocessing the configuration data file to obtain a configuration data file with a fixed format;
a sending request configuration module: the device is used for sending the configuration data file with the fixed format;
the receiving, processing and displaying back module: and the feedback information is used for receiving the feedback information of the transmitted configuration data file with the fixed format.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method according to the first aspect.
The embodiment of the invention obtains the template component to be instantiated by simplifying the mapping template by mapping the yang model file of the network equipment, thereby embedding the configuration information into the template component to be instantiated, obtaining the configuration data file containing the configuration information, converting the configuration file into a fixed format, then sending the configuration file to the server, receiving the information fed back by the server, thereby completing the configuration management of the network equipment, and solving the problem that the management configuration commands of the network equipment of different manufacturers are different and the maintenance among a plurality of equipment is difficult due to the different network equipment manufacturers in the prior art by converting the configuration commands into the uniform configuration data file.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a block diagram of a NetConf protocol stack according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for network device configuration management according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating embedding configuration information into a template component to be instantiated to obtain a configuration data file containing configuration information according to a first embodiment of the present invention;
fig. 4 is a schematic block diagram of an apparatus for network device configuration management according to a second embodiment of the present invention;
FIG. 5 is a schematic block diagram of an embedded module according to a second embodiment of the present invention;
fig. 6 is a specific architecture diagram of an apparatus for network device configuration management according to a second embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The existing configuration management system is designed in accordance with the RFC6241 rule, wherein RFC (request For comments) is a series of files with a scheduled number, which collects information about the internet and software files of unix and internet communities, and almost all internet standards are included in the RFC file, and the related introduction of NetConf protocol is also included in the RFC.
RFC6241 describes that the NetConf protocol should comply with the C/S architecture to manage network devices according to the NetConf protocol, but there is no provision for development languages used by the client and the server, so that any development language supporting network socket programming can be used for designing the client, such as java, C language, python, C #, and the like. The connection mode of the client can be SSH or HTTP, the interactive content is byte stream or JSON string in xml format, and the xml byte stream or the JSON string is generated by referring to the yang model.
The yang model is a data modeling language generated along with the NetConf protocol, is defined by RFC 6020, is similar to SMI of XML Schema and SNMP, and has good readability and extensibility. The interrelation of NetConf and YANG models and the network management framework are described in detail in RFC 6044.
The NetConf protocol stack is shown in fig. 1, and the specification defines a data format of a relevant configuration parameter of a network device by adopting a data structure and protocol interaction for realizing NetConf based on SSH and XML.
The transport layer describes that the client and the server should support the SSH protocol, and the transport layer should comply with the requirements of RFC 6242. The ssh2 connection protocol is used for configuration management, and the client can support multiple sessions, and the server also needs to support multiple client connections.
The message layer describes the detailed configuration management information of the interaction between the client and the server, the client should package the request sent to the server by using the < RPC > message, and the server should complete the corresponding configuration after parsing RPC the message. If the configuration is successful, encapsulating the configuration related information in a < rpc-reply > message and returning the configuration related information to the client; if the configuration fails, the error information is encapsulated in < rpc error > and returned to the client. If no error or warning occurs during the process of the < rpc > message by the server and no data is requested by the client, the < ok > message should be returned by the server.
The operation layer describes that the server and the client should support basic protocol operation specified by a NETCONF protocol, and mainly comprises the following steps: get, get-config, edge-config, copy-config, delete-config, lock, unlock, close-session, kill-session, execute-action. The operation initiated by the client may be successful and the server should encapsulate the result of the operation in < rpc-reply > to return to the client. And may also fail, the server should encapsulate the result of the operation in < rpc-error > to return to the client.
The content layer describes data content for network equipment interacted between the NetConf server and the NetConf client, and the data content mainly comprises configuration management content of the server.
For the above description, the existing client management tool needs the user to edit xml manually according to the yang model, so as to complete configuration management of the network device, which is direct, but still has certain limitations, for example, the existing clients are all independent configuration tools, that is, there is no interface for secondary development, so that the extensibility of the tool is reduced, and therefore the existing client management tool cannot be coordinated with the existing management system, and is inconvenient for enterprise-level management and application. Therefore, a client configuration tool convenient for enterprise-level management and application is designed, and tools capable of being called by other management systems are in urgent need of solution.
The embodiment of the invention provides a method and a device for network device configuration management, in particular to a method and a device for network device configuration management based on a NetConf protocol, which are used for solving the difficult problem that a plurality of devices are difficult to maintain due to different management configuration commands caused by different network device manufacturers. The embodiment of the invention uses NetConf protocol communication on the premise that network equipment needs to support NetConf management protocol, and if the yang model used by equipment manufacturers is ensured to be consistent, all the network equipment can be wildcarded. If all the network devices need to be managed in a universal manner, only the yang model needs to be unified, the conventional management function of the network devices is completed through the NetConf protocol, the conventional management of the network devices comprises the common management functions of network device user management, network device snmp management, network device ntp service management, network device route (route) management and the like, the user management example of the network devices is configured, and the functions realized by the system and the method are described in detail.
The first embodiment is as follows:
an embodiment of the present invention provides a method for network device configuration management, as shown in fig. 2, including:
step S201: embedding the configuration information into a template component to be instantiated, so as to obtain a configuration data file containing the configuration information, wherein the template component to be instantiated is obtained by simplifying a mapping template of a yang model file of the network equipment;
all NetConf configurations conform to the description of the corresponding yang model file, i.e., the content layer of the NetConf protocol uses the description of the yang model file.
According to the description of RFC6241, the data stream of the NetConf protocol client and server is a byte stream or JSON byte stream in xml format, while the yang model is only used as a modeling language for describing the format standard to which the finally generated xml file or JSON string should conform, so that it is necessary to directly map the yang model provided by the network equipment provider, and map the yang model into a mapping template, which is optional and includes: an xml template or a json string template. The xml message or json message to be configured finally is based on the instantiated result of the current xml template or json module, and the instantiated xml message or json message can be used for the client to directly issue to the network equipment of the server.
The mapping template of the yang model file of the simplified network device filters the mapping template as an instantiated template, and optionally, the instantiated template is filtered specifically as follows: redundant nodes and labels are filtered. Since the yang model provided by the network equipment provider is the most complete, and only a small part of the nodes is likely to be configured in practical use, it is necessary to filter out nodes and labels except for the configuration, and filter out redundant functions of nodes and labels.
Optionally, the configuration information is embedded into the template component to be instantiated, so as to obtain a configuration data file containing the configuration information, specifically:
and assigning an xml tag in an xml template or assigning a json key value pair in a json string template by combining the description of the yang file in the yang model library, thereby obtaining a configuration data file containing complete configuration information.
Step S202: preprocessing the configuration data file to obtain a configuration data file with a fixed format;
in an actual production environment, it is difficult to avoid configuration failure caused by errors in configuration logic, that is, the Netconf server cannot correctly respond to configuration data sent by the Netconf client, so that the configuration data format is particularly important because the configuration data format is checked to be correct when the configuration data format is disordered. Therefore, the configuration data file needs to be converted into a uniform fixed format by preprocessing the configuration data file. For example, a tree-shaped indented structure converted into xml format, thereby enhancing the interactivity of the output result.
Step S203: sending the configuration data file with the fixed format;
in a specific application scenario, the configuration data file is converted into a uniform xml file, the client sends the xml file to the server through a send () method, and after the sending is finished, the client enters a waiting mode, namely, the client waits for sending the configuration data file next time.
Step S204: and receiving feedback information of the transmitted configuration data file with the fixed format.
When the client sends the configuration data file, the client also starts to receive the xml byte stream message sent from the server by a recv () method, judges whether the server correctly responds to the request configuration of the client by judging the state of the description data in the displayed xml byte stream, and returns an ok tag if the request configuration is successful. Return < rpc-error > if the configuration request fails.
As a specific implementation manner of the present invention, after the step of preprocessing the configuration data file to obtain the configuration data file with the fixed format in step S202, the method further includes:
a NetConf session is established.
The NetConf session is established between the NetConf client and the server network equipment supporting the NetConf protocol, the two parties firstly send and receive a < hello > message to identify the processing capability level and the version message of the relevant configuration supported by the two parties, so that the session is established between the client and the server network equipment supporting the NetConf protocol, and the design completely conforms to the description in RFC 6241. Specifically, a socket connection tool is used to establish a session connection with a NetConf server, and after the session connection is established, the session connection enters a waiting state, and the waiting state waits for an xml file message designating a specific configuration request.
As a specific implementation manner of the present invention, as shown in fig. 3, the step S201 of embedding the configuration information into the template component to be instantiated, so as to obtain a configuration data file containing the configuration information, includes:
step S301: acquiring a yang model file of the network equipment;
since all NetConf configurations conform to the description of the corresponding yang model file, the content layer of the NetConf protocol uses the description of the yang model file.
Therefore, when configuring the network device, the yang model file of the network device is first acquired.
Step S302: mapping the yang model file into a template directly coupled with the yang model file to obtain a mapping template;
that is, the yang model file is mapped into a set of mapping templates with direct coupling relation, and the mapping templates comprise xml templates or json string templates.
Step S303: taking the mapping template as an instantiation template;
since the last xml message or json message as the configuration data file is the result of the instantiation of the current xml template or json template. In order to unify the management commands of different manufacturers, a unified template needs to be provided for the management commands, in this step, the mapping template mapped to the yang model file is used as an instantiated template, and finally, the configuration parameters are filled in corresponding positions in the instantiated template.
Step S304: and filtering the instantiation template to obtain a simplified template component to be instantiated.
Since the yang model provided by the network equipment provider is the most complete, and only a small part of the nodes is likely to be configured in practical use, it is necessary to filter out nodes and labels except for the configuration, and filter out redundant functions of nodes and labels.
As a specific implementation manner of the present invention, the step S303 uses the mapping template as an instantiation template, specifically:
and selecting a mapping template matched with the instruction keywords as an instantiation template according to the instruction keywords.
As a specific implementation manner of the present invention, step S304 filters the instantiated template to obtain a simplified template component to be instantiated, specifically:
and filtering the instantiation template according to the instruction keywords as search conditions to generate a simplified template component to be instantiated.
Example two:
as shown in fig. 4, an apparatus for network device configuration management according to an embodiment of the present invention includes:
the embedded module 401: the template component to be instantiated is obtained by simplifying the mapping template of the yang model file of the network equipment;
the preprocessing module 402: the device is used for preprocessing the configuration data file to obtain a configuration data file with a fixed format;
the send request configuration module 404: the device is used for sending the configuration data file with the fixed format;
the reception processing echo module 405: and the feedback information is used for receiving the feedback information of the transmitted configuration data file with the fixed format.
As a specific implementation manner of the present invention, the apparatus further includes:
the session establishment module 403: for establishing a NetConf session.
As a specific implementation manner of the present invention, as shown in fig. 5, the embedded module 401 includes:
yang model management module 501: acquiring a yang model file of the network equipment;
yang model mapping module 502: the mapping module is used for mapping the yang model file into a template directly coupled with the yang model file to obtain a mapping template;
instantiate template module 503: the mapping template is used as an instantiation template;
the configuration information extraction module 504: and the template filter module is used for filtering the instantiation template to obtain a simplified template component to be instantiated.
As a specific implementation manner of the present invention, the instantiation template module 503 specifically:
and selecting a mapping template matched with the instruction keywords as an instantiation template according to the instruction keywords.
As a specific implementation manner of the present invention, the configuration information extraction module 504 specifically:
and the template filter module is used for filtering the instantiation template according to the instruction keywords as search conditions to generate a simplified template component to be instantiated.
As a specific implementation manner of the present invention, the configuration information extraction module 504 specifically: for filtering redundant nodes and labels.
As a specific implementation manner of the present invention, the mapping template includes: an xml template or a json string template.
As a specific implementation manner of the present invention, the embedded module 401 specifically:
and assigning the xml label in the xml template or assigning the json key value pair in the json string template by combining the descriptions of the yang file in the yang model library, thereby obtaining the configuration data file containing complete configuration information.
The yang model management module 501 is mainly used for storing a complete yang model file, which is an aggregate of all yang model files, and all NetConf configurations conform to the description of the corresponding yang model file, that is, the content layer of the NetConf protocol uses the description conforming to the yang model file.
The yang model mapping module 502, according to the description of RFC6241, the data stream of the NetConf protocol client and server communication is a byte stream in xml format or JSON byte stream, while the yang model is only used as a modeling language for describing the format standard to which the finally generated xml file or JSON string should comply, so that it is necessary to directly map the yang model provided by the network device provider, that is, map a set of xml templates or JSON string templates having a direct coupling relationship with them, and the finally configured xml message or JSON message is based on the current xml template or JSON template instantiated result, and the instantiated xml message or JSON message can be used for the client to directly issue to the server network device.
The configuration information extraction module 504 is a dynamic extraction module, and is characterized in that the configuration information extraction module is updated before being used, so as to prevent the change of the yang model file, and ensure that the function description of the latest yang model file on NetConf is met. Since the yang model provided by the network device provider is the most complete model, and only a small part of the yang model is likely to be configured in practical use, nodes and labels except the current configuration need to be filtered out, and the process of filtering based on the yang model mapping module to generate the xml format message stream or the json format message stream required by the configuration is a characteristic of the NetConf configuration in the embodiment of the present invention.
The embedding module 401 further includes an instantiation module 505, where the instantiation module 505 is the most important and most core system module, and inherits the instantiation of the configuration information extraction module provided by the configuration information extraction module, and the process of instantiation is to assign an xml tag or a json key value pair in combination with the description of the yang file in the yang model library, so as to form a complete configuration issuing message.
The preprocessing module 402 mainly plays a role in optimizing a configuration data structure, so that viewing and error correction are facilitated, in an actual production environment, it is difficult to avoid that configuration fails due to errors in configuration logic, that is, a Netconf server cannot correctly respond to configuration data issued by a Netconf client, so that the first to be checked for error is to check the correctness of the configuration data, and if the configuration data format is relatively disordered, error correction is difficult, so that the amount of the configuration data format is particularly important.
The sending request configuration module 404 mainly plays a role in interaction between the NetConf client and the server, and the sending request configuration module 404 receives information from the preprocessing module 402, and reads an instantiated configuration data file into a memory to form a byte stream, so that the client can complete sending conveniently.
The receiving processing playback module 405 mainly plays a role in receiving a configuration result of server playback by the NetConf client, so as to check a response state of the server, and if the configuration message of the client is successfully responded, an ok is fed back, and if the configuration request of the client is not successfully responded, an error message is fed back, so that error correction can be performed according to the error message. The method is mainly used for realizing the design and display of the related functions of the configuration sent by the NetConf client to the server. The specific architecture of the network device configuration management apparatus is shown in fig. 6.
Example three:
the embodiment of the invention is a specific example of a method for network equipment configuration management, which comprises the following steps:
the invention provides a method for network equipment configuration management, which is based on a NetConf protocol to realize the network equipment configuration management and comprises the following steps:
the method comprises the following steps: configuration information extraction, corresponding to the configuration information extraction module 504, wherein the yang model mapping module 502 is used as the input of the configuration information extraction, and the yang model mapping result is used as the result of the yang model management module 501, for implementing a more complete example of embodiment, the following yang models are now provided as example references, as follows:
further, the following xml template file is generated according to the above yang model:
further, in combination with the predefined configuration keyword usage specification, the user may use the following instructions: the interpreter of "adducer-name admin-past admin-123456-user-type admin-access" rs232ssh netconf "-status active" will instantiate xml format to yang file according to the instruction input by the user, and the instantiated output result is as follows, which is a character stream conforming to xml format, for example: "< edge-configuration > < target > < running > < parameter-operation > < user-manage xmlns" (http:// example. com/users "> < user operation" > < name admin > < password >123456</password > < user-pe > admin </user-type > < access > < message > < user-term < rs232> network </access > < access > 232 < parameter > transistor </access >/access state act < status > < user-operator > < request > < user-term > addmin </user-type > < access > < message </access > < transport > < operator > < network > < 232> < access > < control > < user-operator/operator-control </control-operator < "
Step two: configuring data preprocessing, wherein the processing mode of the step is to take the output xml of the step one as the input information of the step, and the format after processing is as follows:
this step obviously optimizes the indented structure of the xml.
Step three: establishing a NetConf session, establishing session connection with a NetConf server of the network equipment by using a socket connection tool, entering a waiting state after establishing the connection, wherein the waiting state waits for an xml file message for designating a specific configuration request.
Step four: sending and receiving an xml byte stream, wherein the xml byte stream is sent, data contents in an instantiated xml file are opened and read into a memory, and the data contents are sent by using a socket, so that the configuration of the network equipment at the server side is completed, and the function of managing users is realized; wherein, receiving xml byte stream, for example, checking configuration result, in order to ensure the configuration of network device is correct, and checking and verifying the configuration result, user detailed information can be obtained by using query command "get-config" provided by netconf, so as to complete management and verification of network device, and the format of received xml byte stream message is as follows:
the above example is only for the xml style of "edge-config" operation in the operational layer that demonstrates the NetConf protocol, but other operational protocols of the operational layer of NetConf may be implemented as well. For example, the following operations are implemented: "get-config", "get", "copy-config", "delete-config", "lock", "unlock", "close-session", and "kill-session", the following examples are fully compliant with the RFC6241 specification.
Get-config operation (get runtime database message):
get operation (get intrinsic data):
"copy-config" operation (copying existing device configuration):
"delete-config" operation (delete "power on" state database configuration):
"lock" operation ("run state" locked, preventing its user from preempting configuration):
"unlock" operation ("run state" unlock, allow its user configuration):
"close-session" operation (end NetConf session):
"kill-session" operation (forced termination of NetConf session):
in summary, the method and the device of the present invention use the NetConf protocol to complete configuration management for the network device, and the method and the device are simple to use, powerful in function, convenient to use, simple and easy to use, greatly simplify ordinary operation and maintenance operations, and reduce operation and maintenance costs.
In addition, the method and the device of the embodiment of the invention use the predefined simplified configuration instruction in the whole process, do not need a user to master complicated programming knowledge, and can complete all management functions of the network equipment only according to the preset configuration instruction, thereby successfully solving the defects that the system configuration instruction is complicated and difficult to memorize under the configuration instruction line of the network equipment.
Example four:
an embodiment of the present invention provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the method steps of embodiment one.
The Processor may be a general-purpose Processor, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention. Wherein the memory is used for storing executable instructions of the processor; a memory for storing the program code and transmitting the program code to the processor. The Memory may include Volatile Memory (Volatile Memory), such as Random Access Memory (RAM); Non-Volatile Memory (Non-Volatile Memory) such as Read-Only Memory (ROM), Flash Memory (Flash Memory), Hard Disk (HDD), or Solid-State Drive (SSD) may also be included; combinations of the above categories of memory may also be included.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements the method steps of the first embodiment.
Compared with the existing configuration management tool, the embodiment of the invention has the following characteristics that the operation and maintenance cost and the management difficulty for a plurality of network devices can be reduced by the system and the method for realizing the configuration management of the network devices based on the NetConf protocol; the method is convenient to operate and use, and the xml byte stream is used as a medium for information interaction of two parties, so that a user can use the xml but not directly operate the xml, and the tedium of directly operating the xml is avoided; the method has high fault-tolerant rate, and can filter the error input of the user to a certain extent, thereby avoiding the generation of low-level errors such as xml file errors.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (9)
1. A method for network device configuration management, comprising:
embedding the configuration information into a template component to be instantiated to obtain a configuration data file containing the configuration information, wherein the template component to be instantiated is obtained by simplifying a mapping template of a yang model file of the network equipment, and specifically comprises the following steps:
filtering the instantiation template according to the instruction keywords as search conditions to generate a simplified template component to be instantiated;
preprocessing the configuration data file to obtain a configuration data file with a fixed format;
sending the configuration data file with the fixed format;
and receiving feedback information of the transmitted configuration data file with the fixed format.
2. The method for network device configuration management according to claim 1, wherein after the step of preprocessing the configuration data file to obtain the configuration data file with a fixed format, the method further comprises:
a NetConf session is established.
3. The method for network device configuration management according to claim 1, wherein said embedding configuration information into a template component to be instantiated, thereby obtaining a configuration data file containing configuration information, comprises:
acquiring a yang model file of the network equipment;
mapping the yang model file into a template directly coupled with the yang model file to obtain a mapping template;
taking the mapping template as an instantiation template;
and filtering the instantiation template to obtain a simplified template component to be instantiated.
4. The method for network device configuration management according to claim 3, wherein the mapping template is used as an instantiation template, specifically:
and selecting a mapping template matched with the instruction keywords as an instantiation template according to the instruction keywords.
5. The method for network device configuration management according to claim 3, wherein the filtering the instantiated template specifically comprises:
redundant nodes and labels are filtered.
6. The method for network device configuration management according to claim 1, wherein the mapping template comprises:
an xml template or a json string template.
7. The method for network device configuration management according to claim 6, wherein the configuration information is embedded in the template component to be instantiated, so as to obtain a configuration data file containing the configuration information, specifically:
and assigning an xml tag in an xml template or assigning a json key value pair in a json string template by combining the description of the yang file in the yang model library, thereby obtaining a configuration data file containing complete configuration information.
8. An apparatus for network device configuration management, comprising:
embedding a module: the method is used for embedding configuration information into a template component to be instantiated, so as to obtain a configuration data file containing the configuration information, wherein the template component to be instantiated is obtained by simplifying a mapping template of a yang model file of the network device, and specifically comprises the following steps:
filtering the instantiation template according to the instruction keywords as search conditions to generate a simplified template component to be instantiated;
a preprocessing module: the device is used for preprocessing the configuration data file to obtain a configuration data file with a fixed format;
a sending request configuration module: the device is used for sending the configuration data file with the fixed format;
the receiving, processing and displaying back module: and the feedback information is used for receiving the feedback information of the transmitted configuration data file with the fixed format.
9. An electronic device, characterized in that the electronic device comprises: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811390557.5A CN109361550B (en) | 2018-11-21 | 2018-11-21 | Method, device and equipment for network equipment configuration management |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811390557.5A CN109361550B (en) | 2018-11-21 | 2018-11-21 | Method, device and equipment for network equipment configuration management |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109361550A CN109361550A (en) | 2019-02-19 |
CN109361550B true 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 equipment for network equipment configuration management |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109361550B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111835532B (en) | 2019-04-11 | 2022-04-05 | 华为技术有限公司 | Network authentication method and device |
CN110474794B (en) * | 2019-07-10 | 2021-04-27 | 烽火通信科技股份有限公司 | Information conversion method and system of SDN framework |
CN110311826B (en) * | 2019-08-08 | 2022-05-17 | 迈普通信技术股份有限公司 | Network equipment configuration method and device |
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 |
CN111711532B (en) * | 2020-04-30 | 2022-10-04 | 国家计算机网络与信息安全管理中心 | Unified management method for heterogeneous network equipment |
CN112600685B (en) * | 2020-10-30 | 2022-07-15 | 中盈优创资讯科技有限公司 | 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 |
CN114844756A (en) * | 2022-05-09 | 2022-08-02 | 杭州云合智网技术有限公司 | Method for managing network equipment based on NETCONF proxy server |
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 |
CN117478508A (en) * | 2022-07-20 | 2024-01-30 | 华为技术有限公司 | Device configuration method, network device, chip and computer readable storage medium |
CN117278396B (en) * | 2023-09-21 | 2024-10-18 | 中科驭数(北京)科技有限公司 | DPU network card configuration method and device |
Citations (5)
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 |
-
2018
- 2018-11-21 CN CN201811390557.5A patent/CN109361550B/en active Active
Patent Citations (5)
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 (2)
Title |
---|
Configuring Cisco IOS XE With YANG-based YAML Files;Automation;《https://networkop.co.uk/blog/2017/03/13/yaml-yang》;20170313;第1-9页 * |
Getting Started With NETCONF and YANG on Cisco IOS XE;Automation;《https://networkop.co.uk/blog/2017/01/25/netconf-intro/》;20170125;第1-9页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109361550A (en) | 2019-02-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109361550B (en) | Method, device and equipment for network equipment configuration management | |
WO2017054531A1 (en) | Yang model-based compiling method, and corresponding interface, component, and system | |
CN102395950B (en) | With the communication of data-storage system | |
US9923893B2 (en) | Simplified IoT services for cloud environments | |
CN109768970B (en) | Configurable universal protocol generation method | |
CN111556158B (en) | Access method, access device, access equipment and storage medium of Internet of things platform | |
US20080301143A1 (en) | Automatic Update System and Method for Using a Meta Mib | |
KR20040051738A (en) | XML based network management system and method for configuration management of heterogeneous network devices | |
WO2010127551A1 (en) | Adaptiing method, adapter and adapter system for network service communication | |
WO2013063950A1 (en) | Inspection method and system of multimode communication device | |
CN115114044B (en) | Message pushing method, device, equipment and medium | |
CN113296987B (en) | Interface calling method and device for calling module, computer equipment and storage medium | |
CN114254606A (en) | Microservice framework model | |
CN113157975B (en) | Extensible markup language parsing system and method | |
CN113890891A (en) | Data sharing interaction method and device of energy cloud network | |
CN111104135A (en) | Method and system for acquiring interface updating information in real time | |
CN105516269A (en) | Application configuration method and application configuration device | |
EP4339871A1 (en) | Internet of vehicles-based digital commodity processing method, apparatus, and medium | |
CN110780915B (en) | Data processing method, device and storage medium | |
CN111740851B (en) | Configuration message generation method, device and system | |
US20080126520A1 (en) | Devices, systems and methods for network device conversion | |
CN111045928A (en) | Interface data testing method, device, terminal and storage medium | |
CN113239048B (en) | Data management method and device, electronic equipment and storage medium | |
CN115866069A (en) | Method and system for processing remote call request and electronic equipment | |
CN114979144A (en) | Cloud edge communication method and device and electronic equipment |
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 |