CN110300017B - Standard configuration generating device and method and network equipment configuration error correcting device and method - Google Patents

Standard configuration generating device and method and network equipment configuration error correcting device and method Download PDF

Info

Publication number
CN110300017B
CN110300017B CN201910430429.7A CN201910430429A CN110300017B CN 110300017 B CN110300017 B CN 110300017B CN 201910430429 A CN201910430429 A CN 201910430429A CN 110300017 B CN110300017 B CN 110300017B
Authority
CN
China
Prior art keywords
network
command line
configuration
equipment
network equipment
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
CN201910430429.7A
Other languages
Chinese (zh)
Other versions
CN110300017A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910430429.7A priority Critical patent/CN110300017B/en
Publication of CN110300017A publication Critical patent/CN110300017A/en
Application granted granted Critical
Publication of CN110300017B publication Critical patent/CN110300017B/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/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • 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
    • H04L41/0843Configuration by using pre-existing information, e.g. using templates or copying from other elements based on generic templates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration
    • 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/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a standard configuration generation method and device and a network equipment configuration error correction method and device, and belongs to the technical field of networks. The method comprises the steps of obtaining a standard configuration template, dynamic configuration parameters and factory equipment commands of the network equipment according to equipment information of the network equipment, and then carrying out dynamic configuration parameter and factory equipment command updating on the standard configuration template of the network equipment to obtain a standard configuration command line of the network equipment.

Description

