A method and device for inspecting equipment

By automatically generating configuration templates and using alarm information and periodic inspections, intelligent and automated discovery of cross-device link aggregation faults is realized, which solves the problem of high cost and untimely manual inspections in the existing technology, and improves troubleshooting. efficiency.

CN112637010BActive Publication Date: 2024-09-03WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011493127.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-17
Publication Date
2024-09-03
Estimated Expiration
2040-12-17

AI Technical Summary

Technical Problem

In the existing technology, the discovery and troubleshooting of cross-device link aggregation faults mainly rely on manual inspection, which results in high cost, untimely and lack of intelligent solutions.

Method used

Provide a device inspection method and device that intelligently checks port abnormalities of a switch combination by automatically generating configuration templates, and uses alarm information and periodic inspections to determine the port status of the switch combination, saving human and financial costs and improving troubleshooting efficiency. .

Benefits of technology

It realizes intelligent and automated discovery of cross-device link aggregation faults, significantly reduces manual inspection costs, improves the flexibility and efficiency of troubleshooting, and avoids abnormal devices that may be missed during manual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112637010B
    Figure CN112637010B
Patent Text Reader

Abstract

The present invention relates to the field of financial technology (Fintech), and discloses a device inspection method and apparatus, which determines the port abnormality of a switch combination that forms a cross-device link aggregation in a preset area; wherein the switch combination includes a main switch and a standby switch; obtains a first configuration template for the main switch and a second configuration template for the standby switch in the preset area; the first configuration template and the second configuration template are obtained based on a plurality of switch combinations with normal ports of the same model in the preset area; and checks the configuration data of the main switch and the configuration data of the standby switch based on the first configuration template and the second configuration template, respectively, to determine whether the configuration data is abnormal. Forming a configuration template by an automated method can greatly save manpower and financial costs, and can have more superior flexibility for troubleshooting, avoiding the possibility that some devices with abnormal ports may only be discovered during manual troubleshooting of the equipment by experts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of financial technology (Fintech), and in particular, to a method and apparatus for inspecting equipment. Background Art

[0002] With the development of computer technology, more and more technologies (such as big data or cloud computing) are applied in the financial field, and the traditional financial industry is gradually transforming into financial technology. In the context of big data technology, it is of great significance to ensure that the massive data generated can be accurately and reliably transmitted in the network.

[0003] The reliability of each component of the data center has always been the direction that stable operations are committed to improving. Among them, in order to increase the reliability of server port interconnection, the two physical ports of the server can be bundled and interconnected with the switch; at the same time, the two switches can be connected to the server through cross-device link aggregation. There are many common cross-device link aggregation methods, and different manufacturers provide different solutions. For example, some manufacturers use VPC (Virtual PortChannel, virtual link aggregation) implementation method, some manufacturers use M-LAG (Multichassis LinkAggregation Group, cross-device link aggregation group) implementation method, and some manufacturers use DRNI (Distributed Resilient Network Interconnect, distributed elastic network interconnection) implementation method. Other manufacturers are not listed one by one. Taking VPC technology as an example, this technology can provide Layer 2 multi-path selection, allowing users to increase network redundancy when there are multiple optional paths, while achieving increased bandwidth, enabling multiple parallel paths between multiple nodes, and load balancing traffic. In VPC technology, the server dual-port bundling and the networking architecture of two switches are as follows Figure 1 As shown, Figure 1 Switch 1 and switch 2 in the VPC domain form a VPC domain. At this time, switch 1 and switch 2 are VPC PEERs (members) of each other.

[0004] In the long-term operation of cross-device link aggregation, various factors may cause the aggregation link to fail, which means that only one port can be used normally, and thus the dual-port aggregation protection function cannot be achieved. If the faulty port is used as usual without repair, the risk of single-port failure on the server increases, affecting the stable operation of the business. When a single-side failure occurs on the cross-device link aggregation, in most cases the server side is usually not aware of it, and the fault needs to be discovered from the network side (i.e. the switch side).

[0005] At present, the fault detection and troubleshooting method for cross-device link aggregation on the network side mainly relies on manual inspection. However, there are usually many network devices in the existing network, and the cost of manual inspection is high; furthermore, the long inspection cycle easily leads to the problem of delayed detection of faulty equipment.

[0006] In summary, the discovery of faulty devices in cross-device link aggregation mainly relies on manual inspection, which is quite costly and not intelligent enough. Summary of the invention

[0007] The present application provides a device inspection method and apparatus for realizing intelligent and automatic discovery of faulty devices in cross-device link aggregation of a line network.

[0008] In a first aspect, an embodiment of the present application provides a method for inspecting a device, the method comprising: determining whether a port of a switch combination that forms a cross-device link aggregation in a preset area is abnormal; wherein the switch combination comprises a main switch and a standby switch; obtaining a first configuration template for the main switch and a second configuration template for the standby switch in the preset area; the first configuration template and the second configuration template are obtained based on a combination of multiple switches with normal ports of the same model in the preset area; and based on the first configuration template and the second configuration template, respectively inspecting the configuration data of the main switch and the configuration data of the standby switch to determine whether the configuration data is abnormal.

[0009] Based on this solution, for the port abnormality event of the switch combination that forms the cross-device link aggregation, the configuration data of the main switch and the standby switch in the switch combination are checked respectively, wherein, since the first configuration template and the second configuration template used for checking the configuration data of the main and standby switches are determined based on a plurality of switch combinations of the same model with normal ports located in the same area as the main and standby switches, in this method, the configuration template is formed by an automated method, so that for the port abnormality event of the switch combination that forms the cross-device link aggregation, the configuration data of the main and standby switches of the port abnormality event can be checked intelligently based on the formed configuration template. This method can greatly save manpower and financial costs, and can have more superior flexibility for troubleshooting, avoiding the situation in the background technology that some devices with port abnormalities may only be discovered during the manual troubleshooting of the equipment by experts.

[0010] In a possible implementation method, the first configuration template is obtained based on a combination of multiple switches with normal ports of the same model in the preset area, including: obtaining configuration data of each main switch in the combination of multiple switches; for any configuration module in the configuration data, determining each command line structure of the same category that meets the first set condition from the configuration data of each main switch; each command line structure of the same category has the same number of command line lines, and has the same line beginning keyword for the same line of command line; for each command line structure of the same category, by comparing any two command line structures, a sub-configuration template of the configuration module that meets the second set condition is obtained; the sub-configuration template is used to indicate the command line fixed parameters and command line variable parameters that each command line structure of the same category should have, the command line fixed parameters do not depend on the configuration object change, and the command line variable parameters depend on the configuration object change; the first configuration template is obtained according to the sub-configuration templates corresponding to each configuration module.

[0011] Based on this solution, for a preset area, there may be multiple models of switches for forming cross-device link aggregation. Therefore, before forming the first configuration template, the configuration data of each main switch located in the same preset area as the main switch and having normal ports for automatically forming the first configuration template can be determined according to the model of the main switch of the port abnormality event; since the configurations of each switch by the technicians are not completely consistent during the commissioning of the main switch, and the switch may include multiple configuration modules (different configuration modules are used to implement different functions), for any configuration module in the configuration modules of the switch, firstly, each command line structure of the same category that meets the first set condition is determined from the configuration data of each main switch, and then based on the command line structures of the same category, by comparing any two command line structures, the sub-configuration template of the main switch in the port abnormality event under the configuration module can be obtained, and then the sub-configuration templates corresponding to each configuration module are combined, so that the first configuration template for determining whether the configuration data of the main switch in the port abnormality event is abnormal can be obtained, and the second configuration template can be obtained in the same way. The method for determining the first configuration template and the second configuration template is fully automatically generated, so the configuration data of the switch of the port abnormal event in the preset area can be quickly checked, thereby improving the efficiency of determining abnormal devices in cross-device link aggregation.

