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

Configuration method and device of network equipment Download PDF

Info

Publication number
CN114006812B
CN114006812B CN202111278114.9A CN202111278114A CN114006812B CN 114006812 B CN114006812 B CN 114006812B CN 202111278114 A CN202111278114 A CN 202111278114A CN 114006812 B CN114006812 B CN 114006812B
Authority
CN
China
Prior art keywords
configuration
preset
information
configuration information
sub
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
Application number
CN202111278114.9A
Other languages
Chinese (zh)
Other versions
CN114006812A (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

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 present disclosure relates to a method, apparatus, system, electronic device, and computer-readable medium for configuring a network device. The method comprises the following steps: acquiring configuration information by a client; configuring 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; and updating the current configuration information of the network equipment 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 issues the configuration in batches through NETCONF, and greatly improve the efficiency of configuration issuing.

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 realization of the same function, each equipment manufacturer has a difference in detail on the realization of the function, and for clients, the difference is mainly reflected on the configuration. Most of the scenes are that the customer manages the equipment through command lines when using equipment of different manufacturers, but the command lines of the manufacturers are realized in different details, so that command line manuals of the equipment of the manufacturers are inconsistent, which causes great trouble to the customer in managing the equipment of the manufacturers. Therefore, based on the advantages of netcon f, each vendor's network equipment is required to increase support for netcon f.
Netcon allows clients to issue all configurations in batches for a function, i.e., all groups at once, and contains sub-configurations for each group. In this way, the network device traverses the first group of sub-configuration, sequentially issues the configuration to the database, traverses other groups after all the sub-configuration is issued, and feeds back the response information after all the groups are processed. However, the time required for this operation to be completed is as long as 15 minutes, which seriously affects the normal use of the netcon f client.
Therefore, there is a need for a solution to the issue response time of batch configuration. Accordingly, there is a need for a new network device configuration method, apparatus, system, electronic device, and computer readable medium.
The above information disclosed in the background section is only for enhancement of understanding of the background of the disclosure and therefore it may include information that does not form the 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 a response time of the network device does not exceed a predetermined timeout time of a client when the client issues configuration in batches through netcon f, thereby greatly improving efficiency of configuration issuing.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the 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 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; and updating the current configuration information of the network equipment to a database.
In an exemplary embodiment of the present disclosure, before the configuration information is acquired by the client, the method further includes: after the network equipment is started, starting a preset process; configuring the network device 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 transmitting 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 network equipment is configured, creating a preset thread for polling based on the preset process.
In one exemplary embodiment of the present disclosure, the configuration information is in the unit of a sub-configuration of the functional group; the network equipment serving as the server is configured according to the configuration information, and the method comprises the following steps: extracting a preset function group based on the configuration information; increasing the zone bit of the preset function group by 1; the sub-configuration is applied to the set of preset functions.
In an exemplary embodiment of the present disclosure, the configuration information is in units of functional groups; the network equipment serving as the server is configured according to the configuration information, and the method comprises the following steps: extracting all the functional groups one by one based on the configuration information; extracting all sub-configurations in all functional 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 return information to the client according to the 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 one exemplary embodiment of the present disclosure, updating current configuration information of the network device to a database includes: polling the zone bit of the function group and the sub-configuration in the network equipment through the preset thread; and when the flag bit does not meet a preset strategy, updating the sub-configuration of the function group corresponding to the flag 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 values of the zone bit and the previous period are different, generating a database statement according to the configuration information of the function group corresponding to the zone bit; updating the configuration information to the database based on the database statement.
According to an aspect of the present disclosure, there is provided a configuration apparatus of a network device, 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 device 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 includes: the client is used for generating configuration information; the server side 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; and updating the current configuration information of the network equipment to a database.
According to an aspect of the present disclosure, there is provided an electronic device including: one or more processors; a storage means for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the methods as described above.
According to an aspect of the present disclosure, a computer-readable medium is presented, on which a computer program is stored, which program, when being executed by a processor, implements a method as described above.
According to the configuration method, the device, the system, the electronic equipment and the computer readable medium of the network equipment, the client acquires configuration information; configuring 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 method for 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 timeout time of the client when the client issues the configuration in batches through NETCONF, thereby greatly improving the efficiency of issuing 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 examples of the present disclosure and other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a schematic diagram illustrating a configuration system of a network device according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a method of configuring a network device according to 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 exemplary embodiment.
Fig. 6 is a block diagram illustrating a configuration apparatus of a network device according to an exemplary embodiment.
Fig. 7 is a block diagram of an electronic device, according to an example embodiment.
Fig. 8 is a block diagram of a computer-readable medium shown according to an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many 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 the example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, 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 disclosed aspects may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they 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 order of actual execution may be changed according to actual situations.
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 element. Accordingly, a first component discussed below could be termed a second component without departing from the teachings of the concepts of the present disclosure. As used herein, the term "and/or" includes any one of the associated listed items and all combinations of one or more.
Those skilled in the art will appreciate that the drawings are schematic representations of example embodiments and that the modules or flows in the drawings are not necessarily required to practice the present disclosure, and therefore, should not be taken to limit the scope of the present disclosure.
The technical abbreviations to which the present disclosure relates are explained as follows:
Netcon f: (Network Configuration Protocol) the network configuration protocol provides a mechanism for managing network devices by which a user can add, modify, delete configuration of network devices and obtain configuration and status information of devices. The communication flow is realized between the client and the server based on the NETCONF protocol, and the specific implementation details are that the protocol (corresponding to the rfc standard) provides a set of general program programming interfaces (APIs), and the client and the server can directly use the APIs 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.
Database: the data is organized, stored, and managed according to a data structure. Databases are of many types, ranging from the simplest to database systems that manage mass data, and so far, databases have been developed to adequately and efficiently manage information resources.
Sqlite3: is a software library, and realizes a self-sufficient, serverless, zero-configuration and transactional SQL database engine. Files in the form of hundreds of kb are stored on disk, which is known to occupy less resources and have high running speed. The main application scene is an environment with small storage data volume, such as embedded development.
The inventor of the present disclosure has found that a 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 store, configuration application, protocol run, etc. A functional module is typically divided into groups, each group in turn containing a plurality of sub-configurations. On the storage of the configuration, it is stored in the database in the form of a group, and the id of the group is used as the primary key of the database.
When the netcon client performs configuration operation on a function, the flow of one-time issuing supports issuing configuration according to a plurality of different units, for example: it is possible to specify the sub-configuration a of the function group 0, to do all the sub-configurations according to the function group 0, or to do all the sub-configurations of all the function groups.
Assume that the database table name is 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 of the group 0 sub-configuration a of a function issued by the netcon f client, the general flow of managing network devices by the netcon f client is as follows:
(1) The NETCONF client sends information to the network equipment of the server;
(2) The server process analysis information is configuration issuing, and the corresponding specific configuration is sub-configuration A of group 0;
(3) The process firstly issues the value a of the group 0 sub-configuration A to a database (database), and the database statement is executed as follows: insert or replace into tb _module (conf_a) VALUES (a) where id=0; the configuration is issued to the memory and is used by the function;
(4) And (3) the process assembles the result into information according to the execution result of the process (3) and feeds the information back to the client.
(5) And the client judges whether the result of the operation is success or failure according to the returned result.
There are 2 ways for the netcon client to judge whether the server is successful:
1. determining whether the configuration issued by the client is successful or not according to the message code fed back by the server;
2. the client sets a timeout time for each operation, generally 30s, that is, when the client sends a message, the message is not fed back within 30s, and the execution failure of the server is determined. Otherwise, the message code is used as the reference.
Netcon allows clients to issue all configurations in batches for a function, i.e., all groups at once, and contains sub-configurations for each group. In this way, the network device traverses the first group of sub-configuration, sequentially issues the configuration to the database, traverses other groups after all the sub-configuration is issued, and feeds back the response information after all the groups are processed. However, the time required for this operation to be completed is as long as 15 minutes, which seriously affects the normal use of the netcon f client.
In view of the technical problems in the prior art, the present disclosure proposes a configuration method of a network device, by which even if a client issues configuration in batches through netcon f, the response time of the network device is guaranteed not to exceed the predetermined timeout time of the client, and policy usage of the client is guaranteed.
Fig. 1 is a schematic diagram illustrating a configuration system of a network device according to an exemplary embodiment.
As shown in fig. 1, the system architecture 10 may include servers 101, 102, 103, a network 104, and clients 105. The network 104 is the medium used to provide communication links between the servers 101, 102, 103 and the clients 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
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, for example, generate configuration information according to user operations; 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, for example, according to the configuration information; the servers 101, 102, 103 may generate and send return information to the clients, for example, according to the configuration results; 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 device 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 embodiments of the present disclosure may be executed by the servers 101, 102, 103, and accordingly, the configuration apparatus of the network device may be set in the servers 101, 102, 103. While the operator provided to the user to generate configuration information is typically located in the client 105.
Fig. 2 is a flow chart illustrating a method of configuring a network device according to an example embodiment. The configuration method 20 of the network device at least includes steps S202 to S208.
As shown in fig. 2, in S202, configuration information is acquired by a client. The client is a netcon 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 the unit of a sub-configuration of the functional group; the configuring the network device as the server according to the configuration information may include: extracting a preset function group based on the configuration information; increasing the zone bit of the preset function group by 1; the sub-configuration is applied to the set of preset functions.
More specifically, as shown in fig. 3, the client may operate in units of sub-configurations of a certain function group, for example. More specifically, the netcon client issues the group 0 sub-configuration a, after the process receives the configuration, the process does not execute the flow of configuration storage, and the flag bit of the flag group 0 is added with 1, so as to directly perform configuration application.
In one embodiment, the configuration information is in units of functional groups; the configuring the network device as the server according to the configuration information may include: extracting all the functional groups one by one based on the configuration information; extracting all sub-configurations in all functional 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 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 the flag bit in the group every time one sub-configuration is added. The traversal is continued again, remaining approximately within 30 s.
In S206, return information is generated according to the configuration result and sent to the client. Comprising 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 netcon client receives the response information from the server, which indicates that the operation is completed and continues with the next operation;
In S208, the current configuration information of the network device is updated to a database. In one embodiment, the flag bits of the functional groups and sub-configurations in the network device may be polled periodically by the preset thread; and when the flag bit does not meet a preset strategy, updating the sub-configuration of the function group corresponding to the flag bit to the database.
More specifically, for example, when the flag bit and the value of the last period are different, a database statement may be generated according to the configuration information of the function group corresponding to the flag bit; updating the configuration information to the database based on the database statement.
In the present disclosure, the database may be sqlilte database, and the application scenario is single, and is mainly used for storing the service configuration of the user operating on the network device. Through sqlilte databases, all list data in the database can be simultaneously issued by one sentence, and the sqlilte databases are used in cooperation with the database updating operation of the application, 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 function group, for example. The preset thread can be a polling thread A, the polling thread A traverses all groups, reads set marks of all groups, judges whether each group of marks are the same as the marks of the previous second, and if the marks are the same, the polling thread A finishes the round of execution and waits for the next execution to come.
If the labels are different, according to the existing configuration of the group A, using one database statement to update all the sub-configurations in the group into the corresponding database at the same time, the executed database statement can 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 execution of the thread A is finished and the next execution is waited.
More specifically, as shown in fig. 4, for example, the client may issue configuration to the network device in units of all groups of a certain function, the polling thread a screens groups with changed configuration according to the front and back flag bits, traverses each changed group, assembles into a database statement according to the existing configuration in the group, and issues to the database according to the group id. Updating the flag bits of each group, and ending execution by the polling thread A.
In one embodiment, the database may also be closed after execution to poll thread A, prior to device restart. This operation prevents the polling thread a from ending in advance when the device is restarted, and thus the complete configuration storage cannot be completed.
According to the configuration method of the network equipment, a client acquires configuration information; configuring 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 method for 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 timeout time of the client when the client issues the configuration in batches through NETCONF, thereby greatly improving the efficiency of issuing the configuration.
According to the configuration method of the network equipment, the separation of the flow and the flow of the data issuing to the functions is realized through the configuration storage of the database, 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 the data issuing to the functions by means of the use of change marks, the operation times of the database are reduced, and the quick response of the NETCONF client side in issuing 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 exemplary embodiment. The flow 50 shown in fig. 5 is a complementary 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 procedure. Comprising the following steps: calling configuration information in a database based on the preset process; and transmitting the configuration information to the network equipment for configuration.
After the server network equipment is normally started, the server process is normally started, a preset process opens the database (until the equipment is restarted and then closed), the configuration of the existing related database is extracted, and all the configurations are issued to the function application.
In S506, a preset thread is created based on the preset process. A preset thread for polling may be created based on the preset process, for example, after the network device configuration is completed. After all the configurations of the preset process are restored, a polling thread A is created, and polling operation is started at intervals of one second.
Those skilled in the art will appreciate that all or part of the steps implementing the above described embodiments are implemented as a computer program executed by a CPU. The above-described functions defined by the above-described methods provided by the present disclosure are performed when the computer program is executed by a CPU. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic disk or an optical disk, etc.
Furthermore, it should be noted that the above-described figures are merely illustrative of the processes involved in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
The following are device embodiments of the present disclosure that may be used to perform method embodiments of the present disclosure. For details not disclosed in the embodiments of the apparatus of the present disclosure, please 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 exemplary embodiment. As shown in fig. 6, the configuration apparatus 60 of the network device includes: the information module 602, the configuration module 604, the return module 606, the update module 608, and the configuration apparatus 60 of the network device may further include: an initial setup module 610.
The information module 602 is configured to obtain configuration information from a client;
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 and send return information to the client according to the configuration result;
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 device based on the preset process; and creating a preset thread based on the preset process.
According to the configuration device of the network equipment, a client acquires configuration information; configuring 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 method for 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 timeout time of the client when the client issues the configuration in batches through NETCONF, thereby greatly improving the efficiency of issuing the configuration.
Fig. 7 is a block diagram of an electronic device, according to an example embodiment.
An electronic device 700 according to such an embodiment of the present disclosure is described below with reference to fig. 7. The electronic device 700 shown in fig. 7 is merely an example and should not be construed to limit the functionality and scope of use of embodiments of the present disclosure in any way.
As shown in fig. 7, the electronic device 700 is embodied in the form of a general purpose computing device. Components of 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 connecting the different 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 is executable by the processing unit 710 such that the processing unit 710 performs steps described in the present specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 710 may perform the steps as shown in fig. 2, 5.
The memory unit 720 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 7201 and/or cache memory 7202, and may further include Read Only Memory (ROM) 7203.
The storage 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 or some combination of which may include an implementation of a network environment.
Bus 730 may be a bus representing 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.), devices that enable a user to interact with the electronic device 700, and/or any devices (e.g., routers, modems, etc.) with which the electronic device 700 can communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 750. Also, electronic device 700 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 760. Network adapter 760 may communicate with other modules of electronic device 700 via bus 730. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 700, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, as shown in fig. 8, 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 (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, or a network device, etc.) to perform the above-described method according to the embodiments 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. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk 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 data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium 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 of 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, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, 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., connected via the Internet using an Internet service provider).
The computer-readable medium carries one or more programs, which when executed by one of the devices, cause the computer-readable medium to perform the functions of: acquiring configuration information by a client; configuring 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; and updating the current configuration information of the network equipment to a database. The computer readable medium may also implement the following functions: after the network equipment is started, starting a preset process; configuring the network device 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 may be distributed throughout several devices as described in the embodiments, and that corresponding variations may be implemented in one or more devices that are unique to the embodiments. The modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solutions 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 (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and include several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform 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 this disclosure is not limited to the particular arrangements, instrumentalities and methods of implementation 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 (5)

1. A method for configuring a network device, comprising:
after the network equipment is started, starting a preset process;
Calling configuration information in a database based on the preset process;
the configuration information is issued to the network equipment for configuration;
Creating a preset thread based on the preset process;
Acquiring configuration information by a client;
Configuring network equipment serving as a server according to the configuration information, wherein the configuration information comprises the steps of extracting a preset function group based on the configuration information when the configuration information takes a sub-configuration of the function group as a unit, increasing a flag bit of the preset function group by 1, and applying the sub-configuration to the preset function group; and when the configuration information takes the function group as a unit, 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 all the sub-configurations, and increasing the flag bits of all the sub-configurations by 1;
generating return information according to the configuration result and sending the return information to the client;
updating the current configuration information of the network equipment to a database, wherein the method comprises the steps of periodically polling the zone bit of the function group and the sub-configuration in the network equipment through the preset thread, and updating the sub-configuration of the function group corresponding to the zone bit to the database when the zone bit does not meet a preset strategy.
2. The configuration method according to claim 1, wherein creating a preset thread based on the preset process includes:
and after the network equipment is configured, creating a preset thread for polling based on the preset process.
3. The configuration method according to claim 1, wherein generating return information according to the configuration result and transmitting the return information to the client 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.
4. The configuration method according to claim 1, wherein updating the sub-configuration of the function group corresponding to the flag bit to the database when the flag bit does not satisfy a preset policy includes:
when the values of the zone bit and the previous period are different, generating a database statement according to the configuration information of the function group corresponding to the zone bit;
updating the configuration information to the database based on the database statement.
5. A configuration apparatus of a network device, comprising:
The initial setting module is used for starting a preset process after the network equipment is started; configuring the network device based on the preset process; creating a preset thread based on the preset process;
The information module is used for acquiring configuration information by the client;
A configuration module, configured to configure a network device as a server according to the configuration information, including, when the configuration information takes a sub-configuration of a function group as a unit, extracting a preset function group based on the configuration information, increasing a flag bit of the preset function group by 1, and applying the sub-configuration to the preset function group; and when the configuration information takes the function group as a unit, 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 all the sub-configurations, and increasing the flag bits of all the sub-configurations by 1;
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, and comprises the steps of regularly polling the zone bit of the function group and the sub-configuration in the network equipment through the preset thread and updating the sub-configuration of the function group corresponding to the zone bit to the database when the zone bit does not meet a preset strategy.
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 CN114006812A (en) 2022-02-01
CN114006812B true 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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442469A (en) * 2007-11-22 2009-05-27 ***通信集团公司 Method, system and apparatus for down distributing configuration data

Family Cites Families (13)

* 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
CN101110822B (en) * 2007-07-06 2011-11-02 华为技术有限公司 Event notice sending method, system and equipment based on network configuration protocol
CN102148817B (en) * 2010-12-08 2014-04-16 华为技术有限公司 Network equipment configuration method, client, server and network system
CN104113443B (en) * 2013-04-19 2018-10-02 南京中兴新软件有限责任公司 A kind of network device detection methods, device and cloud detection system
WO2015147780A1 (en) * 2014-03-24 2015-10-01 Hewlett-Packard Development Company, L.P. Client-based port filter table
CN105591819B (en) * 2015-12-24 2019-05-07 新华三技术有限公司 The method and device of Configuration network equipment
CN105959148A (en) * 2016-06-15 2016-09-21 上海斐讯数据通信技术有限公司 Method for network management system to control network equipment
EP3516824A4 (en) * 2016-09-19 2020-04-29 Telefonaktiebolaget LM Ericsson (PUBL) Method for network management based on netconf protocol, and associated network device
CN110768818B (en) * 2018-07-27 2021-02-12 华为技术有限公司 Network management method and device
CN111082953B (en) * 2018-10-19 2022-11-22 华为技术有限公司 Configuration method, device and related equipment
CN110995481A (en) * 2019-11-25 2020-04-10 深圳前海达闼云端智能科技有限公司 Configuration method, server and computer-readable storage medium
CN113133024B (en) * 2019-12-31 2022-09-02 北京华为数字技术有限公司 Network resource configuration method and device
US11252025B2 (en) * 2020-04-16 2022-02-15 Juniper Networks, Inc. Model driven configuration management for microservices

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442469A (en) * 2007-11-22 2009-05-27 ***通信集团公司 Method, system and apparatus for down distributing configuration data

Also Published As

Publication number Publication date
CN114006812A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
US10735345B2 (en) Orchestrating computing resources between different computing environments
KR102493449B1 (en) Edge computing test methods, devices, electronic devices and computer-readable media
CN108961033B (en) Multi-service system interaction method and device, storage medium and electronic terminal
US20130318512A1 (en) Hot Pluggable Extensions for Access Management System
US20180315024A1 (en) Systems and Methods Enabling Secure Transactions from Terminal Window
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN112764792B (en) Method and device for upgrading associated server version application and electronic equipment
CN111866099B (en) Method, device, system, equipment and storage medium for downloading mirror image file
CN111831461A (en) Method and device for processing business process
CN110609755A (en) Message processing method, device, equipment and medium for cross-block chain node
CN110221910B (en) Method and apparatus for performing MPI jobs
CN114489954A (en) Tenant creation method based on virtualization platform, tenant access method and equipment
CN114661375A (en) Application integration method and device
CN107526838B (en) Method and device for database cluster capacity expansion
WO2016078326A1 (en) Method, apparatus and system for displaying names of virtual machine
CN112491940B (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
WO2024001240A1 (en) Task integration method and apparatus for multiple technology stacks
CN112230944A (en) Application installation method and device, electronic equipment and computer readable medium
CN114006812B (en) Configuration method and device of network equipment
CN116737662A (en) Method, device, electronic equipment and storage medium for processing business data
CN113722007B (en) Configuration method, device and system of VPN branch equipment
US10728323B2 (en) Method and apparatus for operating infrastructure layer in cloud computing architecture
CN113708955B (en) Equipment configuration method, device and system
CN115469807A (en) Disk function configuration method, device, equipment and storage medium
CN112181930B (en) File management method and device for virtual switching matrix

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