Standard configuration generating device and method and network equipment configuration error correcting device and method
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for generating a standard configuration for a network device, and a method and an apparatus for correcting a configuration error of a network device.
Background
After the network device, such as a switch and a router device, is on-line and the null configuration is started, the network device is issued through automatic configuration, for example, a network port DHCP acquires an IP and then automatically issues the configuration start to a configuration server or manually inserts a u-disk with a configuration file to perform non-intervention automatic configuration. However, no effective feedback mechanism exists in these processes to ensure the correct distribution of the configuration, for example, there is a problem that a large proportion of devices lose the configuration after the machine room network device starts and completes the automatic configuration. One reason for such problems is that the online of the network device is the initial stage of network construction, various support environments are not stable, and individual problems are likely to occur, and another reason is that the non-configuration startup is the behavior initiated by the network device individual after startup, so that complete overall monitoring does not exist, and the situation that configuration omission cannot be found effectively is likely to occur.
The prior art implements the automation of configuration issuing, but has no guarantee of a subsequent checking and checking feedback mechanism, and can not ensure the final correctness of configuration issuing. Problems occurring in the configuration issuing process can be modified only through exposure of subsequent problems, and great hidden danger exists.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a standard configuration generation method and apparatus for a network device, and a network device configuration error correction method and apparatus, which are used to solve or at least partially solve the above technical problems.
In order to achieve the above object, an aspect of the embodiments of the present invention provides a standard configuration generation method for a network device, where the method includes: reading in equipment information of the network equipment; acquiring a standard configuration template of the network equipment according to the equipment information of the network equipment; acquiring dynamic configuration parameters of the network equipment according to the equipment information of the network equipment; acquiring a manufacturer equipment command of the network equipment according to the equipment information of the network equipment; and updating the dynamic configuration parameters and the factory equipment commands of the standard configuration template of the network equipment based on the dynamic configuration parameters and the factory equipment commands of the network equipment to obtain a standard configuration command line of the network equipment.
Optionally, the dynamic configuration parameters include: an IP address of the network device, a BGP protocol of the network device, and/or an as sequence number of the network device.
On the other hand, an embodiment of the present invention further provides a network device configuration error correction method, where the method includes: capturing a command line actually operated by each network device in one or more network devices; comparing the standard configuration command line of each of the one or more network devices with the actually-operated command line to obtain a network device having a difference between the configuration command line of the one or more network devices and the actually-operated command line, wherein the standard configuration command line is obtained by the standard configuration generation method for the network device; and for the differencing network device, error correcting the actually-running command line of the differencing network device using the standard configuration command line of the differencing network device.
Optionally, the error correcting the actually-operated command line of the differentiated network device using the standard configuration command line of the differentiated network device includes: issuing the standard configuration command line of the different network equipment to the different network equipment; or issuing the configuration command with the difference between the standard configuration command line of the network equipment with the difference and the actually operated command line to the network equipment with the difference.
Optionally, the method further includes: counting the differencing network devices of the one or more network devices and generating a configuration list containing the standard configuration command line of the differencing network devices and the differencing network devices of the actually-running command line.
Optionally, the method further includes: if the network equipment with the difference is obtained, sending alarm prompt information; and/or generating a process log for the differencing network device of the one or more network devices.
On the other hand, an embodiment of the present invention further provides a standard configuration generating apparatus for a network device, where the apparatus includes: a standard configuration generation module: the equipment information is used for reading in the network equipment; acquiring a standard configuration template of the network equipment according to the equipment information of the network equipment; acquiring dynamic configuration parameters of the network equipment according to the equipment information of the network equipment; acquiring a manufacturer equipment command of the network equipment according to the equipment information of the network equipment; and updating the dynamic configuration parameters and the factory equipment commands of the standard configuration template of the network equipment based on the dynamic configuration parameters and the factory equipment commands of the network equipment to obtain a standard configuration command line of the network equipment.
Optionally, the apparatus further comprises: a standard configuration template file library for storing standard configuration templates of one or more network devices; a dynamic configuration parameter file library for storing dynamic configuration parameters of one or more network devices; and a different vendor device command database for storing vendor device commands for one or more of the network devices.
Optionally, the dynamic configuration parameters include: an IP address of the network device, a BGP protocol of the network device, and/or an as sequence number of the network device.
On the other hand, an embodiment of the present invention further provides an apparatus for network device configuration error correction, where the apparatus includes: the actual configuration grabbing module is used for grabbing a command line actually operated by each network device in one or more network devices; a central control and configuration comparison module, configured to compare a standard configuration command line of each of the one or more network devices with the actually-operated command line, respectively, to obtain a network device having a difference between the configuration command line and the actually-operated command line in the one or more network devices, where the standard configuration command line is generated by the standard configuration generation apparatus for network devices; and a configuration error correction module for correcting errors for the actually-operated command line of the differencing network device using the standard configuration command line of the differencing network device.
Optionally, the error correcting the actually-operated command line of the differentiated network device using the standard configuration command line of the differentiated network device includes: issuing the standard configuration command line of the different network equipment to the different network equipment; or issuing the configuration command with difference in the standard configuration command line and the actually-operated command line of the network equipment with difference to the network equipment with difference.
Optionally, the central control and configuration comparison module is further configured to count the network devices with differences among the one or more network devices and generate a configuration list including the network devices with differences between the standard configuration command line of the network devices with differences and the actually-operated command line.
Optionally, the apparatus further comprises: the alarm module is used for sending alarm prompt information if the central control and configuration comparison module acquires the network equipment with the difference; and/or a logging module to generate a process log for the differencing network device of the one or more network devices.
In another aspect, an embodiment of the present invention further provides a machine-readable storage medium, where the machine-readable storage medium has instructions stored thereon, and the instructions are configured to cause a machine to perform: generating a standard configuration for the network device according to the standard configuration; and/or configuring an error correction method according to the network equipment.
On the other hand, an embodiment of the present invention further provides a processor, configured to execute a program, where the program is executed to perform: a standard configuration generation method for a network device as described above; and/or configuring an error correction method according to the network equipment.
Through the technical scheme, the standard configuration command line of each network device is compared with the actually-operated command line to obtain the different network devices, and the actually-operated command lines of the different network devices are corrected by using the standard configuration command lines of the different network devices, so that a feedback closed loop and self-healing mechanism of configuration confirmation is realized, potential risks of network operation are automatically checked, the normal working state of the network devices is ensured, the quality of a basic network (such as an IDC network) is ensured, and more reliable network service is provided for upper-layer services.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the embodiments of the invention without limiting the embodiments of the invention. In the drawings:
fig. 1 is a flowchart of a standard configuration generation method for a network device according to an embodiment of the present invention.
Fig. 2 is a flowchart of a standard configuration generation method for a network device according to another embodiment of the present invention.
Fig. 3 is a schematic diagram of a standard configuration generating apparatus for a network device according to an embodiment of the present invention.
Fig. 4 is a flowchart of a method for correcting configuration errors of a network device according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of an error correction apparatus for network device configuration according to another embodiment of the present invention.
Fig. 6 is a schematic diagram of an error correction apparatus for network device configuration according to an embodiment of the present invention.
Detailed Description
The following describes in detail embodiments of the present invention with reference to the drawings. It should be understood that the detailed description and specific examples, while indicating embodiments of the invention, are given by way of illustration and explanation only, not limitation.
Fig. 1 is a flowchart of a standard configuration generation method for a network device according to an embodiment of the present invention, where the method includes:
step S101, reads in device information of the network device.
Step S102, a standard configuration template of the network equipment is obtained according to the equipment information of the network equipment.
Step S103, acquiring the dynamic configuration parameters of the network equipment according to the equipment information of the network equipment.
Wherein, the dynamic configuration parameters may include: an IP address of the network device, a BGP protocol of the network device, and/or an as sequence number of the network device.
And step S104, acquiring a manufacturer equipment command of the network equipment according to the equipment information of the network equipment.
Step S105, a standard configuration command line of the network device is generated.
Specifically, the standard configuration command line of the network device is obtained by updating the dynamic configuration parameters and the factory device commands of the standard configuration template of the network device based on the dynamic configuration parameters and the factory device commands of the network device.
It can be understood that the standard configuration template may be a configuration command template that needs to be issued to a network device, and may be applicable to a plurality of network devices, where the versions of the devices are different, and dynamic configuration parameters corresponding to the network devices may also be different, for example, the command line modes of the device a and the device b of the manufacturer a may be different, and the command line modes of the device n version and the device m version may also be different, so that the dynamic configuration parameters of the network devices in the standard configuration template need to be replaced and updated according to device information (for example, device models and version signals) of the network devices based on the standard configuration template; similarly, if different network devices are from different manufacturers, the configuration command lines of different manufacturers may be different, for example, the configuration of the IP address, the configuration command of manufacturer a and the configuration command of manufacturer B may be different, and thus; the factory device commands of the devices in the standard configuration template need to be replaced and updated according to the device information (such as factory information) of the network devices based on the standard configuration template.
When dynamic configuration parameters and factory device commands are updated on the standard configuration template of the network device, the update sequence can be updated sequentially, for example, in consideration of the inclusion relationship or priority sequence of the update information. In addition, steps 102 to 104 are not limited to a strict execution sequence, and may be executed successively according to actual situations.
The embodiment of the invention acquires the standard configuration template, the dynamic configuration parameters and the manufacturer equipment commands of the network equipment according to the equipment information of the network equipment, and then performs dynamic configuration parameter and manufacturer equipment command updating on the standard configuration template of the network equipment to obtain the standard configuration command line of the network equipment.
Fig. 2 is a flowchart of a standard configuration generating method for a network device according to another embodiment of the present invention. Based on the standard configuration generation method for the network device described in the foregoing embodiment, the standard configuration generation method for the network device described in the embodiment of the present invention further includes:
step S206, determining whether the device information of all the network devices is read completely, if yes, ending the process, otherwise, executing step S101.
A plurality of network devices (e.g., IDC devices) may exist in a machine room (e.g., an IDC machine room), and by performing the same procedure on all the network devices in the machine room, automated inspection of all the network devices (e.g., IDC devices) in the whole machine room (e.g., the IDC machine room) can be realized. Of course, the network devices in a specific group meeting the requirement can be patrolled by setting the requirement condition.
The working principle and the beneficial effect of the standard configuration generation method according to the embodiment of the present invention are similar to those of the standard configuration generation method according to the above embodiment, and are not described herein again.
An embodiment of the present invention provides a storage medium on which a program is stored, which, when executed by a processor, implements the standard configuration generation method for a network device.
The embodiment of the invention provides a processor, which is used for running a program, wherein the standard configuration generation method for network equipment is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: the method comprises the steps of reading equipment information of the network equipment, obtaining a standard configuration template of the network equipment according to the equipment information of the network equipment, obtaining dynamic configuration parameters of the network equipment according to the equipment information of the network equipment, obtaining manufacturer equipment commands of the network equipment according to the equipment information of the network equipment, and updating the dynamic configuration parameters and the manufacturer equipment commands of the standard configuration template of the network equipment based on the dynamic configuration parameters and the manufacturer equipment commands of the network equipment to obtain a standard configuration command line of the network equipment.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: reading in equipment information of the network equipment; acquiring a standard configuration template of the network equipment according to the equipment information of the network equipment; acquiring dynamic configuration parameters of the network equipment according to the equipment information of the network equipment; acquiring a manufacturer equipment command of the network equipment according to the equipment information of the network equipment; and updating the dynamic configuration parameters and the manufacturer equipment commands of the standard configuration template of the network equipment based on the dynamic configuration parameters and the manufacturer equipment commands of the network equipment to obtain a standard configuration command line of the network equipment.
The dynamic configuration parameters include: an IP address of the network device, a BGP protocol of the network device, and/or an as sequence number of the network device.
Fig. 3 is a schematic diagram of a standard configuration generating apparatus for a network device according to an embodiment of the present invention, where the apparatus includes: a standard configuration generation module: the device information is used for reading in the network device; acquiring a standard configuration template of the network equipment according to the equipment information of the network equipment; acquiring dynamic configuration parameters of the network equipment according to the equipment information of the network equipment; acquiring a manufacturer equipment command of the network equipment according to the equipment information of the network equipment; and updating the dynamic configuration parameters and the factory equipment commands of the standard configuration template of the network equipment based on the dynamic configuration parameters and the factory equipment commands of the network equipment to obtain a standard configuration command line of the network equipment.
It can be understood that the standard configuration template may be a configuration command template that needs to be issued to a network device, and may be applicable to a plurality of network devices, where the versions of the network devices and the network devices are different, and dynamic configuration parameters corresponding to the network devices may also be different, for example, command line modes of an a device and a b device of a manufacturer a may be different, and command line modes of an n version and an m version of the a device may also be different, and therefore, the dynamic configuration parameters of the network devices in the standard configuration template need to be replaced and updated according to device information (for example, device models and version signals) of the network devices based on the standard configuration template; similarly, if different network devices are from different manufacturers, the configuration command lines of different manufacturers may be different, for example, the configuration of the IP address, the configuration command of manufacturer a and the configuration command of manufacturer B may be different, and thus; the factory device commands of the network devices in the standard configuration template need to be replaced and updated according to the device information (such as factory information) of the network devices based on the standard configuration template.
It is understood that, when dynamic configuration parameters and factory device commands are updated on the standard configuration template of the network device, the update sequence may be updated sequentially, for example, in consideration of the inclusion relationship or priority sequence of the update information.
The standard configuration generating device of the network equipment further comprises: the standard configuration template file library is used for storing standard configuration templates of one or more network devices; the dynamic configuration parameter file library is used for storing dynamic configuration parameters of one or more network devices; and a different vendor device command database for storing vendor device commands for one or more network devices.
Specifically, the standard configuration template may be a configuration command template to be issued to the device, and may be applicable to a plurality of devices, and the standard configuration template file library stores standard configuration templates of all network devices. The dynamic configuration parameters corresponding to the network devices may also be different due to different versions of the devices and the devices, for example, ip addresses of the network devices, as serial numbers of a BGP protocol, and the like, and the dynamic configuration parameters corresponding to the network devices may be obtained in the dynamic configuration parameter file library according to device information (for example, device models and version signals) of the network devices, and then the dynamic configuration parameters of the network devices in the standard configuration template are replaced and updated. And automatically generating an accurate command line which is actually executed by the network equipment by retrieving the standard configuration template according to the equipment information and replacing and updating the dynamic configuration parameters of the standard configuration template of the network equipment and the manufacturer equipment command.
The working principle and the beneficial effect of the standard configuration generating device for network equipment according to the embodiment of the present invention are similar to those of the standard configuration generating method for network equipment according to the above embodiment, and are not described herein again.
The standard configuration generation device for the network equipment comprises a processor and a memory, wherein the standard configuration generation module, the standard configuration template file library, the dynamic configuration parameter file library, the equipment command databases of different manufacturers and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can set one or more than one, and standard configuration command lines of the network equipment are obtained by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
Fig. 4 is a flowchart of a method for correcting configuration errors of a network device according to an embodiment of the present invention. The method comprises the following steps:
step S401, a standard configuration command line of the network device is generated.
The standard configuration command line of the network device may be generated according to the standard configuration generating apparatus for a network device described in any of the above embodiments.
Step S402, capturing the command line actually operated by the network equipment.
Specifically, the actual operation command can be captured and recorded by traversing all network devices of the machine room (e.g., IDC machine room). For example, the command to be captured may be directly executed after logging in the network device, or the command may be an execution script issued to the network device, and the network device replies the configuration command information after executing the script.
Step S403, it is determined that the standard configuration command line and the actually operated command line have been acquired, and if the determination result is "yes", step S407 is executed, otherwise step S404 is executed.
Step S404, delaying for a predetermined time.
The predetermined time can be set according to actual needs, and is 10s for example.
Step S405, determining whether the delay time exceeds the threshold, if yes, executing step S406, otherwise returning to step S403.
The threshold may be set according to actual needs, for example, 20 times.
Step S406, error reporting is performed.
Specifically, the sound-light alarm and the information prompt can be combined to remind the staff and provide detailed related abnormal information for the staff.
Step S407, compare the standard configuration command line of the network device with the actually operated command line.
Step S408, determining whether the comparison information is different, if yes, executing step S409, otherwise ending the process.
The command line actually executed by the standard configuration command behavior equipment is compared with the command line actually operated by the network equipment, and whether a problem occurs in the configuration period of the network equipment can be judged according to the comparison result.
The comparison between the standard configuration command line and the actually operated command line may be performed for a single network device at a time, or may be performed for a plurality of network devices simultaneously. For example, after obtaining the command line and the standard configuration command line actually operated by a certain device, the comparison may be directly performed for the network device, or after obtaining the command lines and the standard configuration command lines actually operated by all the network devices in a machine room (e.g., an IDC machine room), the comparison may be performed in parallel for all the network devices.
Step S409, counting the network devices with differences, and generating a configuration list.
It is understood that, in order to obtain the detailed information of the network devices with differences, the number of the network devices with differences (IDC network devices) in all the network devices (IDC network devices) in a machine room (e.g., IDC machine room) may be counted, and a configuration list of the standard configuration command line and the actually-operated command line for each network device with differences may be generated.
Step S410, the configuration is sent down again.
Wherein, the configuration of the network device with difference may be redelivered according to the configuration list generated in step S409. Specifically, after a comparison difference occurs between the standard configuration command line of a certain network device and the actually-operated command line, the generated standard configuration command line may be re-issued to the network device, for example, in a global configuration issuing manner, that is, the network device that is to find the difference performs overall issuing again according to the standard configuration command line; for example, the method may be a local configuration issuing method, and only the command configuration in the actually-running command line that is different from the standard configuration command line is updated. If the parallel comparison mode is adopted, after comparison of all network devices (IDC network devices) in a machine room (e.g., an IDC machine room) is completed, configuration updating can be performed on the network devices with differences in all network devices (IDC network devices) at the same time. In addition, after the network device completes the re-issuing of the configuration command, the updated configuration command line of the network device needs to be saved, so as to prevent the network device from being powered off and still executing the command line that is not updated last time after the network device is restarted next time.
And step S411, giving an alarm and generating a process log.
Specifically, when the network equipment with the difference is obtained, an alarm signal can be sent out through the sound-light alarm device to prompt the network equipment to be configured and wrongly issued, and meanwhile, a process log can be generated for the network equipment with the difference to provide detailed fault information for a maintainer. The generated process log may include information such as different network devices, standard configuration command lines corresponding to the different network devices, and actually-operating command lines. The process logs can be generated for all network devices (IDC network devices) with differences in a machine room (such as an IDC machine room) at the same time, and can be displayed in a list and other concise and intuitive modes.
Step S410 and step S411 are not limited by a strict execution sequence, and may be executed sequentially or simultaneously according to actual situations.
The invention obtains the network equipment with difference by respectively comparing the standard configuration command line of each network equipment with the command line actually operated, corrects the error of the command line actually operated by the network equipment with difference by using the standard configuration command line of the network equipment with difference, and automatically completes the whole process, thereby ensuring the correctness of the configuration of all the network equipment, ensuring the consistency of the actual behavior and the design behavior of the network equipment, namely automatically checking the potential risk of network operation through a feedback closed loop and self-healing mechanism confirmed by configuration, ensuring the normal working state of the network equipment, ensuring the quality of a basic network (such as an IDC network) and providing more reliable network service for upper-layer services.
In addition, the invention also utilizes an automatic configuration checking method to pertinently confirm whether the configuration of the whole IDC machine room network equipment is correctly issued and carry out error correction operation, thereby ensuring the normal working state of the network equipment and checking the potential risk of network operation. In addition, through the alarm prompt and the generation of the process log, the method can remind the working personnel in time, can intuitively provide the configuration command lines to be issued for the working personnel, and improves the timeliness of fault processing.
An embodiment of the present invention provides a storage medium, on which a program is stored, which, when executed by a processor, implements the network device configuration error correction method.
The embodiment of the invention provides a processor, which is used for running a program, wherein the network device configuration error correction method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: capturing a command line actually operated by each network device in one or more network devices; comparing the standard configuration command line of each network device of the one or more network devices with the actually-operated command line respectively to obtain the network device with the difference between the configuration command line of the one or more network devices and the actually-operated command line, wherein the standard configuration command line is obtained by the standard configuration generating method for the network device according to any one of the above; and correcting the error of the command line actually operated by the network equipment with the difference by using the standard configuration command line of the network equipment with the difference aiming at the network equipment with the difference.
Correcting error of the actually executed command line of the differencing network device using the standard configuration command line of the differencing network device comprises: issuing a standard configuration command line of the network equipment with the difference to the network equipment with the difference; or sending the configuration command with the difference between the standard configuration command line of the network equipment with the difference and the actually operated command line to the network equipment with the difference.
The method further comprises the following steps: and counting the network devices with the difference in one or more network devices and generating a configuration list containing the network devices with the difference in the standard configuration command line of the network devices with the difference in the actually-operated command line.
The method further comprises the following steps: if the network equipment with the difference is obtained, sending alarm prompt information; and/or generating a process log for a network device that is different from the one or more network devices.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: capturing a command line actually operated by each network device in one or more network devices; comparing the standard configuration command line of each network device of the one or more network devices with the actually-operated command line respectively to obtain the network device with the difference between the configuration command line of the one or more network devices and the actually-operated command line, wherein the standard configuration command line is obtained by the standard configuration generating method for the network device according to any one of the above; and correcting the error of the command line actually operated by the network equipment with the difference by using the standard configuration command line of the network equipment with the difference aiming at the network equipment with the difference.
Correcting error of the actually executed command line of the differencing network device using the standard configuration command line of the differencing network device comprises: issuing a standard configuration command line of the network equipment with the difference to the network equipment with the difference; or sending the configuration command with the difference in the standard configuration command line of the network equipment with the difference from the actually operated command line to the network equipment with the difference.
The method further comprises the following steps: and counting the network devices with the difference in one or more network devices and generating a configuration list containing the network devices with the difference in the standard configuration command line of the network devices with the difference in the actually-operated command line.
The method further comprises the following steps: if the network equipment with the difference is obtained, sending alarm prompt information; and/or generating a process log for a network device that is different from the one or more network devices.
Fig. 5 is a schematic diagram of an apparatus for correcting configuration errors of a network device according to an embodiment of the present invention, where the apparatus includes: the actual configuration grabbing module is used for grabbing a command line actually operated by each network device in one or more network devices; a central control and configuration comparison module, configured to compare a standard configuration command line of each network device of the one or more network devices with an actually-operated command line, respectively, to obtain a network device in which a configuration command line of the one or more network devices is different from an actually-operated command line, where the standard configuration command line is generated by the standard configuration generation apparatus for network devices according to any of the embodiments; and the configuration error correction module is used for correcting the error of the command line actually operated by the network equipment with the difference by using the standard configuration command line of the network equipment with the difference aiming at the network equipment with the difference.
The actual configuration grabbing module can grab and record an actual operation command by traversing all network devices of a machine room (such as an IDC machine room). Specifically, the captured command may be directly executed after logging in the network device, or the captured command may be an execution script issued to the network device, and the network device replies the configuration command information after executing the script.
The standard configuration command behavior is a command line which is actually executed by the network equipment, and the command line which is actually operated by the network equipment is compared with the standard configuration command line, so that whether a problem occurs in the configuration period of the network equipment can be judged according to the comparison result. And if the actually-operated command line is different from the standard configuration command line, correcting the actually-operated command line of the different network device by using the standard configuration command line of the different network device, so that the actually-operated command line of the network device after error correction is the same as the standard configuration command line of the network device.
The working principle and the beneficial effect of the network device configuration error correction apparatus according to the embodiment of the present invention are similar to those of the network device configuration error correction method according to any of the above embodiments, and are not described herein again.
Fig. 6 is a schematic diagram of an error correction apparatus for network device configuration according to another embodiment of the present invention, where the apparatus includes: the actual configuration grabbing module is used for grabbing a command line actually operated by each network device in one or more network devices; a central control and configuration comparison module, configured to compare a standard configuration command line of each network device of the one or more network devices with an actually-operated command line, respectively, to obtain a network device in which a configuration command line of the one or more network devices is different from an actually-operated command line, where the standard configuration command line is generated by the standard configuration generation apparatus for network devices according to any of the embodiments; and the configuration error correction module is used for correcting the error of the command line actually operated by the network equipment with the difference by using the standard configuration command line of the network equipment with the difference aiming at the network equipment with the difference.
It can be understood that the comparison between the standard configuration command line and the actually-operated command line by the central control and configuration comparison module may be performed for a single network device at a time, or may be performed for a plurality of network devices simultaneously. For example, after obtaining a command line actually run by a certain network device and a standard configuration command line, the central control and configuration comparison module may compare the command line with the standard configuration command line, and then correct the error of the actually run command line of the network device having a difference; or after obtaining the command lines of all the network devices actually operating in the machine room (for example, in the IDC machine room) and the standard configuration command lines, performing parallel comparison on all the network devices, and finally simultaneously retransmitting the configuration to correct the error of the command lines of the network devices actually operating with the difference. In the case of parallel comparison, the standard configuration generating device may be used to generate a standard configuration command line of all network devices (IDC network devices) in a machine room (e.g., IDC machine room) to form a device (IDC network device) standard configuration; and grabbing the command lines of the actual operation of all network devices (IDC network devices) in the machine room (such as the IDC machine room) by using the actual configuration grabbing module to form the actual configuration of the devices (IDC network devices).
Correcting error of the actually executed command line of the differencing network device using the standard configuration command line of the differencing network device comprises: issuing a standard configuration command line of the network equipment with the difference to the network equipment with the difference; or sending the configuration command with the difference between the standard configuration command line of the network equipment with the difference and the actually operated command line to the network equipment with the difference.
It can be understood that, when the standard configuration command line of a certain network device is different from the actually operated command line, the standard configuration command line generated by the standard configuration generating device may be re-issued to the network device, for example, in a global configuration issuing manner, that is, the network device that is to find the difference performs overall issuing again according to the standard configuration command line; for example, the method may be a local configuration issuing method, and only the command configuration in the actually-running command line that is different from the standard configuration command line is updated. If the parallel comparison mode is adopted, after comparison of all network devices (IDC network devices) in a machine room (e.g., an IDC machine room) is completed, configuration updating can be performed on the network devices with differences in all network devices (IDC network devices) at the same time. In addition, after the network device completes the re-issuing of the configuration command, the updated configuration command line of the network device needs to be saved, so as to prevent the network device from being powered off and still executing the command line that is not updated last time after the network device is restarted next time.
The central control and configuration comparison module is further used for counting the network devices with differences in one or more network devices and generating a configuration list containing the network devices with differences in the standard configuration command lines of the network devices with differences and the actually-operated command lines of the network devices with differences.
It is understood that, in order to obtain the detailed information of the network devices with differences, the number of the network devices with differences (IDC network devices) in all the network devices (IDC network devices) in a machine room (e.g., IDC machine room) may be counted, and a configuration list of the standard configuration command line and the actually-operated command line for each network device with differences may be generated.
The apparatus may further comprise: the alarm module is used for sending alarm prompt information if the central control and configuration comparison module acquires the network equipment with the difference; and/or a logging module to generate a process log for a differencing network device of the one or more network devices.
It can be understood that when the central control and configuration comparison module acquires the network devices with differences, an alarm signal can be sent out through the audible and visual alarm device to prompt the network devices to issue errors in configuration, and meanwhile, the recording module can be used for generating process logs for the network devices with differences to provide detailed fault information for the maintainers. The process log generated by the recording module may include information such as different network devices, standard configuration command lines corresponding to the different network devices, and actually-operated command lines. The recording module can generate process logs for all network devices (IDC network devices) with differences in a machine room (such as an IDC machine room) at the same time, and can display the process logs in a list and other concise and intuitive modes.
The network equipment configuration error correction device comprises a processor and a memory, wherein the standard configuration generation device, the actual configuration capture module, the central control and configuration comparison module, the configuration error correction module, the alarm module, the recording module and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can set one or more, and the error correction is carried out on the command line of the actual operation of the network equipment with difference by adjusting the kernel parameter.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The working principle and the beneficial effect of the network device configuration error correction apparatus according to the embodiment of the present invention are similar to those of the network device configuration error correction method according to any of the above embodiments, and are not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (11)