[0012] In a possible implementation method, for each command line structure of the same category, by comparing any two command line structures, a sub-configuration template of the configuration module that meets the second set condition is obtained, including: sorting the command line structures of the same category; for any first command line structure among the command line structures, matching the first command line structure with any second command line structure that is sorted before the first command line structure, and taking the overlapping part between the first command line structure and the second command line structure as a sub-configuration template to be selected; and taking the sub-configuration template that meets the second set condition among the sub-configuration templates to be selected for each command line structure as the sub-configuration template.

[0013] Based on this scheme, when processing each command line structure of the same category that meets the first setting condition to obtain a sub-configuration template, these command line structures of the same category can be sorted, and then for any first command line structure after sorting, the first command structure can be matched with any second command line structure that is arranged in front of it, and the overlapping part of the two can be used as a sub-configuration template to be selected, and finally the sub-configuration template to be selected that meets the second setting condition among multiple sub-configuration templates to be selected is determined as the sub-configuration template. This method obtains the first configuration template by continuously comparing the command line structures of each main switch of the same model in the same preset area under the same configuration template. This method of automatically generating the first configuration template combines the actual situation of the main switch of the port abnormal event in its own environment and multiple main switches of the same model as itself to the greatest extent, so that when the first configuration template generated by the automatic method is used to check the configuration data of the main switch of the port abnormal event, it has better fit and improves the inspection efficiency of the equipment.

[0014] In a possible implementation method, the first setting condition is that the command line structure of the same category has the largest number for the same configuration module of each main switch; and the second setting condition is that the command line structure of the same category has the largest number among the sub-configuration templates to be selected.

[0015] Based on this solution, in the process of obtaining the first configuration template, the command line structure of the main switch of the same type with the largest number of command line structures belonging to the same category under the same configuration module of the switches of the same model in the preset area is used as the first setting condition, and the sub-configuration template to be selected with the largest overlap among the sub-configuration templates to be selected is used as the second setting condition. This is more in line with the configuration rules of the switches in the preset area by the technicians, so that when the first configuration template obtained in this way is used to check the configuration data of the main switch of the port abnormal event, the checking process of the main switch will also be more time-saving.

[0016] In a possible implementation method, the checking the configuration data of the main switch based on the first configuration template includes: determining whether the i-th row in the configuration data of the main switch and the i-th row in the first configuration template meet the same standard; the same standard is that the command line fixed parameters are the same and the command line variable parameters are different; determining whether the command line variable parameters in the configuration data of the main switch meet the configuration requirements; if each command line in the configuration data of the main switch meets the same standard and the command line variable parameters meet the configuration requirements, determining that the configuration of the configuration data of the main switch is normal.

[0017] Based on this solution, in the process of checking the configuration data of the main switch based on the first configuration template, by comparing the command line structure of the main switch with the same line of the first configuration template line by line, it is determined whether the two meet the same standard, and whether the command line change parameters in the configuration data meet the configuration requirements. Finally, when each command line of the main switch meets the same standard corresponding to each other, and the command line change parameters also meet the configuration requirements, it is determined that the configuration data of the main switch is normal. This method helps to accurately determine whether the main switch has a configuration abnormality during the configuration process by performing a comprehensive check on the configuration data of the main switch of the port abnormality event.

[0018] In a possible implementation method, determining that a port of a switch combination forming an inter-device link aggregation in a preset area is abnormal includes: determining address information of the main switch and address information of the standby switch based on alarm information sent by any switch in the switch combination; or determining address information of the main switch and address information of the standby switch from address information of a preset switch combination based on periodic inspection; and acquiring status information of each port between switches from the main switch and the standby switch respectively according to the address information of the main switch and the address information of the standby switch, thereby determining that a port of the switch combination is abnormal.

[0019] Based on this solution, on the one hand, the port status of the switch in the switch combination that sends alarm information in the cross-device link aggregation can be checked by alarm, so as to determine that there is a switch with abnormal port in the switch combination that sends alarm information. On the other hand, it also supports periodic inspection of the ports of the switches that form the switch combination of cross-device link aggregation in the preset area, so as to determine that the switch in the checked switch combination has a port abnormality. This method supports the determination of the switch in the preset area where the port abnormality event occurs from multiple angles, and improves the efficiency of determining abnormal devices.

[0020] In a possible implementation method, the alarm information is sent by the main switch in the switch combination; the determining the address information of the main switch and the address information of the standby switch based on the alarm information sent by any switch in the switch combination includes: receiving the alarm information sent by the main switch; the alarm information is sent when a first port of the main switch connected to the server in the cross-device link aggregation is disconnected, and the alarm information includes the address information of the main switch; based on the address information of the main switch, sending a port information acquisition command to the main switch; the port information acquisition command is used to acquire a second port of the main switch, and the second port is used to indicate that the main switch is connected to the standby switch through the second port to form a device link aggregation; and sending a peer device address information acquisition command to the second port to obtain the address information of the standby switch.

[0021] Based on this solution, if the received alarm information is sent by the main switch in the switch combination, a port information acquisition command can be sent to the main switch based on the address information of the main switch, so that it can be obtained through which port(s) (i.e., the second port) of the main switch is connected to the standby switch to form a device link aggregation, and finally the address information of the standby switch is obtained by sending a command to obtain the address information of the opposite device to the second port. This method can automatically obtain the address information of the switch combination that sends the alarm information based on the alarm information, and avoids the situation where the preset table storing the address information of the switch combination cannot be obtained in time when using a table lookup method to prepare to obtain the address information of the switch combination that sends the alarm information.

[0022] In a possible implementation method, an indicator collection instruction is sent to the main switch, the standby switch, and a server that forms a cross-device link aggregation with the main switch and the standby switch; the indicator collection instruction is used to obtain the sending status of data packets when the main switch and the server, and the standby switch and the server interact with each other; and according to the indicator result returned by the indicator collection instruction, it is determined whether an abnormality occurs in the main switch, the standby switch, and the server.

[0023] Based on this solution, after using the first configuration template and the second configuration template to check the configuration data of the main and standby switches respectively, regarding the inspection result of this step, whether it is determined that the configuration data is abnormal or that the configuration data is not abnormal, an indicator collection instruction can be sent to the main switch, the standby switch and the server that forms a cross-device link aggregation with the main switch and the standby switch to determine whether there is an abnormality in the data packet sending process between the three; wherein, if the indicator collection instruction is issued based on determining that the configuration data is abnormal, it means that the data packet sending situation between the three can continue to be checked to improve the inspection effect of this port abnormal event; if the indicator collection instruction is issued based on determining that the configuration data is normal, it means that this port abnormal event may also be due to an abnormality in the data packet sending process between the three, and therefore it is necessary to issue an indicator collection instruction to check the real cause behind this port abnormal event.

