CN114006812A - Configuration method and device of network equipment - Google Patents

Configuration method and device of network equipment Download PDF

Info

Publication number
CN114006812A
CN114006812A CN202111278114.9A CN202111278114A CN114006812A CN 114006812 A CN114006812 A CN 114006812A CN 202111278114 A CN202111278114 A CN 202111278114A CN 114006812 A CN114006812 A CN 114006812A
Authority
CN
China
Prior art keywords
configuration
information
configuration information
client
preset
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
CN202111278114.9A
Other languages
Chinese (zh)
Other versions
CN114006812B (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.)
Hangzhou DPtech Information Technology Co Ltd
Original Assignee
Hangzhou DPtech Information Technology 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 Hangzhou DPtech Information Technology Co Ltd filed Critical Hangzhou DPtech Information Technology Co Ltd
Priority to CN202111278114.9A priority Critical patent/CN114006812B/en
Publication of CN114006812A publication Critical patent/CN114006812A/en
Application granted granted Critical
Publication of CN114006812B publication Critical patent/CN114006812B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The disclosure relates to a configuration method, device, system, electronic device and computer readable medium of a network device. The method comprises the following steps: acquiring configuration information by a client; configuring the network equipment serving as a server according to the configuration information; generating return information according to the configuration result and sending the return information to the client; updating current configuration information of the network device to a database. The configuration method, the device, the system, the electronic equipment and the computer readable medium of the network equipment can ensure that the response time of the network equipment does not exceed the preset timeout time of the client when the client sends the configuration in batch through the NETCONF, and greatly improve the efficiency of sending the configuration.

Description