1. A method for network device configuration error correction, the method comprising:
capturing a command line actually operated by each network device in one or more network devices;
obtaining a standard configuration command line for each of the one or more network devices, comprising:
reading in equipment information of the network equipment;
acquiring a standard configuration template of the network equipment according to the equipment information of the network equipment;
acquiring dynamic configuration parameters of the network equipment according to the equipment information of the network equipment;
acquiring a manufacturer equipment command of the network equipment according to the equipment information of the network equipment; and
updating the standard configuration template of the network equipment with the dynamic configuration parameters and the factory equipment commands based on the dynamic configuration parameters and the factory equipment commands of the network equipment to obtain a standard configuration command line of the network equipment;
judging that the standard configuration command line and the actually operated command line are obtained completely;
if not, the acquisition is finished:
delaying acquisition of a predetermined time;
judging whether the time delay times exceed a threshold or not;
if the command line does not exceed the threshold, the standard configuration command line and the actually operated command line are continuously obtained;
if the threshold is exceeded, an error is reported abnormally;
if the obtaining is finished, comparing the standard configuration command line with the actually-operated command line respectively to obtain the network equipment with the configuration command line and the actually-operated command line in the one or more network equipment having difference; and
for the differencing network device, error correcting the actually-running command line of the differencing network device using the standard configuration command line of the differencing network device, comprising:
issuing the standard configuration command line of the different network equipment to the different network equipment; or
And issuing the configuration command with the difference between the standard configuration command line and the actually operated command line of the network equipment with the difference to the network equipment with the difference.
2. The method of claim 1, wherein the dynamic configuration parameters comprise:
an IP address of the network device, a BGP protocol of the network device, and/or an as sequence number of the network device.
3. The method of claim 1, further comprising:
counting the network devices with differences in the one or more network devices, and generating a configuration list of the network devices with differences, wherein the configuration list includes the standard configuration command line and the actually-operated command line of the network devices with differences.
4. The method of claim 1, further comprising:
if the network equipment with the difference is obtained, sending alarm prompt information; and/or
Generating a process log for the differencing network device of the one or more network devices.
5. An apparatus for network device configuration error correction, the apparatus comprising:
the actual configuration grabbing module is used for grabbing a command line actually operated by each device in one or more network devices;
a standard configuration generation module to:
reading in equipment information of the network equipment;
acquiring a standard configuration template of the network equipment according to the equipment information of the network equipment;
acquiring dynamic configuration parameters of the network equipment according to the equipment information of the network equipment;
acquiring a manufacturer equipment command of the network equipment according to the equipment information of the network equipment; and
updating the dynamic configuration parameters and the factory equipment commands of the standard configuration template of the network equipment based on the dynamic configuration parameters and the factory equipment commands of the network equipment to obtain a standard configuration command line of the network equipment;
the central control and configuration comparison module is used for:
judging that the standard configuration command line and the actually operated command line are obtained completely;
if not, the acquisition is finished:
delaying acquisition of a predetermined time;
judging whether the time delay times exceed a threshold or not;
if the command line does not exceed the threshold, the standard configuration command line and the actually operated command line are continuously obtained;
if the threshold is exceeded, an error is reported abnormally;
if the obtaining is finished, comparing the standard configuration command line with the actually-operated command line respectively to obtain the network equipment with the configuration command line and the actually-operated command line different from each other in the one or more network equipment; and
a configuration error correction module for performing error correction on the actually-executed command line of the differencing network device using the standard configuration command line of the differencing network device, comprising:
issuing the standard configuration command line of the different network equipment to the different network equipment; or
And issuing the configuration command with the difference between the standard configuration command line and the actually operated command line of the network equipment with the difference to the network equipment with the difference.
6. The apparatus of claim 5, further comprising:
a standard configuration template file library for storing standard configuration templates of one or more network devices;
a dynamic configuration parameter file library for storing dynamic configuration parameters of one or more network devices; and
and the different manufacturer equipment command file library is used for storing manufacturer equipment commands of one or more network equipment.
7. The apparatus of claim 5, wherein the dynamic configuration parameters comprise:
an IP address of the network device, a BGP protocol of the network device, and/or an as sequence number of the network device.
8. The apparatus of claim 5, wherein the central control and configuration comparison module is further configured to count the differentiated network devices of the one or more network devices and generate a configuration list including the standard configuration command line of the differentiated network devices and the differentiated network devices of the actually-operating command line.
9. The apparatus of claim 5, further comprising:
the alarm module is used for sending alarm prompt information if the central control and configuration comparison module acquires the network equipment with the difference; and/or
A logging module to generate a process log for the differencing network device of the one or more network devices.
10. A machine-readable storage medium having stored thereon instructions for causing a machine to perform the network device configuration error correction method of any of claims 1-4.
11. A processor configured to execute a program, wherein the program is configured to execute the network device configuration error correction method according to any one of claims 1 to 4 when executed.
CN201910430429.7A 2019-05-22 2019-05-22 Standard configuration generating device and method and network equipment configuration error correcting device and method Active CN110300017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910430429.7A CN110300017B (en) 2019-05-22 2019-05-22 Standard configuration generating device and method and network equipment configuration error correcting device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910430429.7A CN110300017B (en) 2019-05-22 2019-05-22 Standard configuration generating device and method and network equipment configuration error correcting device and method