[0024] In a possible implementation method, if it is determined that no abnormality occurs in the main switch, the standby switch, and the server, a first protocol message between the main switch and the server and a second protocol message between the standby switch and the server are checked respectively, and a first check result and a second check result are obtained respectively; and according to the first check result and the second check result, it is determined whether an abnormality occurs in the main switch, the standby switch, and the server.

[0025] Based on this scheme, for the data returned by the indicator collection instruction, no matter it is determined that the data packet sending is abnormal or it is determined that there is no abnormality in the data packet sending, a protocol message inspection instruction can be sent to the main switch, the backup switch and the server to determine whether there is an abnormal device among the three; wherein, if the protocol message inspection instruction is based on the result returned by the indicator collection instruction indicating that there is an abnormal device among the three, then it means that the sending of the protocol messages between the three can continue to be checked to improve the inspection effect of the current port abnormal event; if the protocol message inspection instruction is issued based on the configuration data between the three and the data packet sending process without any abnormality, then it means that the current port abnormal event can only be that the protocol message between the three has an abnormality during the interaction process, and therefore it is necessary to issue a protocol message inspection instruction to check the real cause behind the current port abnormal event.

[0026] In a second aspect, the present application implements a device inspection apparatus, the apparatus comprising: an abnormality determination unit, used to determine that a port of a switch combination that forms a cross-device link aggregation in a preset area is abnormal; wherein the switch combination comprises a main switch and a standby switch; a configuration template determination unit, used to obtain a first configuration template for the main switch and a second configuration template for the standby switch in the preset area; the first configuration template and the second configuration template are obtained based on a plurality of switch combinations with normal ports of the same model in the preset area; an inspection unit, used to inspect the configuration data of the main switch and the configuration data of the standby switch respectively based on the first configuration template and the second configuration template, to determine whether the configuration data is abnormal.

[0027] In a possible implementation method, the configuration template determination unit is specifically used to: obtain configuration data of each main switch in the plurality of switch combinations; for any configuration module in the configuration data, determine each command line structure of the same category that meets the first setting condition from the configuration data of each main switch; the command line structures of the same category have the same number of command line lines, and have the same line beginning keyword for the same line of command line; for each command line structure of the same category, by comparing any two command line structures, obtain a sub-configuration template of the configuration module that meets the second setting condition; the sub-configuration template is used to indicate the command line fixed parameters and command line variable parameters that each command line structure of the same category should have, the command line fixed parameters do not depend on the configuration object change, and the command line variable parameters depend on the configuration object change; the first configuration template is obtained according to the sub-configuration templates corresponding to each configuration module.

[0028] In a possible implementation method, the configuration template determination unit is specifically used to: sort command line structures of the same category; for any first command line structure among the command line structures, match the first command line structure with any second command line structure sorted before the first command line structure, and use the overlapping part between the first command line structure and the second command line structure as a sub-configuration template to be selected; and use the sub-configuration template that meets the second set condition among the sub-configuration templates to be selected for each command line structure as the sub-configuration template.

[0029] In a possible implementation method, the first setting condition is that the command line structure of the same category has the largest number for the same configuration module of each main switch; and the second setting condition is that the command line structure of the same category has the largest number among the sub-configuration templates to be selected.

[0030] In a possible implementation method, the checking unit is specifically used to: determine whether the i-th line in the configuration data of the main switch and the i-th line in the first configuration template meet the same standard; the same standard is that the command line fixed parameters are the same and the command line variable parameters are different; determine whether the command line variable parameters in the configuration data of the main switch meet the configuration requirements; if each command line in the configuration data of the main switch meets the same standard and the command line variable parameters meet the configuration requirements, it is determined that the configuration of the configuration data of the main switch is normal.

[0031] In a possible implementation method, the abnormality determination unit is specifically configured to: determine the address information of the main switch and the address information of the standby switch based on the alarm information sent by any switch in the switch combination; or determine the address information of the main switch and the address information of the standby switch from the address information of the preset switch combination based on periodic inspection; and obtain the status information of each port between the switches from the main switch and the standby switch respectively according to the address information of the main switch and the address information of the standby switch, so as to determine that the port of the switch combination is abnormal.

[0032] In a possible implementation method, the alarm information is sent by the main switch in the switch combination; the abnormality determination unit is further used to: receive the alarm information sent by the main switch; the alarm information is sent when the first port of the main switch connected to the server in the cross-device link aggregation is disconnected, and the alarm information includes the address information of the main switch; based on the address information of the main switch, send a port information acquisition command to the main switch; the port information acquisition command is used to acquire the second port of the main switch, and the second port is used to indicate that the main switch is connected to the standby switch through the second port to form a device link aggregation; send a peer device address information acquisition command to the second port to obtain the address information of the standby switch.

[0033] In a possible implementation method, the abnormality determination unit is further used to: send an indicator collection instruction to the main switch, the standby switch, and a server that forms a cross-device link aggregation with the main switch and the standby switch; the indicator collection instruction is used to obtain the sending status of the data packet when the main switch and the server, and the standby switch and the server interact with each other; and determine whether an abnormality occurs in the main switch, the standby switch, and the server based on the indicator result returned by the indicator collection instruction.

[0034] In a possible implementation method, the abnormality determination unit is further used to: if it is determined that no abnormality occurs in the main switch, the standby switch and the server, respectively check the first protocol message between the main switch and the server and the second protocol message between the standby switch and the server, and obtain a first inspection result and a second inspection result respectively; and determine whether an abnormality occurs in the main switch, the standby switch and the server according to the first inspection result and the second inspection result.

[0035] In a third aspect, an embodiment of the present application provides a computing device, including:

[0036] A memory for storing program instructions;

[0037] The processor is used to call the program instructions stored in the memory and execute any implementation method of the first aspect according to the obtained program.

[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute any implementation method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0040] Figure 1 It is a cross-device link aggregation architecture in the prior art;

[0041] Figure 2 A system architecture provided for an embodiment of the present application;

[0042] Figure 3 A method for inspecting a device provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of a command line structure provided for an embodiment of the present application;

[0044] Figure 5 A schematic diagram of a configuration template framework provided in an embodiment of the present application;

[0045] Figure 6 A schematic diagram of determining a sub-configuration template provided in an embodiment of the present application;

[0046] Figure 7An inspection device for a device provided in an embodiment of the present application;

[0047] Figure 8 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0049] At present, the fault problems caused by cross-device link aggregation during operation are mainly solved by manual inspection, which is costly in manpower and financial resources and does not have the disadvantage of timely fault detection.

[0050] In view of the above technical problems, this application provides a possible system architecture, such as Figure 2 As shown, the system architecture includes an inspection server 210 and at least one cross-device link aggregation system 220 ( Figure 2 Only one cross-device link aggregation system is used in the figure), wherein each cross-device link aggregation system 220 includes a server 2201 and two switches, such as 2202 and 2203 respectively, the switch 2202 and the switch 2203 are called a switch combination, and one of them is a main switch and the other is a backup switch.

[0051] The inspection server 210 may be used to troubleshoot a plurality of cross-device link aggregation systems 220 in a preset area, including:

[0052] (1) When the connection port between the switch and the server in the cross-device link aggregation system 220 is disconnected, the switch with the disconnected port can report alarm information to the inspection server 210, so that the inspection server 210 can start to check the configuration data of the switch, the data packet transmission between the switch and the server, and the interaction of the service messages between the switch and the server in order to troubleshoot the fault cause behind the alarm information reported by the switch;

