CN114448791A - Configuration method and device of routing module, electronic equipment and readable storage medium - Google Patents

Configuration method and device of routing module, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114448791A
CN114448791A CN202111543842.8A CN202111543842A CN114448791A CN 114448791 A CN114448791 A CN 114448791A CN 202111543842 A CN202111543842 A CN 202111543842A CN 114448791 A CN114448791 A CN 114448791A
Authority
CN
China
Prior art keywords
configuration
routing module
configuration parameter
instruction
parameter
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
CN202111543842.8A
Other languages
Chinese (zh)
Other versions
CN114448791B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111543842.8A priority Critical patent/CN114448791B/en
Publication of CN114448791A publication Critical patent/CN114448791A/en
Application granted granted Critical
Publication of CN114448791B publication Critical patent/CN114448791B/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
    • 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/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The invention relates to the technical field of communication networks and discloses a configuration method and device of a routing module, electronic equipment and a readable storage medium. Wherein, the method comprises the following steps: acquiring a starting configuration parameter of a routing module; determining a target configuration parameter of the routing module based on the change state of the start configuration parameter; and configuring the routing module based on the target configuration parameters. By implementing the method and the device, when the change of the starting configuration parameters is monitored, the routing module can be directly configured according to the changed configuration parameters, the configuration loss caused by configuration conflict is avoided, and the routing configuration effect is ensured to meet the expected effect.

Description