Configuration method and device of network equipment
Technical Field
The present disclosure relates to the field of computer information processing, and in particular, to a method, an apparatus, a system, an electronic device, and a computer-readable medium for configuring a network device.
Background
For the same function, each device manufacturer has a difference in detail of the function implementation, and for the customer, the difference in configuration is mainly reflected. When a customer uses equipment of different manufacturers, most scenes are that the equipment is managed through a command line, but the command line of each manufacturer is realized, the details are different, so that command line manuals of the equipment of each manufacturer are inconsistent, and great troubles are caused for the customer to manage the equipment of each manufacturer. Therefore, because of the advantages of NETCONF, it is necessary for each manufacturer to add support to NETCONF.
NETCONF allows a client to issue all configurations for a certain function in a batch manner, that is, to issue all groups at once, and includes the sub-configurations of each group. In the processing mode of the network equipment, the sub-configurations in the first group are traversed, the configurations are sequentially issued to the database until all the sub-configurations are issued, other groups are traversed, and response information is fed back after all the groups are processed. However, the time required for completing the operation is as long as 15 minutes, which seriously affects the normal use of the NETCONF client.
Therefore, a solution is urgently needed for configuring the batch type issuing response time. Therefore, a new method, apparatus, system, electronic device, and computer readable medium for configuring a network device are needed.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present disclosure provides a method, an apparatus, a system, an electronic device, and a computer readable medium for configuring a network device, which can ensure that the response time of the network device does not exceed the timeout time predetermined by the client when the client issues the configuration in batch through the NETCONF, and greatly improve the efficiency of issuing the configuration.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, a method for configuring a network device is provided, the method including: acquiring configuration information by a client; configuring the network equipment serving as a server according to the configuration information; generating return information according to the configuration result and sending the return information to the client; updating current configuration information of the network device to a database.
In an exemplary embodiment of the present disclosure, before the obtaining, by the client, the configuration information, the method further includes: starting a preset process after the network equipment is started; configuring the network equipment based on the preset process; and creating a preset thread based on the preset process.
In an exemplary embodiment of the present disclosure, configuring the network device based on the preset process includes: calling configuration information in a database based on the preset process; and sending the configuration information to the network equipment for configuration.
In an exemplary embodiment of the present disclosure, creating a preset thread based on the preset process includes: and after the configuration of the network equipment is completed, creating a preset thread for polling based on the preset process.
In an exemplary embodiment of the present disclosure, the configuration information is configured in a unit of a sub-configuration of the functional group; configuring the network equipment as the server according to the configuration information, wherein the configuration comprises the following steps: extracting a preset function group based on the configuration information; increasing the flag bit of the preset function group by 1; applying the sub-configuration to the preset functional group.
In an exemplary embodiment of the present disclosure, the configuration information is in units of function groups; configuring the network equipment as the server according to the configuration information, wherein the configuration comprises the following steps: extracting all the function groups one by one based on the configuration information; extracting all the sub-configurations in all the function groups one by one; applying the configuration information to the all sub-configurations; and increasing the flag bits of all the sub-configurations by 1.
In an exemplary embodiment of the present disclosure, generating and sending a return message to the client according to a configuration result includes: generating assembly information according to the configuration result; packaging the assembly information to generate return information; and sending the return information to the client to respond.
In an exemplary embodiment of the disclosure, updating the current configuration information of the network device to a database includes: polling flag bits of function groups and sub-configurations in the network equipment at regular time through the preset thread; and when the zone bit does not meet the preset strategy, updating the sub-configuration of the function group corresponding to the zone bit to the database.
In an exemplary embodiment of the present disclosure, when a flag bit does not satisfy a preset policy, updating a sub-configuration of a function group corresponding to the flag bit to the database includes: when the flag bit is different from the value of the previous cycle, generating a database statement according to the configuration information of the functional group corresponding to the flag bit; updating the configuration information to the database based on the database statement.
According to an aspect of the present disclosure, a configuration apparatus of a network device is provided, the apparatus including: the information module is used for acquiring configuration information by the client; the configuration module is used for configuring the network equipment serving as the server according to the configuration information; the return module is used for generating return information according to the configuration result and sending the return information to the client; and the updating module is used for updating the current configuration information of the network equipment to a database.
In an exemplary embodiment of the present disclosure, further comprising: the initial setting module is used for starting a preset process after the network equipment is started; configuring the network equipment based on the preset process; and creating a preset thread based on the preset process.
According to an aspect of the present disclosure, a configuration system of a network device is provided, the apparatus including: the client is used for generating configuration information; the server is used for configuring the network equipment according to the configuration information; generating return information according to the configuration result and sending the return information to the client; updating current configuration information of the network device to a database.
According to an aspect of the present disclosure, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to an aspect of the disclosure, a computer-readable medium is proposed, on which a computer program is stored, which program, when being executed by a processor, carries out the method as above.
According to the configuration method, the device, the system, the electronic equipment and the computer readable medium of the network equipment, the client side obtains configuration information; configuring the network equipment serving as a server according to the configuration information; generating return information according to the configuration result and sending the return information to the client; the mode of updating the current configuration information of the network equipment to the database can ensure that the response time of the network equipment does not exceed the preset overtime time of the client when the client sends the configuration in batch through NETCONF, thereby greatly improving the efficiency of sending the configuration.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.
Fig. 1 is a schematic diagram illustrating a configuration system of a network device according to an example embodiment.
Fig. 2 is a flow chart illustrating a method of configuration of a network device in accordance with an example embodiment.
Fig. 3 is a schematic diagram illustrating a configuration method of a network device according to another exemplary embodiment.
Fig. 4 is a schematic diagram illustrating a configuration method of a network device according to another exemplary embodiment.
Fig. 5 is a flowchart illustrating a method of configuring a network device according to another example embodiment.
Fig. 6 is a block diagram illustrating a configuration apparatus of a network device in accordance with an example embodiment.
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 8 is a block diagram illustrating a computer-readable medium in accordance with an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as 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 concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.
The technical abbreviations involved in this disclosure are explained as follows:
NETCONF: the Network Configuration Protocol provides a mechanism for managing Network devices, and a user can add, modify and delete the Configuration of the Network devices through the Protocol and acquire the Configuration and state information of the devices. The NETCONF protocol is used between the client and the server to realize the communication process, the specific implementation details are that the protocol (corresponding to the rfc standard) provides a set of general programming interface (API), and the client and the server can directly use the API to communicate. In an actual application scenario, the client may be a script or a program running on a network manager, and the server is a common network device.
A database: data is organized, stored, and managed according to a data structure. Databases are of many types, from the simplest storage to database systems that manage large amounts of data, and are developed to date to manage information resources sufficiently and efficiently.
Sqlite 3: is a software library, realizes a self-sufficient, serverless, zero-configuration, transactional SQL database engine. The file in the form of hundreds of kb is stored in a disk, which is known to occupy less resources and operate at a high speed. The main application scene is the environment with small storage data amount, such as embedded development.
The inventor of the present disclosure finds that one network device can simultaneously run a plurality of different functional services, and functionally divide each service into a plurality of modules, where each module must include the following procedures: configuration storage, configuration applications, protocol runs, etc. A functional module is typically divided into a plurality of groups, each group containing a plurality of sub-configurations. On the storage of the configuration, the data is stored in the database in the form of a group, and the id of the group is used as a primary key of the database.
When the NETCONF client performs configuration operation on a certain function, a one-time issuing process supports issuing configuration according to various different units, such as: the sub-configuration a of the function group 0 may be embodied, or all the sub-configurations of all the function groups may be embodied.
Assume the database table name tb _ module; group id, column name id, value 0; the column name of the sub-configuration A is conf _ A, and the issued value is a; the column name of the sub-configuration B is conf _ B, and the issued value is B; the column name of the sub-configuration C is conf _ C, and the issued value is C; the key value of the database is the group id.
Taking the example that the NETCONF client issues the group 0 sub-configuration a of a certain function, the general flow of the NETCONF client managing the network device is as follows:
(1) the NETCONF client sends information to the server network equipment;
(2) the server process analysis information is configuration issue, and the corresponding specific configuration is a sub-configuration A of the group 0;
(3) the process first issues the value a of the group 0 sub-configuration a to the database (database), and executes the database statement as follows: insert or replace int tb _ module (conf _ A) VALUES (a) where id is 0; and the configuration is sent to the memory to be applied by the function;
(4) and (5) the process assembles the result into information according to the execution result of the flow (3) and feeds the information back to the client.
(5) And the client judges whether the operation result is successful or failed according to the returned result.
The NETCONF client determines whether the server successfully executes a determination mechanism in 2 ways:
1. determining whether the configuration issued by the client is successful according to the message code fed back by the server;
2. the client has a timeout period for each operation, which is generally 30s, that is, if no message is fed back within 30s from the time when the client sends the message, the server is determined to fail to execute. Otherwise, the message code is taken as the standard.
NETCONF allows a client to issue all configurations for a certain function in a batch manner, that is, to issue all groups at once, and includes the sub-configurations of each group. In the processing mode of the network equipment, the sub-configurations in the first group are traversed, the configurations are sequentially issued to the database until all the sub-configurations are issued, other groups are traversed, and response information is fed back after all the groups are processed. However, the time required for completing the operation is as long as 15 minutes, which seriously affects the normal use of the NETCONF client.
In view of the technical problems in the prior art, the method for configuring the network equipment is provided by the disclosure, and by the method, even if the client sends the configuration in batch through NETCONF, the response time of the network equipment is not more than the preset timeout time of the client, and the policy use of the client is ensured.
Fig. 1 is a schematic diagram illustrating a configuration system of a network device according to an example embodiment.
As shown in fig. 1, system architecture 10 may include servers 101, 102, 103, network 104, and client 105. Network 104 is the medium used to provide communication links between servers 101, 102, 103 and client 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The servers 101, 102, 103 may be various network devices with network transport capabilities including, but not limited to, firewalls, routers, smartphones, tablets, laptop and desktop computers, and the like.
More specifically, the client 105 may be a program running on a network management server, and the servers 101, 102, 103 are network devices.
The client 105 may generate configuration information, for example, according to a user operation; the servers 101, 102, 103 may obtain configuration information, for example, by the client 105; the servers 101, 102, 103 may configure the network device as a server according to the configuration information, for example; the servers 101, 102, 103 may generate return information according to the configuration result and send the return information to the client; the servers 101, 102, 103 may, for example, update the current configuration information of the network device to a database.
The servers 101, 102, 103 may also start a preset process, for example, after the network device is started; configuring the network equipment based on the preset process; and creating a preset thread based on the preset process.
It should be noted that the configuration method of the network device provided by the embodiment of the present disclosure may be executed by the servers 101, 102, and 103, and accordingly, the configuration apparatus of the network device may be disposed in the servers 101, 102, and 103. And the operator that provides the user with the configuration information is typically located in client 105.
Fig. 2 is a flow chart illustrating a method of configuration of a network device in accordance with an example embodiment. The configuration method 20 of the network device comprises at least steps S202 to S208.
As shown in fig. 2, in S202, configuration information is acquired by the client. The client is a NETCONF client, and a user can operate on the client to generate configuration information.
In S204, the network device serving as the server is configured according to the configuration information.
In one embodiment, the configuration information is in units of sub-configurations of functional groups; configuring the network device as the server according to the configuration information, which may include: extracting a preset function group based on the configuration information; increasing the flag bit of the preset function group by 1; applying the sub-configuration to the preset functional group.
More specifically, as shown in fig. 3, the client may operate in units of sub-configurations of a certain functional group, for example. More specifically, the NETCONF client issues the group 0 sub-configuration a, and after receiving the configuration, the process does not execute the process of configuration storage, and adds 1 to the flag bit of the flag group 0, and directly performs configuration application.
In one embodiment, the configuration information is in units of functional groups; configuring the network device as the server according to the configuration information, which may include: extracting all the function groups one by one based on the configuration information; extracting all the sub-configurations in all the function groups one by one; applying the configuration information to the all sub-configurations; and increasing the flag bits of all the sub-configurations by 1.
More specifically, as shown in fig. 4, for example, the client may issue the configuration to the network device in units of all groups of a certain function, and more specifically, after receiving the issue information, the network device first traverses the sub-configurations in the first group, skips the database configuration storage for each sub-configuration, directly performs the configuration application, and then adds 1 to each sub-configuration, that is, adds 1 to the flag bit in the group. The traversal is resumed remaining approximately within 30 s.
In S206, return information is generated according to the configuration result and sent to the client. The method comprises the following steps: generating assembly information according to the configuration result; packaging the assembly information to generate return information; and sending the return information to the client to respond.
In one embodiment, the NETCONF client receives response information of the server, indicates that the operation is completed, and continues the next operation;
in S208, the current configuration information of the network device is updated to a database. In one embodiment, flag bits of function groups and sub-configurations in the network device can be polled at regular time through the preset thread; and when the zone bit does not meet the preset strategy, updating the sub-configuration of the function group corresponding to the zone bit to the database.
More specifically, for example, when the flag bit and the value of the previous cycle are different, a database statement may be generated according to the configuration information of the function group to which the flag bit corresponds; updating the configuration information to the database based on the database statement.
In the present disclosure, the database may be an sql lilte3 database, and the application scenario is single, and is mainly used for storing the service configuration operated by the user on the network device. The data of all lists in the database can be simultaneously transmitted by one statement through the sqlilte3 database, and the sqlilte3 database is matched with the database updating operation of the application to be used, so that the working efficiency is greatly improved.
More specifically, as shown in fig. 3, the client may operate in units of sub-configurations of a certain functional group, for example. The preset thread can be a polling thread A, the polling thread A traverses all the groups, set marks of all the groups are read, whether each group mark is the same as the mark of the previous second or not is judged, if the marks are the same, the round of execution of the polling thread A is finished, and the next execution is waited.
If the labels are different, according to the existing configuration of the group a, a database statement is used to update all the sub-configurations in the group to the corresponding database at the same time, and the executed database statement may be as follows:
insert or replace into tb_module(conf_A,conf_B,conf_C)VALUES(a,b,c)where id=0;。
finally, the flag bit of the group A is updated, and the thread A finishes the execution round and waits for the next execution.
More specifically, as shown in fig. 4, for example, the client issues the configuration to the network device in units of all groups of a certain function, the polling thread a filters the groups with changed configuration according to the front and back flag bits, traverses each changed group, assembles the groups into a database statement according to the existing configuration in the group, and issues the database statement according to the group id. The flag bits for each group are updated and thread a is polled to finish execution.
In one embodiment, the database may also be closed after execution to poll thread a before the device reboots. This operation is to prevent the polling thread a from ending in advance and failing to complete the complete configuration storage when the device is restarted.
According to the configuration method of the network equipment, the client acquires the configuration information; configuring the network equipment serving as a server according to the configuration information; generating return information according to the configuration result and sending the return information to the client; the mode of updating the current configuration information of the network equipment to the database can ensure that the response time of the network equipment does not exceed the preset overtime time of the client when the client sends the configuration in batch through NETCONF, thereby greatly improving the efficiency of sending the configuration.
According to the configuration method of the network equipment, the separation of the flow and the flow of issuing the data to the function is realized through the database configuration storage, the fusion of 2 flows such as the data storage of a certain function group is realized through one data statement, the configuration of the database is separated from the flow of issuing the data to the function by using the change mark, the operation times of the database are reduced, and the quick response of the NETCONF client side in issuing the batch configuration is realized.
It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
Fig. 5 is a flowchart illustrating a method of configuring a network device according to another example embodiment. The flow 50 shown in fig. 5 is a supplementary description of the flow shown in fig. 2.
As shown in fig. 5, in S502, after the network device is started, a preset process is started.
In S504, the network device is configured based on the preset process. The method comprises the following steps: calling configuration information in a database based on the preset process; and sending the configuration information to the network equipment for configuration.
After the server network equipment is normally started, the server process is normally started, the preset process opens the database (until the equipment is restarted and then closed), extracts the configuration of the existing related database, and issues all the configurations to the functional application.
In S506, a preset thread is created based on the preset process. For example, after the network device configuration is completed, a preset thread for polling is created based on the preset process. After all the configuration of the preset process is recovered, a polling thread A is created and starts to poll and run at the interval of one second.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 6 is a block diagram illustrating a configuration apparatus of a network device according to another example embodiment. As shown in fig. 6, the configuration device 60 of the network device includes: the information module 602, the configuration module 604, the returning module 606, the updating module 608, and the configuration apparatus 60 of the network device may further include: an initial setup block 610.
The information module 602 is used for the client to obtain the configuration information;
the configuration module 604 is configured to configure the network device serving as the server according to the configuration information;
the return module 606 is configured to generate a return message according to the configuration result and send the return message to the client;
the update module 608 is configured to update the current configuration information of the network device to a database.
The initial setting module 610 is configured to start a preset process after the network device is started; configuring the network equipment based on the preset process; and creating a preset thread based on the preset process.
According to the configuration device of the network equipment, the client acquires the configuration information; configuring the network equipment serving as a server according to the configuration information; generating return information according to the configuration result and sending the return information to the client; the mode of updating the current configuration information of the network equipment to the database can ensure that the response time of the network equipment does not exceed the preset overtime time of the client when the client sends the configuration in batch through NETCONF, thereby greatly improving the efficiency of sending the configuration.
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 700 according to this embodiment of the disclosure is described below with reference to fig. 7. The electronic device 700 shown in fig. 7 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, electronic device 700 is embodied in the form of a general purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one memory unit 720, a bus 730 that connects the various system components (including the memory unit 720 and the processing unit 710), a display unit 740, and the like.
Wherein the storage unit stores program code that can be executed by the processing unit 710 to cause the processing unit 710 to perform the steps according to various exemplary embodiments of the present disclosure described in this specification. For example, the processing unit 710 may perform the steps as shown in fig. 2, fig. 5.
The memory unit 720 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)7201 and/or a cache memory unit 7202, and may further include a read only memory unit (ROM) 7203.
The memory unit 720 may also include a program/utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 730 may be any representation of one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 700 may also communicate with one or more external devices 700' (e.g., keyboard, pointing device, bluetooth device, etc.), such that a user can communicate with devices with which the electronic device 700 interacts, and/or any devices (e.g., router, modem, etc.) with which the electronic device 700 can communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 750. Also, the electronic device 700 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 760. The network adapter 760 may communicate with other modules of the electronic device 700 via the bus 730. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 8, the technical solution according to the embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present disclosure.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: acquiring configuration information by a client; configuring the network equipment serving as a server according to the configuration information; generating return information according to the configuration result and sending the return information to the client; updating current configuration information of the network device to a database. The computer readable medium may also implement the following functions: starting a preset process after the network equipment is started; configuring the network equipment based on the preset process; and creating a preset thread based on the preset process.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (11)