[0053] (2) The checking server 210 can periodically and actively check the port status of the master switch and the backup switch in each switch combination in the preset area based on the master and backup switch identification information of the cross-device link aggregation system stored locally, and find the switch with the port abnormality.

[0054] For any cross-device link aggregation system 220 in a preset area, wherein the switch 2202 and the switch 2203 are switches of the same model, and the switch 2202 and the switch 2203 are connected to a port on the server 2201 through one of their own ports, such as Figure 2 The port eth1 of switch 2202 is connected to the port eth1 of server 2201, and the port eth1 of switch 2203 is connected to the port eth0 of server 2201. At the same time, switches 2202 and 2203 are also connected to each other through ports, such as Figure 2 The port eth2 of the switch 2202 is connected to the port eth2 of the switch 2203, and the port eth3 of the switch 2202 is connected to the port eth3 of the switch 2203. Through this connection method, an inter-device link aggregation system is formed.

[0055] As in the system architecture of the present application, the cross-device link aggregation system refers to the VPC technology. A preset area is set as a designated computer room, in which there are multiple types of switch combinations and servers to form a cross-device link aggregation system. Among them, when the cross-device link aggregation system starts to be built in the computer room, the identification of the main and backup switches and the identification of the server in any group of cross-device link aggregation systems have been recorded one by one, and the corresponding relationship between these devices is stored by the inspection server 210.

[0056] Based on the above technical problems and system architecture, the present application embodiment provides a device inspection method, such as Figure 3 As shown, this method is Figure 2 The check server execution shown includes the following steps:

[0057] Step 301: Determine whether a port of a switch combination forming an inter-device link aggregation in a preset area is abnormal.

[0058] In this step, for a preset area, there are multiple switch combinations that form cross-device link aggregation, each of which includes a main switch and a standby switch, and the main switch and the standby switch are switches of the same model. If it is determined that there are abnormal ports in the main switch and the standby switch in the switch combination that forms cross-device link aggregation, it is determined that the configuration data of the main switch in the combination and the configuration data of the standby switch in the combination need to be checked respectively.

[0059] Step 302: Obtain a first configuration template for the master switch and a second configuration template for the standby switch in the preset area.

[0060] In this step, since in a preset area, technicians can use multiple models of switches in the process of initially building a cross-device link aggregation system, so there will be multiple models of cross-device link aggregation systems in the preset area. Since the configuration data differences between switches of different models may be large, in the embodiment of the present application, in the process of checking the configuration data of the main and standby switches in the switch combination with abnormal ports, the configuration template used is obtained based on the switch combination with multiple ports of the same model as the main and standby switches of the combination. Among them, for a cross-device link aggregation system, the configuration data of the main switch and the configuration data of the standby switch may also be different. Therefore, in the process of obtaining the configuration template, the present application can generate a first configuration template for the main switch in the cross-device link aggregation with abnormal ports, and can generate a second configuration template for the standby switch in the cross-device link aggregation with abnormal ports, wherein the first configuration template can be obtained based on the configuration data of multiple main switches in the switch combination with multiple ports of the same model as the main switch, and the second configuration template can be obtained based on the configuration data of multiple standby switches in the switch combination with multiple ports of the same model as the standby switch.

[0061] Step 303: Check the configuration data of the master switch and the configuration data of the standby switch based on the first configuration template and the second configuration template to determine whether the configuration data is abnormal.

[0062] In this step, the configuration data of the master switch in the cross-device link aggregation system with abnormal ports is checked based on the first configuration template formed, and the configuration data of the standby switch in the cross-device link aggregation system with abnormal ports is checked based on the second configuration template formed to determine whether there are abnormalities in the configuration data of the master and standby switches in the cross-device link aggregation.

[0063] Based on this solution, for the port abnormality event of the switch combination that forms the cross-device link aggregation, the configuration data of the main switch and the standby switch in the switch combination are checked respectively, wherein, since the first configuration template and the second configuration template used for checking the configuration data of the main and standby switches are determined based on a plurality of switch combinations of the same model with normal ports located in the same area as the main and standby switches, in this method, the configuration template is formed by an automated method, so that for the port abnormality event of the switch combination that forms the cross-device link aggregation, the configuration data of the main and standby switches of the port abnormality event can be checked intelligently based on the formed configuration template. This method can greatly save manpower and financial costs, and can have more superior flexibility for troubleshooting, avoiding the situation in the background technology that some devices with port abnormalities may only be discovered during the manual troubleshooting of the equipment by experts.

[0064] The following will explain some steps in detail with examples.

[0065] In an implementation of the above step 301, the determining that a port of a switch combination forming an inter-device link aggregation in a preset area is abnormal includes: determining address information of the main switch and address information of the standby switch based on alarm information sent by any switch in the switch combination; or determining address information of the main switch and address information of the standby switch from address information of a preset switch combination based on periodic inspection; and acquiring status information of each port between switches from the main switch and the standby switch respectively according to the address information of the main switch and the address information of the standby switch, thereby determining that a port of the switch combination is abnormal.

[0066] For a preset area, any switch forming cross-device link aggregation in the preset area may send alarm information to the inspection server. After the inspection server receives the alarm information, the inspection server determines the address information of the master switch and the address information of the standby switch of the combination, and then obtains the status information of each port of the switch from the corresponding master and standby switches according to the determined address information of the master and standby switches, and determines the port abnormality of the switch combination according to the status information of each port; the inspection server may also periodically and actively obtain the status information of each port of the master and standby switches of each switch combination in the preset area based on the identification information of the master and standby switches of the switch combination forming cross-device link aggregation stored locally, and determine the switch combination with abnormal ports based on the obtained status information of each port.

[0067] In this method, on the one hand, the switch can send out an alarm message, and the inspection server that receives the alarm message can determine that an abnormality has occurred in the port of the switch combination in the cross-device link aggregation system, which can meet the real-time inspection of the master and backup switches of the cross-device link aggregation that sends out the alarm message based on the alarm message; on the other hand, by periodically checking the port information of any master and backup switches that form the cross-device link aggregation in the preset area, this can achieve a comprehensive inspection of the master and backup switches of any combination of cross-device link aggregation in the preset area, and can also enhance the timely discovery of the master and backup switches of the cross-device link aggregation that fail to send out the alarm information as expected.

[0068] In some embodiments of the present application, the alarm information is sent by the main switch in the switch combination; the determining the address information of the main switch and the address information of the standby switch based on the alarm information sent by any switch in the switch combination includes: receiving the alarm information sent by the main switch; the alarm information is sent when a first port of the main switch connected to the server in the cross-device link aggregation is disconnected, and the alarm information includes the address information of the main switch; based on the address information of the main switch, sending a port information acquisition command to the main switch; the port information acquisition command is used to acquire a second port of the main switch, and the second port is used to indicate that the main switch is connected to the standby switch through the second port to form a device link aggregation; and sending a peer device address information acquisition command to the second port to obtain the address information of the standby switch.