Configuration method and device of routing module, electronic equipment and readable storage medium
Technical Field
The invention relates to the technical field of communication networks, in particular to a configuration method and device of a routing module, electronic equipment and a readable storage medium.
Background
A Network Operating System (NOS) configures a Network device by configuring a routing module, and for the configuration of the routing module, the routing module is generally configured by user interface instructions provided by various user interfaces (such as KLISH CLI, RESTful API, and NETCONF) of the routing module, where the user interface instructions are provided by the routing module. For example, an operator wants to configure a static route for a routing module by using the RESTful client API, the RESTful server running on the NOS converts an instruction of the static route into a user interface instruction of the routing module, and issues the user interface instruction, and configuration information of the static route is stored in the routing module. When the routing module is restarted, a static routing module user interface (such as jinja2 files) is used for configuring the routing module, a configuration management process is started by utilizing routing module configuration information of a database memory to generate corresponding routing module configuration, and the corresponding routing module configuration is loaded when the routing module is restarted.
However, the above-mentioned routing configuration has a risk of configuration loss, if the routing module is restarted, the start configuration management process is generating the routing module configuration, at this time, the operator issues an instruction to the routing module through the user interface, the routing module configuration generated by the start configuration management process conflicts with the configuration of the operator, and the configuration of the operator is covered, for example, the operator needs to start a function of bgp graceful-restart, but is covered by the start configuration generated by the start configuration management process, so that the bgp graceful-restart is not enabled. This results in a loss of configuration of the routing module and difficulty in achieving the desired configuration.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for configuring a routing module, an electronic device, and a readable storage medium, so as to solve the problems in the prior art that configuration conflicts cause user configuration loss and it is difficult to achieve an expected configuration effect.
According to a first aspect, an embodiment of the present invention provides a method for configuring a routing module, including: acquiring a starting configuration parameter of a routing module; determining a target configuration parameter of the routing module based on the change state of the startup configuration parameter; configuring the routing module based on the target configuration parameters.
According to the configuration method of the routing module provided by the embodiment of the invention, the starting configuration parameters of the routing module are obtained, the target configuration parameters of the routing module are determined based on the change state of the starting configuration parameters, and then the routing module is configured according to the target configuration parameters, so that when the starting configuration parameters are monitored to be changed, the routing module can be directly configured according to the changed configuration parameters, the configuration loss caused by configuration conflict is avoided, and the routing configuration effect is ensured to meet the expected effect.
With reference to the first aspect, in a first implementation manner of the first aspect, the determining a target configuration parameter of the routing module based on the change status of the start configuration parameter includes: judging whether a dynamic configuration instruction corresponding to the starting configuration parameter is received; and when the dynamic configuration instruction is received, changing the starting configuration parameters of the routing module based on the dynamic configuration instruction to obtain the target configuration parameters of the routing module.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the determining a target configuration parameter of the routing module based on the change status of the start configuration parameter further includes: and when the dynamic configuration instruction is not received, determining the starting configuration parameter as the target configuration parameter.
According to the configuration method of the routing module provided by the embodiment of the invention, when a dynamic configuration instruction corresponding to the starting configuration parameter is received, the starting configuration parameter of the routing module is changed based on the dynamic configuration instruction to obtain the target configuration parameter of the routing module, so that the configuration of an operator can cover the starting configuration of the routing module, the dynamic configuration of the routing module is realized, the configuration information of the operator is ensured not to be lost, and the expected configuration effect is realized; when the dynamic configuration instruction is not received, the starting configuration parameter is determined as the target configuration parameter, and the target configuration parameter is adopted to configure the routing module, so that the static configuration of the routing module is realized, and the accurate configuration of the routing module is realized.
With reference to the first implementation manner or the second implementation manner of the first aspect, in a third implementation manner of the first aspect, the dynamic configuration instruction includes: one or more of an add instruction, a delete instruction, and a modify instruction.
According to the configuration method of the routing module provided by the embodiment of the invention, the dynamic configuration instruction comprises one or more of a new adding instruction, a deleting instruction and a modifying instruction, so that the application configuration of the routing module is enriched to meet more dynamic configuration scenes.
With reference to the first aspect, in a fourth implementation manner of the first aspect, the obtaining the start-up configuration parameter of the routing module includes: acquiring the running state of a routing module; judging whether the routing module is restarted or not based on the running state; and when the routing module is restarted, acquiring the starting configuration parameters of the routing module.
With reference to the fourth embodiment of the first aspect, in a fifth embodiment of the first aspect, the method further comprises: and when the routing module is not restarted, acquiring the current configuration parameters of the routing module.
According to the configuration method of the routing module provided by the embodiment of the invention, the running state of the routing module is obtained, whether the routing module is restarted is judged based on the running state, the starting configuration parameters of the routing module are obtained when the routing module is restarted, and the current configuration parameters of the routing module are obtained when the routing module is not restarted, so that the current running state of the routing module and the configuration parameters corresponding to the running state of the routing module can be accurately determined.
With reference to the first aspect, in a sixth implementation manner of the first aspect, the configuring the routing module based on the target configuration parameter includes: generating a configuration instruction corresponding to the target configuration parameter; and configuring the routing module based on the configuration instruction.
According to the configuration method of the routing module provided by the embodiment of the invention, when the target configuration parameters are obtained, the configuration instruction corresponding to the target configuration parameters is generated, and the routing module is configured based on the configuration instruction, so that the effective dynamic configuration of the routing module is realized, and the configuration effect is ensured.
According to a second aspect, an embodiment of the present invention provides a configuration apparatus for a routing module, including: the acquisition module is used for acquiring the starting configuration parameters of the routing module; a determining module, configured to determine a target configuration parameter of the routing module based on a change status of the start configuration parameter; and the configuration module is used for configuring the routing module based on the target configuration parameters.
According to a third aspect, an embodiment of the present invention provides an electronic device, including: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing therein computer instructions, and the processor executing the computer instructions to perform the method for configuring a routing module according to the first aspect or any embodiment of the first aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer instructions are stored, and the computer instructions are configured to cause a computer to execute the method for configuring a routing module according to the first aspect or any implementation manner of the first aspect.
For corresponding beneficial effects of the configuration apparatus of a routing module, the electronic device, and the computer-readable storage medium provided in the embodiments of the present invention, please refer to the description of corresponding contents in the configuration method of a routing module, which is not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method of configuration of a routing module according to an embodiment of the invention;
FIG. 2 is another flow diagram of a method of configuration of a routing module according to an embodiment of the invention;
FIG. 3 is another flow diagram of a method of configuration of a routing module according to an embodiment of the invention;
FIG. 4 is a flow diagram illustrating a configuration of a routing module according to an embodiment of the present invention;
fig. 5 is a block diagram of a configuration apparatus of a routing module according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the existing routing configuration method, when a routing module is restarted, a start configuration management process is generating a routing module configuration, at this time, an operator issues an instruction to the routing module through a user interface, and the routing module configuration generated by the start configuration management process conflicts with the configuration of the operator, and the configuration of the operator is covered, for example, the operator needs to start a function of bgp graceful-restart but is covered by the start configuration generated by the start configuration management process, so that the bgp graceful-restart is not enabled. This results in a loss of configuration of the routing module and difficulty in achieving the desired configuration.
Based on this, the technical scheme of the invention configures the routing module by the target configuration parameter obtained after the change when the change of the starting configuration parameter is detected by obtaining and storing the starting configuration parameter of the routing module, thereby avoiding the configuration of an operator from being covered by the starting configuration, avoiding the configuration from being lost due to the occurrence of configuration conflict and ensuring the configuration effect of the routing module.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for configuring a routing module, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
In this embodiment, a configuration method of a routing module is provided, which may be used in an electronic device, such as a mobile phone, a tablet computer, a computer, and the like, where the electronic device is provided with a configuration management process, and monitors configuration parameters of the routing module through the configuration management process, and fig. 1 is a flowchart of the configuration method of the routing module according to the embodiment of the present invention, as shown in fig. 1, the flowchart includes the following steps:
and S11, acquiring the starting configuration parameters of the routing module.
The starting configuration parameter is a static routing configuration parameter generated when the routing module is started, the static routing configuration parameter generated when the routing module is started can be stored in a configuration database CONFIG _ DB in a configuration management process, and the electronic device can obtain the starting configuration parameter of the routing module by accessing the configuration database in the configuration management process.
S12, determining the target configuration parameter of the routing module based on the changed state of the start-up configuration parameter.
If an operator issues a configuration instruction to the routing module through the user interface when the routing module is started, the configuration parameters corresponding to the configuration instruction are stored in the configuration database CONFIG _ DB together, the start configuration parameters in the configuration database CONFIG _ DB are covered, and the configuration parameters corresponding to the current configuration instruction are used as target configuration parameters. If the operator does not perform any configuration when the routing module is started, the routing module may use the start configuration parameter as the target configuration parameter.
And S13, configuring the routing module based on the target configuration parameters.
The electronic device generates corresponding routing configuration information through a configuration management process by using a target configuration parameter in a configuration database CONFIG _ DB, and sends the routing configuration information to a routing module so as to control the routing module to perform corresponding routing configuration according to the routing configuration information.
In the configuration method for the routing module provided in this embodiment, the start configuration parameter of the routing module is obtained, the target configuration parameter of the routing module is determined based on the change state of the start configuration parameter, and the routing module is configured according to the target configuration parameter, so that when it is monitored that the start configuration parameter changes, the routing module can be directly configured according to the changed configuration parameter, thereby avoiding configuration loss caused by configuration conflict, and ensuring that the routing configuration effect meets the expected effect.
In this embodiment, a configuration method of a routing module is provided, which can be used in electronic devices, such as a mobile phone, a tablet computer, a computer, and the like, fig. 2 is a flowchart of the configuration method of the routing module according to the embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
and S21, acquiring the starting configuration parameters of the routing module. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
S22, determining the target configuration parameter of the routing module based on the changed state of the start-up configuration parameter.
Specifically, the step S22 may include:
s221, judging whether a dynamic configuration instruction corresponding to the startup configuration parameters is received.
The dynamic configuration instruction is input by an operator through a user interface corresponding to the routing module. When the routing module is started, if an operator needs to dynamically configure the routing module, the operator can input a dynamic configuration instruction through a user interface corresponding to the routing module. Accordingly, the electronic device can detect whether it receives a dynamic configuration instruction corresponding to the start configuration parameter in real time. When the dynamic configuration instruction is received, step S222 is executed, otherwise step S223 is executed.
S222, changing the starting configuration parameters of the routing module based on the dynamic configuration instruction to obtain the target configuration parameters of the routing module.
When receiving the dynamic configuration instruction, the electronic device may determine a configuration parameter corresponding to the dynamic configuration instruction, and override the start configuration parameter of the routing module with the configuration parameter to change the start configuration parameter of the routing module, so as to obtain a target configuration parameter corresponding to the routing module.
The dynamic configuration instruction comprises one or more of an addition instruction, a deletion instruction and a modification instruction. The new adding instruction is used for adding new configuration parameters on the basis of the starting configuration parameters, the deleting instruction is used for deleting one or more configuration parameters from the starting configuration parameters, and the modifying instruction is used for modifying the starting configuration parameters.
And S223, determining the starting configuration parameters as target configuration parameters.
When the dynamic configuration instruction is not received, the electronic device can directly read the start configuration parameter generated when the routing module is started, and directly use the start configuration parameter as the target configuration parameter of the routing module, so that the start configuration parameter is loaded into the routing module to realize the configuration of the routing module.
And S23, configuring the routing module based on the target configuration parameters. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
In the configuration method for the routing module provided by this embodiment, when a dynamic configuration instruction corresponding to the start configuration parameter is received, the start configuration parameter of the routing module is changed based on the dynamic configuration instruction to obtain a target configuration parameter of the routing module, so that the configuration of an operator can cover the start configuration of the routing module, and it is ensured that the configuration information of the operator is not lost, so as to achieve an expected configuration effect; when the dynamic configuration instruction is not received, the starting configuration parameter is determined as the target configuration parameter, and the target configuration parameter is adopted to configure the routing module, so that the static configuration of the routing module is realized, and the accurate configuration of the routing module is realized. The dynamic configuration instruction comprises one or more of an addition instruction, a deletion instruction and a modification instruction, so that the application configuration of the routing module is enriched to meet more dynamic configuration scenes.
In this embodiment, a configuration method of a routing module is provided, which can be used in electronic devices, such as a mobile phone, a tablet computer, a computer, and the like, fig. 3 is a flowchart of the configuration method of the routing module according to the embodiment of the present invention, and as shown in fig. 3, the flowchart includes the following steps:
and S31, acquiring the starting configuration parameters of the routing module.
Specifically, the step S31 may include:
s311, obtaining the running state of the routing module.
The running state is used to represent the current working state of the routing module, and the running state may be a starting state, a restarting state, a normal working state, or other states, and the running state is not specifically limited here. Specifically, the electronic device may monitor an operation parameter of the routing module in real time to determine an operation state of the routing module.
And S312, judging whether the routing module is restarted or not based on the running state.
The electronic device determines whether the routing module is in a restart state according to the running state of the routing module, and executes step S313 when the routing module is in the restart state, otherwise executes step S314.
S313, the starting configuration parameters of the routing module are obtained.
When the routing module is restarted, the routing module may generate a corresponding start-up configuration parameter, and store the start-up configuration parameter in the configuration database CONFIG _ DB, and at this time, the electronic device may obtain the start-up configuration parameter when the routing module is restarted by accessing the configuration database CONFIG _ DB.
S314, obtaining the current configuration parameters of the routing module.
When the routing module is not restarted, it indicates that the routing module in the electronic device is in a normal operation state, at this time, the current configuration parameters corresponding to the routing module are stored in the configuration database CONFIG _ DB, and the electronic device can directly access the configuration database CONFIG _ DB to determine the current configuration parameters of the routing module.
S32, determining the target configuration parameter of the routing module based on the changed state of the start-up configuration parameter. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And S33, configuring the routing module based on the target configuration parameters.
Specifically, the step S33 may include:
s331, a configuration instruction corresponding to the target configuration parameter is generated.
The electronic device can generate a configuration instruction corresponding to the target configuration parameter through the configuration management process, and issue the configuration instruction to a routing configuration module in the electronic device to control the routing configuration module to perform configuration operation of the routing module.
S332, configuring the routing module based on the configuration instruction.
The routing configuration module in the electronic equipment configures the routing module based on the received configuration instruction, so that the configuration management process can generate the configuration instruction according to unified management to realize the configuration of the routing module, and the configuration repetition and configuration conflict between the start configuration parameter and the configuration parameter corresponding to the dynamic configuration instruction are avoided when the routing module is restarted.
In the configuration method for the routing module provided in this embodiment, the running state of the routing module is obtained, whether the routing module is restarted is judged based on the running state, when the routing module is restarted, the start configuration parameter of the routing module is obtained, and when the routing module is not restarted, the current configuration parameter of the routing module is obtained, so that the current running state of the routing module and the configuration parameter corresponding to the running state of the routing module can be accurately determined. When the target configuration parameters are obtained, the configuration instruction corresponding to the target configuration parameters is generated, and the routing module is configured based on the configuration instruction, so that the effective dynamic configuration of the routing module is realized, and the configuration effect is ensured.
In this embodiment, a specific example is used to describe the configuration method of the routing module, when the routing module is restarted, the configuration management process generates a start configuration parameter, at this time, an operator issues a dynamic configuration instruction of the routing module through a user interface, but the start configuration parameter generated by the configuration management process and the configuration of the operator will conflict, at this time, the configuration of the operator will be covered, which results in configuration loss, and the time sequence and the configuration of the routing module are shown in the following table:
table 1 configuration timing chart
Figure BDA0003415156650000091
Based on the above time sequence configuration, if an operator intends to start the bgp graceful-restart function when the routing module is restarted, but the configuration is covered by the start configuration parameters generated by the configuration management process, so that the bgp graceful-restart is not actually enabled, mainly because the configuration management process generates a configuration file according to the start configuration script to be merged into the routing module, the bgp graceful-restart is not enabled in the start configuration parameters, at this time, the generated configuration file does not configure an action but generates a block configuration to be merged into the routing module together, and further, the no bgp graceful-restart configuration is repeatedly issued.
Based on the above problem, in the embodiment, a configuration management process (frrcfgd) is added to the sonoc first, the CONFIG _ DB in the Database container is monitored, the routing module restarts the static allocation or user dynamic configuration routing module, so that an add (SET) operation, a DELETE (DELETE) operation, and a modify (UPDATE) operation can be performed on the CONFIG _ DB directly according to the provided user interface, and when any one of the add (SET) operation, the DELETE (DELETE) operation, and the modify (UPDATE) operation occurs in the CONFIG _ DB, the configuration management process is notified. Accordingly, the configuration management process generates a corresponding configuration instruction for a SET operation, a DELETE operation and an UPDATE action of the CONFIG _ DB, and sends the configuration instruction to the routing configuration module, which implements the configuration operation of the routing module, as shown in fig. 4.
Therefore, when the routing module is restarted, the starting configuration parameters are stored in the CONFIG _ DB, when an operator issues a dynamic configuration instruction of the routing module by using a user interface, the starting configuration parameters stored in the CONFIG _ DB are replaced by the configuration parameters corresponding to the dynamic configuration instruction, the configuration management process generates the configuration instruction of the routing module in a unified manner, and finally the configuration of the routing module meets the expected configuration effect.
In this embodiment, the SONiC architecture extends the configuration function of the routing module in the NOS, and allows a user to input a dynamic configuration instruction of the routing module using various user interfaces, and the configuration instruction of the routing module is uniformly generated and issued by a configuration management process, thereby avoiding repeated issuing of configuration and configuration conflict, and solving the problem of user configuration loss.
In this embodiment, a configuration device of a routing module is further provided, where the configuration device is used to implement the foregoing embodiments and preferred embodiments, and details are not repeated for what has been described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, implementations in hardware or a combination of software and hardware are also possible and contemplated.
The present embodiment provides a configuration apparatus of a routing module, as shown in fig. 5, including:
the obtaining module 41 is configured to obtain a start configuration parameter of the routing module. For a detailed description, reference is made to the corresponding related description of the above method embodiments, which is not repeated herein.
A determining module 42, configured to determine a target configuration parameter of the routing module based on the change status of the start-up configuration parameter. For a detailed description, reference is made to the corresponding related description of the above method embodiments, which is not repeated herein.
A configuration module 43, configured to configure the routing module based on the target configuration parameter. For a detailed description, reference is made to the corresponding related description of the above method embodiments, which is not repeated herein.
The configuration device for a routing module according to this embodiment determines the target configuration parameter of the routing module based on the change state of the start configuration parameter by obtaining the start configuration parameter of the routing module, and then configures the routing module according to the target configuration parameter, so that when it is monitored that the start configuration parameter changes, the routing module can be directly configured according to the changed configuration parameter, thereby avoiding configuration loss due to configuration conflict, and ensuring that the routing configuration effect meets the expected effect.
Optionally, the determining module 42 may include:
and the first judgment submodule is used for judging whether a dynamic configuration instruction corresponding to the starting configuration parameter is received or not. For a detailed description, reference is made to the corresponding related description of the above method embodiments, which is not repeated herein.
And the first determining submodule is used for changing the starting configuration parameters of the routing module based on the dynamic configuration instruction when the dynamic configuration instruction is received, so as to obtain the target configuration parameters of the routing module. For a detailed description, reference is made to the corresponding related description of the above method embodiments, which is not repeated herein.
And the second determining submodule is used for determining the starting configuration parameter as the target configuration parameter when the dynamic configuration instruction is not received. For detailed description, reference is made to the corresponding related description of the above method embodiments, and details are not repeated herein.
In the configuration device of the routing module provided in this embodiment, when a dynamic configuration instruction corresponding to the start configuration parameter is received, the start configuration parameter of the routing module is changed based on the dynamic configuration instruction to obtain a target configuration parameter of the routing module, so that configuration of an operator can cover the start configuration of the routing module, and it is ensured that configuration information of the operator is not lost, so as to achieve an expected configuration effect; when the dynamic configuration instruction is not received, the starting configuration parameter is determined as the target configuration parameter, and the target configuration parameter is adopted to configure the routing module, so that the static configuration of the routing module is realized, and the accurate configuration of the routing module is realized.
Optionally, the obtaining module 41 may include:
and the first obtaining submodule is used for obtaining the running state of the routing module. For a detailed description, reference is made to the corresponding related description of the above method embodiments, which is not repeated herein.
And the second judgment submodule judges whether the routing module is restarted or not based on the running state. For a detailed description, reference is made to the corresponding related description of the above method embodiments, which is not repeated herein.
And the third obtaining sub-module is used for obtaining the starting configuration parameters of the routing module when the routing module is restarted. For a detailed description, reference is made to the corresponding related description of the above method embodiments, which is not repeated herein.
And the fourth obtaining sub-module is used for obtaining the current configuration parameters of the routing module when the routing module is not restarted. For a detailed description, reference is made to the corresponding related description of the above method embodiments, which is not repeated herein.
The configuration apparatus for a routing module provided in this embodiment determines whether the routing module is restarted based on the running state by obtaining the running state of the routing module, obtains a start configuration parameter of the routing module when the routing module is restarted, and obtains a current configuration parameter of the routing module when the routing module is not restarted, thereby being capable of accurately determining the current running state of the routing module and a configuration parameter corresponding to the running state thereof.
Optionally, the configuration module 43 may include:
and the generation submodule is used for generating a configuration instruction corresponding to the target configuration parameter. For a detailed description, reference is made to the corresponding related description of the above method embodiments, which is not repeated herein.
And the configuration submodule is used for configuring the routing module based on the configuration instruction. For detailed description, reference is made to the corresponding related description of the above method embodiments, and details are not repeated herein.
The configuration device for a routing module provided in this embodiment generates a configuration instruction corresponding to a target configuration parameter when the target configuration parameter is obtained, and configures the routing module based on the configuration instruction, thereby implementing effective dynamic configuration of the routing module and ensuring a configuration effect.
The configuration means of the routing module in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and a memory executing one or more software or fixed programs, and/or other devices that can provide the above-mentioned functions.
An embodiment of the present invention further provides an electronic device, which has the configuration apparatus of the routing module shown in fig. 5.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, and as shown in fig. 6, the electronic device may include: at least one processor 501, such as a CPU (Central Processing Unit), at least one communication interface 503, memory 504, and at least one communication bus 502. Wherein a communication bus 502 is used to enable connective communication between these components. The communication interface 503 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 503 may also include a standard wired interface and a standard wireless interface. The Memory 504 may be a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 504 may optionally be at least one storage device located remotely from the processor 501. Wherein the processor 501 may be in connection with the apparatus described in fig. 5, an application program is stored in the memory 504, and the processor 501 calls the program code stored in the memory 504 for performing any of the above-mentioned method steps.
The communication bus 502 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 502 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
The memory 504 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated: HDD) or a solid-state drive (english: SSD); the memory 504 may also comprise a combination of the above types of memory.
The processor 501 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of CPU and NP.
The processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 504 is also used to store program instructions. The processor 501 may call program instructions to implement the configuration method of the routing module as shown in the embodiments of fig. 1 to 3 of the present application.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the processing method of the configuration method of the routing module in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A method for configuring a routing module, comprising:
acquiring a starting configuration parameter of a routing module;
determining a target configuration parameter of the routing module based on the change state of the start-up configuration parameter;
configuring the routing module based on the target configuration parameters.
2. The method of claim 1, wherein determining the target configuration parameter of the routing module based on the changed status of the start-up configuration parameter comprises:
judging whether a dynamic configuration instruction corresponding to the starting configuration parameter is received;
and when the dynamic configuration instruction is received, changing the starting configuration parameters of the routing module based on the dynamic configuration instruction to obtain the target configuration parameters of the routing module.
3. The method of claim 2, wherein determining the target configuration parameter of the routing module based on the changed status of the start-up configuration parameter further comprises:
and when the dynamic configuration instruction is not received, determining the starting configuration parameter as the target configuration parameter.
4. The method of claim 2 or 3, wherein the dynamic configuration instructions comprise: one or more of an add instruction, a delete instruction, and a modify instruction.
5. The method of claim 1, wherein obtaining the startup configuration parameters of the routing module comprises:
acquiring the running state of a routing module;
judging whether the routing module is restarted or not based on the running state;
and when the routing module is restarted, acquiring the starting configuration parameters of the routing module.
6. The method of claim 5, further comprising:
and when the routing module is not restarted, acquiring the current configuration parameters of the routing module.
7. The method of claim 1, wherein the configuring the routing module based on the target configuration parameter comprises:
generating a configuration instruction corresponding to the target configuration parameter;
and configuring the routing module based on the configuration instruction.
8. An apparatus for configuring a routing module, comprising:
the acquisition module is used for acquiring the starting configuration parameters of the routing module;
a determining module, configured to determine a target configuration parameter of the routing module based on a change status of the startup configuration parameter;
and the configuration module is used for configuring the routing module based on the target configuration parameters.
9. An electronic device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method of configuring a routing module of any one of claims 1 to 7.
10. A computer-readable storage medium storing computer instructions for causing a computer to perform the method of configuring a routing module of any one of claims 1 to 7.
CN202111543842.8A 2021-12-16 2021-12-16 Configuration method and device of routing module, electronic equipment and readable storage medium Active CN114448791B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111543842.8A CN114448791B (en) 2021-12-16 2021-12-16 Configuration method and device of routing module, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111543842.8A CN114448791B (en) 2021-12-16 2021-12-16 Configuration method and device of routing module, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN114448791A true CN114448791A (en) 2022-05-06
CN114448791B CN114448791B (en) 2023-08-25