Publications (2)

Publication Number Publication Date
CN110300017A CN110300017A (en) 2019-10-01
CN110300017B true CN110300017B (en) 2022-07-01

Family

ID=68027021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910430429.7A Active CN110300017B (en) 2019-05-22 2019-05-22 Standard configuration generating device and method and network equipment configuration error correcting device and method

Country Status (1)

Country Link
CN (1) CN110300017B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111817905B (en) * 2020-09-07 2020-12-15 腾讯科技(深圳)有限公司 Network configuration method, related device and storage medium
CN112636968B (en) * 2020-12-18 2023-03-28 中国建设银行股份有限公司 Network scheme construction method, device, readable medium and equipment
CN113556250B (en) * 2021-07-21 2022-12-20 中国工商银行股份有限公司 Network equipment batch configuration method and device
CN113938378B (en) * 2021-09-17 2024-05-28 浪潮思科网络科技有限公司 Method, equipment and medium for checking network equipment configuration in cloud network environment
CN114860338B (en) * 2022-05-17 2024-09-17 西安北方华创微电子装备有限公司 Semiconductor device parameter configuration method and device
CN115174398A (en) * 2022-06-24 2022-10-11 浪潮卓数大数据产业发展有限公司 Network equipment configuration method, equipment and medium based on python interactive shell
CN115102850B (en) * 2022-06-28 2024-03-22 北京百度网讯科技有限公司 Configuration comparison method, device, electronic equipment and storage medium
CN115361290B (en) * 2022-07-01 2024-02-27 北京百度网讯科技有限公司 Configuration comparison method, device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8782182B2 (en) * 2007-05-24 2014-07-15 Foundry Networks, Llc Generating device-specific configurations
CN102752138A (en) * 2012-06-30 2012-10-24 华为技术有限公司 Asynchronous configuration management method and network device
CN108933691B (en) * 2017-05-26 2021-09-07 华为技术有限公司 Method for obtaining standard configuration template of network equipment and computing equipment
CN107911249B (en) * 2017-11-28 2021-05-28 新华三技术有限公司 Method, device and equipment for sending command line of network equipment
CN109412856B (en) * 2018-11-05 2022-06-03 深圳互联先锋科技有限公司 Network equipment brand non-difference management method and system