[0069] In the process of the inspection server acquiring the addresses of the main and backup switches in the cross-device link aggregation that sends the alarm information based on the alarm information, the alarm information may be sent by the main switch when the connection port between the main switch and the server in the cross-device link aggregation is disconnected, the alarm information may be sent by the backup switch when the connection port between the backup switch and the server in the cross-device link aggregation is disconnected, and the alarm information may also be sent by the main and backup switches to the inspection server at the same time because the connection port between the main switch and the server in the cross-device link aggregation and the connection port between the backup switch and the server in the cross-device link aggregation are disconnected at the same time, and this application does not limit this. In an embodiment of the present application, it is assumed that the alarm information is sent by the main switch to the inspection server when the connection port between the main switch and the server in the cross-device link aggregation is disconnected, and the alarm information includes the address information of the main switch. In order to automatically obtain the address information of the standby switch that forms a device link aggregation with the main switch without obtaining the address information of the standby switch by looking up a table, the inspection server in the embodiment of the present application can send a port information acquisition command to the main switch according to the address information of the main switch, so as to obtain which ports of the main switch form a device link aggregation with the standby switch. Then, the inspection server can send a command to obtain the address information of the opposite device according to the obtained port of the main switch, so that the inspection server can obtain the address information of the standby switch.

[0070] For example, in a computer room, there are 200 switches of model A and 400 switches of model B. In order to avoid duplication of numbers, the 200 switches of model A are numbered 1, 2, 3...199, 200, and the 400 switches of model B are numbered 201, 202, 203...599, 600. Among them, combining two switches of the same model with a server can form a cross-device link aggregation system. For example: for model A switches, switches No. 1 and 2 form a cross-device link aggregation with server No. 1, and switches No. 3 and 4 form a cross-device link aggregation with server No. 2... In this way, 200 switches of model A can form 100 cross-device link aggregation systems; and, for model B switches, switches No. 201 and 202 form a cross-device link aggregation with server No. 101, and switches No. 203 and 204 form a cross-device link aggregation with server No. 102... In this way, 400 switches of model B can form 200 cross-device link aggregation systems. In addition, the specific master and backup switches and the specific server in any cross-device link aggregation system can be pre-set. For example, in this application, the odd-numbered switches are defined as the main switches, and the even-numbered switches are defined as the backup switches. Then, the specific information of each of the 300 cross-device link aggregation systems in this computer room is stored one by one in the inspection server.

[0071] Then, on the one hand, the inspection server can periodically obtain the status information of the master and backup switches in the 300 cross-device link aggregation systems one by one through the local configuration collection module based on the specific information about the cross-device link aggregation system in the computer room stored locally, including collecting LLDP (Link Layer Discovery Protocol) information, VPC status, VPC PEER Link information, port-channel (link aggregation) status and configuration data of each switch in each switch combination.

[0072] On the other hand, when the connection port between the switch in the computer room and the server is disconnected, the switch can actively send out an alarm message, so the inspection server can also receive the alarm message through the local alarm module, so that the inspection server can send port information acquisition commands (such as VPC PEERLink commands) and peer device address information acquisition commands (such as LLDP commands) to the switch that sends the alarm message in sequence, and finally obtain the address information of another switch that forms a device link aggregation with the switch. Of course, the inspection server can also obtain the address information of another switch based on the specific information of each cross-device link aggregation system in the computer room stored locally, and this application does not make specific limitations. After the inspection server obtains the address information of the switch combination that sends the alarm information, the status information of the main switch and the backup switch in the switch combination can be obtained through the local configuration collection module, including the collection of LLDP information, VPC status, VPC PEER Link information, port-channel status, configuration data and other information of the switch.

[0073] Then, the inspection server can call the local status inspection module, and the status inspection module will check the status information of the master and standby switches of any combination. Among them, the status inspection module will go through the collected configurations one by one to find the corresponding VPC PEER devices and extract the relevant status bit information. According to the collected LLDP information, the VPC PEER is automatically combined into a device group, such as device A and device B in Table 1 below, which are a device group. The devices that cannot find the device group will be included in the abnormal device list. By matching the key fields of the device group, the status of the physical port and the logical port are judged to form a VPC status information table, as shown in Table 1 below. By judging the status of each port in the VPC status information table of the device, it can be known whether the situation of a group of VPCs is normal. As long as one interface in the port status table of the following port eth1 is UP but not all are UP, the VPC status is judged to be abnormal, and the judgment logic of other ports is the same. The status inspection module returns a dictionary set. The dictionary has two key values: "normal device group" and "abnormal device group". Each key value corresponds to a list of dictionaries containing VPC PEER group address pairs. The dictionary corresponding to the key value also has a key value. In addition to the abnormal port list, the key value also stores the VPC active and standby status identifier, as shown in Table 2. After the status check module completes the check of all devices, it returns the abnormal port list of the corresponding device group to the configuration verification module, where there can be multiple abnormal port lists under each device combination.

[0074] Table 1 VPC status information table

[0075]

[0076]

[0077] Table 2 VPC status active / standby information table

[0078]

[0079] In an implementation of step 302, the first configuration template is obtained according to a combination of multiple switches with normal ports of the same model in the preset area, including: obtaining configuration data of each main switch in the combination of multiple switches; for any configuration module in the configuration data, determining each command line structure of the same category that meets the first set condition from the configuration data of each main switch; each command line structure of the same category has the same number of command line lines, and has the same line beginning keyword for the same line of command line; for each command line structure of the same category, by comparing any two command line structures, obtaining a sub-configuration template of the configuration module that meets the second set condition; the sub-configuration template is used to indicate the command line fixed parameters and command line variable parameters that each command line structure of the same category should have, the command line fixed parameters do not depend on the configuration object change, and the command line variable parameters depend on the configuration object change; the first configuration template is obtained according to the sub-configuration templates corresponding to each configuration module.

[0080] For example, suppose that at the current moment, the inspection server receives an alarm message, which is sent by switch No. 1 of model A in the computer room, and switch No. 1 is the main switch in the cross-device link aggregation system in which it is located. At this time, the inspection server can obtain the status data of the main switch from the local database of each main switch based on the identification of each main switch of model A in the computer room that forms the cross-device link aggregation stored locally, and determine the switch with normal ports from it, and then process the configuration data of the switches of model A with normal ports according to the configuration data of each of the main switches with normal ports. The processing process may include:

[0081] Since the technicians may initially configure multiple different objects when configuring the main switch, that is, the configuration data of the main switch may include multiple configuration modules. Then, for any configuration module, determine whether the command line structures of the A-type main switches with normal ports under the configuration module belong to the same category of command line structures; if they can be divided into multiple categories of command line structures, then for each category of command line structures, how many main switches can be included under the command line structure of the category, that is, determine how many A-type main switches with normal ports belong to the same category of command line structures, and then take multiple command line structures of a certain category that meet the first preset condition as research objects, and compare these multiple command line structures of the same category in pairs, so as to obtain the sub-configuration template of each configuration module that meets the second setting condition; finally, splice the multiple sub-configuration templates to obtain the first configuration template used to determine whether the main switch that sends the alarm information is abnormal.

[0082] The same category of command line structures refers to any two command line structures with the same number of command line lines for the same configuration module, and the command lines on the same line have the same keywords at the beginning of the two lines. Figure 4 The command line structure diagram provided in the embodiment of the present application is shown in FIG. Figure 4 , the command lines in the first column (counting from left to right), the second column, and the third column in the figure are all command lines generated when configuring the same configuration module; among them, the "command line structure 1" in the first column and the "command line structure 2" in the second column are command line structures of the same category, because both have 6 lines of command lines, and for the command lines of the same line, the first keywords of the two are the same; in contrast, the "command line structure 3" in the third column is a command line structure that does not belong to the same category as the "command line structure 1" and / or "command line structure 2" because their command line lines are different.