1. A method for configuring a network device, comprising:
acquiring configuration information by a client;
configuring the network equipment serving as a server according to the configuration information;
generating return information according to the configuration result and sending the return information to the client;
updating current configuration information of the network device to a database.
2. The configuration method of claim 1, wherein before obtaining the configuration information by the client, further comprising:
starting a preset process after the network equipment is started;
configuring the network equipment based on the preset process;
and creating a preset thread based on the preset process.
3. The configuration method of claim 2, wherein configuring the network device based on the pre-defined process comprises:
calling configuration information in a database based on the preset process;
and sending the configuration information to the network equipment for configuration.
4. The configuration method of claim 2, wherein creating a pre-defined thread based on the pre-defined process comprises:
and after the configuration of the network equipment is completed, creating a preset thread for polling based on the preset process.
5. The configuration method according to claim 1, wherein the configuration information is in units of sub-configurations of functional groups;
configuring the network equipment as the server according to the configuration information, wherein the configuration comprises the following steps:
extracting a preset function group based on the configuration information;
increasing the flag bit of the preset function group by 1;
applying the sub-configuration to the preset functional group.
6. The configuration method according to claim 1, wherein the configuration information is in units of function groups;
configuring the network equipment as the server according to the configuration information, wherein the configuration comprises the following steps:
extracting all the function groups one by one based on the configuration information;
extracting all the sub-configurations in all the function groups one by one;
applying the configuration information to the all sub-configurations;
and increasing the flag bits of all the sub-configurations by 1.
7. The configuration method of claim 1, wherein generating and sending a return message to the client according to the configuration result comprises:
generating assembly information according to the configuration result;
packaging the assembly information to generate return information;
and sending the return information to the client to respond.
8. The configuration method of claim 2, wherein updating the current configuration information of the network device to a database comprises:
polling flag bits of function groups and sub-configurations in the network equipment at regular time through the preset thread;
and when the zone bit does not meet the preset strategy, updating the sub-configuration of the function group corresponding to the zone bit to the database.
9. The configuration method according to claim 8, wherein updating the sub-configuration of the function group corresponding to the flag bit to the database when the flag bit does not satisfy the preset policy comprises:
when the flag bit is different from the value of the previous cycle, generating a database statement according to the configuration information of the functional group corresponding to the flag bit;
updating the configuration information to the database based on the database statement.
10. An apparatus for configuring a network device, comprising:
the information module is used for acquiring configuration information by the client;
the configuration module is used for configuring the network equipment serving as the server according to the configuration information;
the return module is used for generating return information according to the configuration result and sending the return information to the client;
and the updating module is used for updating the current configuration information of the network equipment to a database.
11. The configuration device of claim 10, further comprising:
the initial setting module is used for starting a preset process after the network equipment is started; configuring the network equipment based on the preset process; and creating a preset thread based on the preset process.
CN202111278114.9A 2021-10-30 2021-10-30 Configuration method and device of network equipment Active CN114006812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111278114.9A CN114006812B (en) 2021-10-30 2021-10-30 Configuration method and device of network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111278114.9A CN114006812B (en) 2021-10-30 2021-10-30 Configuration method and device of network equipment