Family

ID=81364062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111543842.8A Active CN114448791B (en) 2021-12-16 2021-12-16 Configuration method and device of routing module, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114448791B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10091056B1 (en) * 2015-08-06 2018-10-02 Amazon Technologies, Inc. Distribution of modular router configuration
CN111010346A (en) * 2019-12-23 2020-04-14 深信服科技股份有限公司 Message processing method, device, storage medium and device based on dynamic routing
CN112486497A (en) * 2020-11-26 2021-03-12 北京自如信息科技有限公司 Compiling configuration file generation method and device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10091056B1 (en) * 2015-08-06 2018-10-02 Amazon Technologies, Inc. Distribution of modular router configuration
CN111010346A (en) * 2019-12-23 2020-04-14 深信服科技股份有限公司 Message processing method, device, storage medium and device based on dynamic routing
CN112486497A (en) * 2020-11-26 2021-03-12 北京自如信息科技有限公司 Compiling configuration file generation method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GITHUB: "Support for FRR configuration based on config DB events", Retrieved from the Internet <URL:https://github.com/sonic-net/sonic-buildimage/pull/5142> *

Also Published As

Publication number Publication date
CN114448791B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN107832100B (en) APK plug-in loading method and terminal thereof
CN108572795B (en) Capacity expansion method, device, equipment and storage medium based on built storage virtualization
US10666758B2 (en) Browser resource pre-pulling method, terminal and storage medium
US20230344914A1 (en) Scene pushing method, scene executing method, scene pushing device, scene executing device, terminal, server and system
CN108228293B (en) Interface skin switching method and device
US11146660B2 (en) Information packet download method for preventing high concurrency, electronic device and storage medium
CN112527397A (en) Method and device for modifying basic input output system options and computer equipment
CN112434278A (en) Bare computer authentication method, apparatus, device and medium
CN113010214B (en) BIOS option setting method, system and storage medium
CN111294377A (en) Network request sending method of dependency relationship, terminal device and storage medium
CN104104701A (en) Online service configuration updating method and system
CN112286559A (en) Upgrading method and device for vehicle-mounted intelligent terminal
CN111752454A (en) Skin control method, device, terminal and medium for application program interface
CN114924826B (en) Page fusion method, device and equipment based on different code platforms
CN114448791B (en) Configuration method and device of routing module, electronic equipment and readable storage medium
WO2022134918A1 (en) Virtual machine attribute changing method and apparatus, storage medium, and electronic device
CN116361106A (en) Log processing method and device, electronic equipment and storage medium
CN113485855B (en) Memory sharing method and device, electronic equipment and readable storage medium
CN108809763B (en) Network performance parameter acquisition method, terminal device and storage medium
CN114553859A (en) BMC configuration management method and device, electronic equipment and storage medium
CN110058866B (en) Cluster component installation method and device
CN113849195A (en) Application program loading method and device, storage medium and terminal
CN111858234A (en) Task execution method, device, equipment and medium
CN107302605B (en) Configuration method and device of television proxy server, television and storage medium
CN116225576B (en) Application program data environment switching method and device, electronic equipment and medium

Legal Events

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