[0083] Among them, the fixed parameters of the command line do not depend on the configuration object changes, and the variable parameters of the command line depend on the configuration object changes. Figure 5 , is a schematic diagram of a configuration template framework provided in an embodiment of the present application, wherein: Figure 5 The configuration template framework in is based on Figure 4 The three command line structures shown in the figure are determined by Figure 5 The "Configuration Template Framework 1" in the first column (counting from left to right) and the "Configuration Template Framework 2" in the second column are based on Figure 4The "command line structure 1" in the first column and the "command line structure 2" in the second column are determined, wherein, by comparing the "command line structure 1" and the "command line structure 2", it is determined that fields such as "peer-keepalive" and "destination" at the same position of the two do not differ depending on the fact that the two are different switches, and therefore these fields are used to represent command line fixed parameters; in contrast, by comparing the "command line structure 1" and the "command line structure 2", it is determined that fields such as "1.1.1.1" and "2.2.2.1" at the same position of the two differ depending on the fact that the two are different switches, and therefore the positions of these fields are represented by horizontal lines, and the horizontal lines are used to represent command line variable parameters.

[0084] Based on the same principle, a second configuration template can be determined, and the second configuration template is used to check the configuration data of the standby switch that forms the cross-device link aggregation with the main switch that sends the alarm information.

[0085] In certain embodiments of the present application, for each command line structure of the same category, obtaining a sub-configuration template of the configuration module under a second set condition by comparing any two command line structures includes: sorting the command line structures of the same category; for any first command line structure among the command line structures, matching the first command line structure with any second command line structure sorted before the first command line structure, and taking the overlapping part between the first command line structure and the second command line structure as a sub-configuration template to be selected; and taking the sub-configuration template that meets the second set condition among the sub-configuration templates to be selected for each command line structure as the sub-configuration template.

[0086] In some embodiments of the present application, the first setting condition is the largest number of command line structures belonging to the same category for the same configuration module of each host switch; the second setting condition is the largest number of sub-configuration templates to be selected.

[0087] For example, the aforementioned switch No. 1 of model A (main switch) sends an alarm message to the inspection server, so that the inspection server obtains the status data of switches No. 3, 5...199 of model A, which are main switches in the computer room where switch No. 1 is located, and determines that the ports of these 99 main switches of model A are all normal. In this way, the inspection server can process the configuration data of these 99 main switches of model A, such as determining how many categories of command line structures exist under any configuration module, and determining multiple command line structures of a category with the largest number of main switches as research objects, and sorting the multiple command line structures of this category in sequence.

[0088] like Figure 6FIG. 1 is a schematic diagram of determining a sub-configuration template provided in an embodiment of the present application. Figure 6 , assume that the "command line structure A1" in the first column (counting from left to right), the "command line structure A2" in the second column, and the "command line structure A3" in the third column are respectively the command line structures of the same category with the largest number of master switches determined under a certain configuration module for the above-mentioned 99 A-model master switches with normal ports, and have been sorted. In this way, define the "configuration template framework A11" in the first column as the "command line structure A1" itself in the first column; compare the "command line structure A2" in the second column with the "command line structure A1" in the first column to obtain the overlapping part of the two, and record it as "configuration template framework A21"; compare the "command line structure A3" in the third column with the "command line structure A1" in the first column to obtain the overlapping part of the two, and record it as "configuration template framework A31", and compare the "command line structure A3" in the third column with the "command line structure A2" in the second column to obtain the overlapping part of the two, and record it as "configuration template framework A32", where configuration template frameworks A11, A21, A31 and A32 can all be called sub-configuration templates to be selected. Next, for the configuration template framework in each column, deduplication is performed within the domain. For example, for the "configuration template framework A11" in the first column, by comparing the "configuration template framework A11" with itself, A11 is obtained after deduplication; for the "configuration template framework A21" in the second column, by comparing the "configuration template framework A21" with itself, A21 is obtained after deduplication; for the "configuration template framework A31" and "configuration template framework A32" in the third column, since the two are inconsistent, they are deduplicated to obtain themselves, namely A31 and A32. Finally, the configuration template frames A11, A21, A31 and A32 obtained after deduplication within the domain are deduplicated between domains, that is, A21 is compared with A11, A31 is compared with A11, A32 is compared with A11, A31 is compared with A21, A32 is compared with A21, and it is determined that only A21 and A32 are the same (overlap), then the configuration template frame A32 is deleted and the overlap number of A21 is recorded as 2. If A11\A31 and other configuration template frames do not overlap, the overlap number is recorded as 1. Finally, the configuration template frame A32 with the highest overlap number (here 2) is used as the sub-configuration template.

[0089] Based on the above method, the sub-configuration templates of the main switch under each configuration module can be determined, and then the sub-configuration templates are spliced ​​to obtain the first configuration template for checking the configuration data of the main switch that sends the alarm information.

[0090] In an implementation of the above step 303, the checking the configuration data of the main switch based on the first configuration template includes: determining whether the i-th row in the configuration data of the main switch and the i-th row in the first configuration template meet the same standard; the same standard is that the command line fixed parameters are the same and the command line variable parameters are different; determining whether the command line variable parameters in the configuration data of the main switch meet the configuration requirements; if each command line in the configuration data of the main switch meets the same standard and the command line variable parameters meet the configuration requirements, then determining that the configuration of the configuration data of the main switch is normal.

[0091] For example, in the process of using the first configuration template to check the configuration data of the main switch that sends the alarm information, the command line of the main switch can be checked line by line according to the command line corresponding to the first configuration template. Regarding the command line of the same line, it is determined whether the fixed parameters of the command line of the main switch are consistent with the fixed parameters of the command line of the first configuration template, and only the command line change parameters of the main switch are different from the first configuration template; if so, it is further determined whether the command line change parameters in the line meet the configuration requirements. For example, if the command line change parameters should be configured as IP addresses, the command line change parameters should be expressed in the format of xx.xx.xx.xx, rather than the format of xx.xx.xx. Finally, if and only if the fixed parameters of the command line of each line of the main switch are the same as the first configuration template, and the command line change parameters meet the configuration requirements, it is indicated that the configuration data of the main switch is normal.

[0092] In one implementation of step 203, an indicator collection instruction is sent to the main switch, the standby switch, and a server that forms a cross-device link aggregation with the main switch and the standby switch; the indicator collection instruction is used to obtain a sending status of a data packet when data is exchanged between the main switch and the server, and between the standby switch and the server; and whether an abnormality occurs in the main switch, the standby switch, and the server is determined based on the indicator result returned by the indicator collection instruction.

[0093] For example, for the alarm information sent by the main switch this time, after the inspection server checks the configuration data of the main and standby switches, whether or not it is determined that there is a switch with abnormal configuration data, the inspection server can call the local negotiation and verification module to check the data packet sending status during the data exchange between the main switch and the server, and the data packet sending status during the data exchange between the standby switch and the server, to determine whether there is an abnormal device among the three devices. Among them, if the inspection server continues to call the negotiation and verification module when it is determined that the configuration data of the switch is abnormal, it means that the inspection server is to further determine whether there is any abnormal data packet sending in addition to the abnormal configuration data, so as to improve the effect of determining the abnormal device; if the inspection server continues to call the negotiation and verification module when it is determined that there is no abnormal configuration data, it means that the inspection server is to confirm whether the cause of this alarm information is the abnormality of the data packet during the sending process.