Publications (2)

Publication Number Publication Date
CN114006812A true CN114006812A (en) 2022-02-01
CN114006812B CN114006812B (en) 2024-06-14

Family

ID=79925948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111278114.9A Active CN114006812B (en) 2021-10-30 2021-10-30 Configuration method and device of network equipment

Country Status (1)

Country Link
CN (1) CN114006812B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6286038B1 (en) * 1998-08-03 2001-09-04 Nortel Networks Limited Method and apparatus for remotely configuring a network device
WO2009006808A1 (en) * 2007-07-06 2009-01-15 Huawei Technologies Co., Ltd. A method and system for sending the event notices based on netconf
CN101442469A (en) * 2007-11-22 2009-05-27 中国移动通信集团公司 Method, system and apparatus for down distributing configuration data
CN102148817A (en) * 2010-12-08 2011-08-10 华为技术有限公司 Network equipment configuration method, client, server and network system
CN104113443A (en) * 2013-04-19 2014-10-22 中兴通讯股份有限公司 Network equipment detection method, device and cloud detection system
WO2015147780A1 (en) * 2014-03-24 2015-10-01 Hewlett-Packard Development Company, L.P. Client-based port filter table
CN105591819A (en) * 2015-12-24 2016-05-18 杭州华三通信技术有限公司 Method and device of configuring network equipment
CN105959148A (en) * 2016-06-15 2016-09-21 上海斐讯数据通信技术有限公司 Method for network management system to control network equipment
WO2018049677A1 (en) * 2016-09-19 2018-03-22 Telefonaktiebolaget Lm Ericsson (Publ) Method for network management based on netconf protocol, and associated network device
WO2020020249A1 (en) * 2018-07-27 2020-01-30 华为技术有限公司 Network management method and apparatus
CN110995481A (en) * 2019-11-25 2020-04-10 深圳前海达闼云端智能科技有限公司 Configuration method, server and computer-readable storage medium
CN111082953A (en) * 2018-10-19 2020-04-28 华为技术有限公司 Configuration method, device and related equipment
CN113133024A (en) * 2019-12-31 2021-07-16 北京华为数字技术有限公司 Network resource configuration method and device
US20210328863A1 (en) * 2020-04-16 2021-10-21 Juniper Networks, Inc. Model driven configuration management for microservices

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6286038B1 (en) * 1998-08-03 2001-09-04 Nortel Networks Limited Method and apparatus for remotely configuring a network device
WO2009006808A1 (en) * 2007-07-06 2009-01-15 Huawei Technologies Co., Ltd. A method and system for sending the event notices based on netconf
CN101442469A (en) * 2007-11-22 2009-05-27 中国移动通信集团公司 Method, system and apparatus for down distributing configuration data
CN102148817A (en) * 2010-12-08 2011-08-10 华为技术有限公司 Network equipment configuration method, client, server and network system
CN104113443A (en) * 2013-04-19 2014-10-22 中兴通讯股份有限公司 Network equipment detection method, device and cloud detection system
WO2014169765A1 (en) * 2013-04-19 2014-10-23 中兴通讯股份有限公司 Network device detecting method and apparatus, and cloud detection system
WO2015147780A1 (en) * 2014-03-24 2015-10-01 Hewlett-Packard Development Company, L.P. Client-based port filter table
CN105591819A (en) * 2015-12-24 2016-05-18 杭州华三通信技术有限公司 Method and device of configuring network equipment
CN105959148A (en) * 2016-06-15 2016-09-21 上海斐讯数据通信技术有限公司 Method for network management system to control network equipment
WO2018049677A1 (en) * 2016-09-19 2018-03-22 Telefonaktiebolaget Lm Ericsson (Publ) Method for network management based on netconf protocol, and associated network device
WO2020020249A1 (en) * 2018-07-27 2020-01-30 华为技术有限公司 Network management method and apparatus
CN111082953A (en) * 2018-10-19 2020-04-28 华为技术有限公司 Configuration method, device and related equipment
CN110995481A (en) * 2019-11-25 2020-04-10 深圳前海达闼云端智能科技有限公司 Configuration method, server and computer-readable storage medium
CN113133024A (en) * 2019-12-31 2021-07-16 北京华为数字技术有限公司 Network resource configuration method and device
US20210328863A1 (en) * 2020-04-16 2021-10-21 Juniper Networks, Inc. Model driven configuration management for microservices

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙乃亮;李晔;: "网络设备配置标准化系统研究", 科技创新导报, no. 06, 21 February 2015 (2015-02-21) *