Also Published As

Publication number Publication date
CN110300017A (en) 2019-10-01

Similar Documents

Publication Publication Date Title
CN110300017B (en) Standard configuration generating device and method and network equipment configuration error correcting device and method
CN109873737B (en) Test method and device
CN111092865B (en) Security event analysis method and system
CN114500249B (en) Root cause positioning method and device
CN115378823B (en) Public cloud drop planning method and device, electronic equipment and storage medium
CN110956284A (en) Method, system, equipment and storage medium for maintaining reliability of product information
CN111078239B (en) Map data updating method and device
CN113867778B (en) Image file generation method and device, electronic equipment and storage medium
CN111694724A (en) Testing method and device of distributed table system, electronic equipment and storage medium
CN115525545A (en) Docker-based automatic testing method, system, equipment and medium
CN115174398A (en) Network equipment configuration method, equipment and medium based on python interactive shell
CN115080309A (en) Data backup system, method, storage medium, and electronic device
CN111633642B (en) Robot management method and device, electronic equipment and storage medium
CN114138774A (en) Data processing method and device, storage medium and electronic equipment
CN107797915B (en) Fault repairing method, device and system
CN110198249B (en) Power distribution automation system testing method and system
CN116016158B (en) Hybrid cloud aPaaS platform deployment method, device, equipment and computer storage medium
CN114610735A (en) Data consistency checking method, device, equipment and storage medium
CN115567396A (en) Switch configuration method, device and medium based on SDN network
CN116303065A (en) Firewall upgrading automatic test system, device and method and computer storage medium
CN114138646A (en) CAD (computer-aided design) resource verification method and device, storage medium and processor
CN117891483A (en) Device OTA upgrading method, device and storage medium
CN115794209A (en) Method and device for generating publishing scheme, computer equipment and readable storage medium
CN117492923A (en) Application online diagnosis method and system based on temporary container
CN114185555A (en) Server deployment method and device and electronic equipment

Legal Events

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