[0094] Among them, the negotiation verification module is used to determine the problems in the interaction during the VPC protocol negotiation process. It is often used in scenarios where the configuration is correct but the VPC cannot be connected. This module is used to check the interface unicast and multicast message interaction and the VPC negotiation message sending and receiving to determine the message interaction process. The negotiation verification module sends and collects information to the device multiple times within a certain period of time to obtain the incremental relationship between the sent and received messages. It can be determined whether it is a module failure of the local device or a failure of the opposite device. Specifically, taking the unicast message interaction as an example, when the unicast message of the local port has been increasing in the outbound direction but not in the inbound direction, it means that the opposite device has failed to identify the local device message or correctly process the local device message. At this time, it can be determined that the opposite device has a failure and caused the link aggregation abnormality.

[0095] In certain embodiments of the present application, if it is determined that no abnormality occurs in the main switch, the standby switch, and the server, a first protocol message between the main switch and the server and a second protocol message between the standby switch and the server are checked respectively, and a first check result and a second check result are obtained respectively; based on the first check result and the second check result, it is determined whether an abnormality occurs in the main switch, the standby switch, and the server.

[0096] For example, for the alarm information sent by the main switch this time, after the inspection server checks the data transmission status during the data interaction between the main switch and the server, and between the standby switch and the server, regardless of whether there is an abnormal device, the inspection server can call the local packet capture and verification module to check the first protocol message between the main switch and the server, and the second protocol message between the standby switch and the server, and determine whether there is an abnormal device among the three according to the inspection results. Among them, if the inspection server calls the packet capture and verification module after determining that the configuration data is abnormal and / or the data packet sending process is abnormal, it means that the inspection server is further determining whether there are still abnormal situations in the protocol message, which can improve the effect of determining the abnormal device; if the inspection server calls the packet capture and verification module after determining that the configuration data of the switch is normal and there is no abnormality in the data packet sending process, it means that the inspection server is to confirm which protocol message is abnormal because of the cause of this alarm.

[0097] Among them, the packet capture and verification module is used to judge the correctness of the content of message interaction in complex fault scenarios. This module obtains the content of message interaction by issuing device interface packet capture commands. By parsing the VPC protocol, a deeper level of problem verification can be achieved.

[0098] Based on the same concept, the present application embodiment provides a device for inspecting equipment, such as Figure 7 As shown, the device comprises:

[0099] The abnormality determination unit 701 is used to determine that a port of a switch combination forming a cross-device link aggregation in a preset area is abnormal; wherein the switch combination includes a main switch and a standby switch;

[0100] The configuration template determining unit 702 is used to obtain a first configuration template for the master switch and a second configuration template for the standby switch in the preset area; the first configuration template and the second configuration template are obtained according to a combination of multiple switches with normal ports of the same model in the preset area;

[0101] The checking unit 703 is configured to check the configuration data of the master switch and the configuration data of the standby switch based on the first configuration template and the second configuration template to determine whether the configuration data is abnormal.

[0102] Further, for the device, the configuration template determining unit 702 is specifically used to: obtain configuration data of each main switch in the plurality of switch combinations; for any configuration module in the configuration data, determine each command line structure of the same category that meets the first setting condition from the configuration data of each main switch; each command line structure of the same category has the same number of command line lines, and has the same line beginning keyword for the same line of command line; for each command line structure of the same category, by comparing any two command line structures, obtain a sub-configuration template of the configuration module that meets the second setting condition; the sub-configuration template is used to indicate the command line fixed parameters and command line variable parameters that each command line structure of the same category should have, the command line fixed parameters do not depend on the configuration object change, and the command line variable parameters depend on the configuration object change; the first configuration template is obtained according to the sub-configuration templates corresponding to each configuration module.

[0103] Further, for the device, the configuration template determination unit 702 is specifically used to: sort the command line structures of the same category; for any first command line structure among the command line structures, match the first command line structure with any second command line structure sorted before the first command line structure, and use the overlapping part between the first command line structure and the second command line structure as a to-be-selected sub-configuration template; and use the to-be-selected sub-configuration template that meets the second set condition among the to-be-selected sub-configuration templates of each command line structure as the sub-configuration template.

[0104] Further, for the device, the first setting condition is the largest number of command line structures belonging to the same category for the same configuration module of each main switch; the second setting condition is the largest number of sub-configuration templates to be selected.

[0105] Further, for the device, the checking unit 703 is specifically used to: determine whether the i-th line in the configuration data of the main switch and the i-th line in the first configuration template meet the same standard; the same standard is that the command line fixed parameters are the same and the command line variable parameters are different; determine whether the command line variable parameters in the configuration data of the main switch meet the configuration requirements; if each command line in the configuration data of the main switch meets the same standard and the command line variable parameters meet the configuration requirements, it is determined that the configuration of the configuration data of the main switch is normal.

[0106] Further, for the device, the abnormality determination unit 701 is specifically used to: determine the address information of the main switch and the address information of the standby switch based on the alarm information sent by any switch in the switch combination; or determine the address information of the main switch and the address information of the standby switch from the address information of the preset switch combination based on periodic inspection; according to the address information of the main switch and the address information of the standby switch, respectively obtain the status information of each port between the switches from the main switch and the standby switch to determine that the port of the switch combination is abnormal.

[0107] Further, for the device, the alarm information is sent by the main switch in the switch combination; the abnormality determination unit 701 is also used to: receive the alarm information sent by the main switch; the alarm information is sent when the first port of the main switch connected to the server in the cross-device link aggregation is disconnected, and the alarm information includes the address information of the main switch; based on the address information of the main switch, send a port information acquisition command to the main switch; the port information acquisition command is used to obtain the second port of the main switch, and the second port is used to indicate that the main switch is connected to the standby switch through the second port to form a device link aggregation; send a peer device address information acquisition command to the second port to obtain the address information of the standby switch.

[0108] Further, for the device, the abnormality determination unit 701 is also used to: send an indicator collection instruction to the main switch, the standby switch, and the server that forms a cross-device link aggregation with the main switch and the standby switch; the indicator collection instruction is used to obtain the sending status of the data packet when the main switch and the server, and the standby switch and the server interact with each other; determine whether the main switch, the standby switch and the server are abnormal according to the indicator result returned by the indicator collection instruction.

[0109] Further, for the device, the abnormality determination unit 701 is also used to: if it is determined that no abnormality occurs in the main switch, the standby switch and the server, then the first protocol message between the main switch and the server and the second protocol message between the standby switch and the server are checked respectively, and a first inspection result and a second inspection result are obtained respectively; according to the first inspection result and the second inspection result, determine whether an abnormality occurs in the main switch, the standby switch and the server.

[0110] The embodiment of the present application also provides a computing device, which may be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), etc. The computing device may include a central processing unit (CPU), a memory, an input / output device, etc. The input device may include a keyboard, a mouse, a touch screen, etc. The output device may include a display device, such as a liquid crystal display (LCD), a cathode ray tube (CRT), etc.

[0111] The memory may include a read-only memory (ROM) and a random access memory (RAM), and provides the processor with program instructions and data stored in the memory. In an embodiment of the present application, the memory may be used to store program instructions of the inspection method of the device;