Also Published As

Publication number Publication date
CN114006812B (en) 2024-06-14

Similar Documents

Publication Publication Date Title
US10735345B2 (en) Orchestrating computing resources between different computing environments
US10303586B1 (en) Systems and methods of integrated testing and deployment in a continuous integration continuous deployment (CICD) system
US8601466B2 (en) Software deployment method and system, software deployment server and user server
CN108874558B (en) Message subscription method of distributed transaction, electronic device and readable storage medium
US9092230B2 (en) Configuration of componentized software applications
US20180315024A1 (en) Systems and Methods Enabling Secure Transactions from Terminal Window
US8627274B2 (en) Software tool and method for generating a virtual appliance
WO2021189953A1 (en) Log data processing method and apparatus, computer device, and storage medium
US11762822B2 (en) Determining when a change set was delivered to a workspace or stream and by whom
CN112764792B (en) Method and device for upgrading associated server version application and electronic equipment
CN114489954A (en) Tenant creation method based on virtualization platform, tenant access method and equipment
CN114661375A (en) Application integration method and device
WO2016078326A1 (en) Method, apparatus and system for displaying names of virtual machine
US6864905B2 (en) Method to redisplay active panels
CN106897063B (en) Method and system for permanently adding OS boot entry to BIOS based on EFI
CN114006812B (en) Configuration method and device of network equipment
US10728323B2 (en) Method and apparatus for operating infrastructure layer in cloud computing architecture
CN115469807A (en) Disk function configuration method, device, equipment and storage medium
US8745620B2 (en) Software tool and method for updating a virtual appliance
CN112579165A (en) Batch operation execution method and device, readable medium and electronic equipment
US7849164B2 (en) Configuring a device in a network via steps
JP2021515301A (en) Methods for recovery from failures during garbage collection in the system, computer programs and equipment for recovery from failures during garbage collection in the system.
CN115484149B (en) Network switching method, network switching device, electronic equipment and storage medium
CN109587224B (en) Data processing method and device, electronic equipment and computer readable medium
US20230418961A1 (en) Fine granularity read access to generational safeguarded copy data

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