[0112] The processor is used to call the program instructions stored in the memory and execute the device inspection method according to the obtained program.

[0113] like Figure 8 FIG. 1 is a schematic diagram of a computing device provided in an embodiment of the present application, wherein the computing device includes:

[0114] Processor 801, memory 802, transceiver 803, bus interface 804; wherein the processor 801, memory 802 and transceiver 803 are connected via bus 805;

[0115] The processor 801 is used to read the program in the memory 802 and execute the inspection of the above-mentioned device.

[0116] The processor 801 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP. It may also be 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 generic array logic (GAL), or any combination thereof.

[0117] The memory 802 is used to store one or more executable programs and can store data used by the processor 801 when performing operations.

[0118] Specifically, the program may include program code, and the program code includes computer operation instructions. The memory 802 may include volatile memory, such as random-access memory (RAM); the memory 802 may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 802 may also include a combination of the above-mentioned types of memory.

[0119] The memory 802 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof:

[0120] Operation instructions: include various operation instructions, used to implement various operations.

[0121] Operating system: includes various system programs used to implement various basic businesses and handle hardware-based tasks.

[0122] The bus 805 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0123] The bus interface 804 may be a wired communication access port, a wireless bus interface or a combination thereof, wherein the wired bus interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface or a combination thereof. The wireless bus interface may be a WLAN interface.

[0124] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the device inspection method.

[0125] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0126] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0127] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0129] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0130] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for inspecting equipment, characterized in that: include: Determine that a port of a switch combination forming a cross-device link aggregation in a preset area is abnormal; wherein the switch combination includes a main switch and a standby switch; Acquire a first configuration template for the master switch and a second configuration template for the standby switch in the preset area; the first configuration template and the second configuration template are obtained by combining multiple switches with the same model and normal ports in the preset area; Based on the first configuration template and the second configuration template, respectively, the configuration data of the master switch and the configuration data of the standby switch are checked to determine whether the configuration data is abnormal; The first configuration template is obtained by combining multiple switches with the same model and normal ports in the preset area, and includes: Acquire configuration data of each master switch in the plurality of switch combinations; For any configuration module in the configuration data, determine command line structures of the same category that meet the first setting condition from the configuration data of each master switch; the command line structures of the same category have the same number of command line lines, and the same command line has the same line beginning keyword; For each command line structure of the same category, by comparing any two command line structures, a sub-configuration template of the configuration module that meets the second setting condition is obtained; the sub-configuration template is used to indicate command line fixed parameters and command line variable parameters that each command line structure of the same category should have, the command line fixed parameters do not depend on the configuration object change, and the command line variable parameters depend on the configuration object change; The first configuration template is obtained according to the sub-configuration templates corresponding to the configuration modules.

2. The method according to claim 1, characterized in that For each command line structure of the same category, by comparing any two command line structures, obtaining a sub-configuration template of the configuration module under the second setting condition includes: Sort the command line structures of the same category; For any first command line structure among the command line structures, matching the first command line structure with any second command line structure that is arranged before the first command line structure, and taking an overlapping portion between the first command line structure and the second command line structure as a sub-configuration template to be selected; The sub-configuration template to be selected among the sub-configuration templates to be selected of each command line structure that meets the second setting condition is used as the sub-configuration template.

3. The method according to claim 1, characterized in that The first setting condition is that the number of command line structures belonging to the same category is the largest for the same configuration module of each main switch; The second setting condition is the largest number among the sub-configuration templates to be selected.

4. The method according to claim 1, characterized in that The checking the configuration data of the master switch based on the first configuration template includes: Determine whether the i-th line in the configuration data of the master switch and the i-th line in the first configuration template meet the same standard; the same standard is that the command line fixed parameters are the same and the command line variable parameters are different; Determining whether command line change parameters in the configuration data of the master switch meet configuration requirements; If each command line in the configuration data of the main switch meets the same standard and the command line change parameter meets the configuration requirement, it is determined that the configuration of the configuration data of the main switch is normal.

5. The method according to claim 1, characterized in that The determining that a port of a switch combination forming a cross-device link aggregation in a preset area is abnormal includes: Based on the alarm information sent by any switch in the switch combination, determine the address information of the main switch and the address information of the standby switch; or based on periodic inspection, determine the address information of the main switch and the address information of the standby switch from the address information of the preset switch combination; According to the address information of the main switch and the address information of the standby switch, the status information of each port between switches is obtained from the main switch and the standby switch respectively, so as to determine that the port of the switch combination is abnormal.

6. The method according to claim 5, characterized in that The alarm information is sent by the master switch in the switch combination; The determining the address information of the master switch and the address information of the standby switch based on the alarm information sent by any switch in the switch combination includes: receiving an alarm message sent by the main switch; the alarm message is sent when a first port connecting the main switch to the server in the cross-device link aggregation is disconnected, and the alarm message includes address information of the main switch; Based on the address information of the main switch, a port information acquisition command is sent to the main switch; the port information acquisition command is used to acquire the second port of the main switch, and the second port is used to indicate that the main switch is connected to the standby switch through the second port to form a device link aggregation; A command for acquiring the address information of a peer device is sent to the second port to obtain the address information of the standby switch.

7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Sending an indicator collection instruction to the main switch, the standby switch, and a server that forms a cross-device link aggregation with the main switch and the standby switch; the indicator collection instruction is used to obtain the sending status of the data packet when the main switch and the server, and the standby switch and the server interact with each other; According to the indicator result returned by the indicator collection instruction, it is determined whether an abnormality occurs in the main switch, the standby switch and the server.

8. The method according to claim 7, characterized in that The method further comprises: If it is determined that the main switch, the standby switch and the server are not abnormal, the first protocol message between the main switch and the server and the second protocol message between the standby switch and the server are respectively checked, and a first check result and a second check result are respectively obtained; According to the first inspection result and the second inspection result, it is determined whether an abnormality occurs in the main switch, the standby switch, and the server.

9. An inspection device for equipment, characterized in that: include: An abnormality determination unit, used to determine that a port of a switch combination forming a cross-device link aggregation in a preset area is abnormal; wherein the switch combination includes a main switch and a standby switch; A configuration template determining unit, configured to obtain a first configuration template for the master switch and a second configuration template for the standby switch in the preset area; the first configuration template and the second configuration template are obtained by combining multiple switches with normal ports of the same model in the preset area; A checking unit, configured to check the configuration data of the master switch and the configuration data of the standby switch based on the first configuration template and the second configuration template, respectively, to determine whether the configuration data is abnormal; The configuration template determination unit is configured to obtain configuration data of each main switch in the plurality of switch combinations; for any configuration module in the configuration data, determine each command line structure of the same category that meets the first setting condition from the configuration data of each main switch; each command line structure of the same category has the same number of command line lines, and has the same line beginning keyword for the same command line; for each command line structure of the same category, by comparing any two command line structures, obtain a sub-configuration template of the configuration module that meets the second setting condition; the sub-configuration template is used to indicate command line fixed parameters and command line variable parameters that each command line structure of the same category should have, the command line fixed parameters do not depend on the configuration object change, and the command line variable parameters depend on the configuration object change; the first configuration template is obtained according to the sub-configuration templates corresponding to each configuration module.

10. A computer-readable storage medium, characterized in that: The storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method according to any one of claims 1 to 8.