Fault positioning method and apparatus, and device and storage medium
By counting the message count of network device ports in the forwarding path, the problem of being unable to quickly locate the faulty equipment in the prior art is solved, and the rapid positioning and accurate identification of the faulty equipment in the forwarding path is achieved.
Patent Information
- Application Number
- PCT/CN2024/093615
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-25
- Filing Date
- 2024-05-16
- Publication Date
- 2025-04-03
AI Technical Summary
The prior art cannot quickly locate faulty devices present in the forwarding path, especially when the receiving server does not receive message information.
By determining the forwarding path after the service packet is lost as the failover path, count the port message count of each network device, compare the initial and actual counts to determine the fault port, and locate the faulty device.
It realizes rapid positioning of faulty equipment in the forwarding path, improving the efficiency and accuracy of troubleshooting.
Smart Images

Figure CN2024093615_03042025_PF_FP_ABST
Abstract
Description
Fault location method, device, equipment, and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 25, 2023, with application number 202311244854.X. The entire contents of this application are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer network technology, for example, to a fault location method, apparatus, device and storage medium. Background Art
[0003] Maintaining healthy network operations requires reliable communication between servers, often implemented across multiple network devices. If a service message is not received within a preset timeframe by a receiving server while it is being forwarded from a sending server to a receiving server, it indicates that a faulty device or a delay device is present in the message's forwarding path.
[0004] Inband Network Telemetry (INT) is a technology used to collect network information and data to support network monitoring and management. INT allows for the acquisition of information about each network device along the INT probe message forwarding path, the ingress and egress ports on each device, and the time information associated with each device's ingress and egress. Related technologies employ methods that forward INT probe messages from a sending server to a receiving server based on the service message's current forwarding path. The receiving server then determines the delay devices along the current forwarding path based on the message information received, enabling delay detection of network devices along the current forwarding path.
[0005] There are at least the following technical problems in the related art:
[0006] When a faulty device exists in the current forwarding path, the receiving server cannot receive message information and cannot determine the faulty device.
[0007] Summary of the Invention
[0008] The present application provides a fault location method, apparatus, device, and storage medium to enable rapid location of a faulty device in a fault forwarding path.
[0009] In a first aspect, an embodiment of the present application provides a fault location method, including:
[0010] After determining that a business message is lost between a sending server and a receiving server, the current forwarding path corresponding to the business message is determined as the fault forwarding path; the initial message counts of the first port and the second port of each network device in the fault forwarding path are determined; after forwarding the detection message based on the fault forwarding path, the actual message counts of the first port and the second port of each network device in the fault forwarding path are determined; the fault port is determined based on the initial message count and the actual message count of the first port and the second port of each network device, and the network device to which the fault port belongs is determined as the fault device.
[0011] In a second aspect, an embodiment of the present application further provides a fault location device, comprising:
[0012] A path determination module is used to determine the current forwarding path corresponding to the business message as the fault forwarding path after determining that the business message is lost between the sending server and the receiving server; a first counting module is used to determine the initial message counts of the first port and the second port of each network device in the fault forwarding path; a second counting module is used to determine the actual message counts of the first port and the second port of each network device in the fault forwarding path after forwarding the detection message based on the fault forwarding path; an execution module is used to determine the fault port based on the initial message count and the actual message count of the first port and the second port of each network device, and determine the network device to which the fault port belongs as the fault device.
[0013] In a third aspect, an embodiment of the present application further provides a computer device, comprising:
[0014] One or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the fault location method as in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the fault location method as in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic diagram of an INT detection message header encapsulation;
[0017] FIG2 is a schematic diagram of the format of an INT inherent header in an INT detection message header;
[0018] FIG3 is a schematic diagram of the format of monitoring information in an INT detection message header;
[0019] FIG4 is a schematic diagram of an INT detection message running between two servers;
[0020] FIG5 is a flowchart of a fault location method provided in an embodiment of the present application;
[0021] FIG6 is a flowchart of another fault location method provided in an embodiment of the present application;
[0022] FIG7 is a schematic diagram of a forwarding path between a sending server and a receiving server in a fault location method provided in an embodiment of the present application;
[0023] FIG8 is a schematic structural diagram of a fault location device provided in an embodiment of the present application;
[0024] FIG9 is a schematic structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The present application is described below in conjunction with the accompanying drawings and embodiments. The specific embodiments described herein are merely for explaining the present application. For ease of description, only the parts relevant to the present application are shown in the accompanying drawings.
[0026] It should be mentioned before discussing exemplary embodiments that some exemplary embodiments are described as processing or the method described as flow chart. Although flow chart describes multiple operations (or steps) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of multiple operations can be rearranged. When its operation is completed, the processing can be terminated, but can also have additional steps not included in the accompanying drawings. The processing can correspond to method, function, procedure, subroutine, subprogram etc. In addition, the features in the embodiments in the present application and the embodiments can be combined with each other when not conflicting.
[0027] Figure 1 shows an encapsulation diagram of an INT probe message header. As shown in Figure 1, the INT probe message header consists of two parts: the INT Probe HDR (INT intrinsic header) and MD#1-N (monitoring information MetaData). Depending on the transport layer protocol, INT messages can be categorized as INT over TCP and INT over UDP. When a server sends an INT probe message, it inserts the INT intrinsic header after the Transmission Control Protocol (TCP) header or the User Datagram Protocol (UDP) header. When an INT probe message passes through a network device, it is first identified as an INT probe message. The network device then inserts its own monitoring information after the INT intrinsic header.
[0028] Figure 2 illustrates the format of an INT probe packet's intrinsic header. The Probe Maker field in an INT probe packet is fixed with 0xaaaaaaaabbbbbbbb. Therefore, network devices identify INT probe packets based on the Probe Maker field value in the INT intrinsic header. Relying solely on the 8a8b signature of the Probe Maker in INT probe packets can lead to misidentification. Therefore, when configuring network devices, flexible INT is selected. INT probe packets are encapsulated using a Differentiated Services Code Point (DSCP) scheme that differs from that used for service packets. DSCP is a packet Quality of Service (QoS) mechanism. DSCP values can range from 0 to 63, classifying each Internet Protocol (IP) packet into eight different classes. Each class has a corresponding QoS quota, which controls the priority and traffic flow of each packet. The ingress port of the network device specifies the DSCP rule corresponding to the INT detection message through the Access Control List (ACL) policy. The received messages can be filtered based on the DSCP rule, and the messages that hit the DSCP rule are determined as INT detection messages, and monitoring information is added to them.
[0029] Figure 3 is a schematic diagram of the format of monitoring information in an INT probe message header. The network device uses the Device-Identifier (ID) field to identify the device's management IP address. The Ingress-Port and Egress-Port field values are used to identify the ingress and egress ports through which the message flows. The Queue-Id field value is used to identify the queue ID of the egress port. The Rx Timestamp Nano-Seconds Upper and Tx Timestamp Nano-Seconds Upper field values are used to identify the ingress and egress time information of the message flowing through the device, respectively.
[0030] Figure 4 illustrates the operation of an INT probe message between two servers. Agent programs are deployed on both server-1 and server-2. The agent on server-1 encapsulates and sends the INT probe message based on the INT probe configuration (five-tuple information, etc.) sent by the user. When the INT probe message passes through switch-1, it populates MetaData1 with information collected by switch-1 during message processing (input port, output port, input port time information, output port time information, etc.). Similarly, when the INT probe message passes through switch-2, it populates MetaData2 with information collected by switch-2 during message processing. Each network device sequentially populates the corresponding MetaData until the INT probe message is transmitted to server-2. The agent on server-2 then returns the message information corresponding to the INT probe message to server-1. This message information includes all of the INT probe message's MetaData. The agent on server-1 then parses the message information and sends the parsed results to the user terminal. Terminals can analyze, colorize, aggregate, and visualize message information. Latency monitoring of network devices is performed based on their ingress and egress time information. By optimizing latency devices, the network hosting server-1 and server-2 can be optimized, improving network performance.
[0031] INT can be used to obtain information about each network device along the INT probe message forwarding path, the inbound and outbound ports on each network device, and the inbound and outbound time information on each network device. However, if a faulty device exists along the forwarding path, the INT probe message cannot be sent to the receiving server, and INT cannot identify the faulty device.
[0032] Therefore, the present application proposes a fault location method, which determines the faulty device in the forwarding path based on INT to achieve fault location on the forwarding path.
[0033] Figure 5 is a flowchart of a fault location method provided by an embodiment of the present application. This embodiment of the present application is applicable to situations where it is necessary to quickly locate a faulty device in a forwarding path. The method can be performed by a fault location device, which can be implemented in software and / or hardware. As shown in Figure 5, the method includes the following steps:
[0034] Step 510: After determining that a service message is lost between a sending server and a receiving server, determine the current forwarding path corresponding to the service message as a fault forwarding path.
[0035] The five-tuple corresponding to the service message can be used to determine the sending server and receiving server of the service message. There are generally multiple network devices between the sending server and the receiving server. Therefore, when sending a service message from the sending server to the receiving server, there are multiple forwarding paths to choose from. In this case, the network devices that the service message passed through when it was sent from the sending server to the receiving server can be determined based on a hash operation. Furthermore, the current forwarding path corresponding to the service message can be determined based on the sending server, the receiving server, and the network devices passed through.
[0036] In the process of sending a business message from the sending server to the receiving server, if the receiving server does not receive the business message within the preset time, it is determined that the business message is lost between the sending server and the receiving server, and then, the current forwarding path corresponding to the business message can be determined as a faulty forwarding path.
[0037] In an embodiment of the present application, in the process of sending a business message from a sending server to a receiving server, if it is determined that the receiving server has not received the business message within a preset time, it is determined that the business message has been lost in the current forwarding path. Therefore, the current forwarding path corresponding to the business message can be determined as the fault forwarding path, thereby accurately determining the fault forwarding path.
[0038] Step 520: Determine the initial message counts of the first port and the second port of each network device in the fault forwarding path.
[0039] The first port of the network device may be an ingress port, and the second port may be an egress port.
[0040] An ACL policy can be pre-assigned to the first and second ports of each network device in the network. The ACL policy can be used to count the number of probe packets flowing through the ingress and egress ports of the network device, that is, probe packets can be counted for each port. The ACL policy bound to the first and second ports of each network device specifies DSCP rules corresponding to probe packets. By matching packets flowing through the network device with the DSCP rules specified in the ACL policy, the probe packets passing through the network device can be identified.
[0041] The initial message count of the input port and output port of each network device in the fault forwarding path can be understood as the number of detection messages flowing through the input port and output port of the network device in the fault forwarding path before the fault forwarding path forwards the detection message. That is, the number of detection messages flowing through the input port and output port of each network device in the fault forwarding path after the previous detection message flows through the network device. The number of detection messages flowing through the input port and output port of each network device in the fault forwarding path can be counted based on the ACL policy bound to the input port and output port of each network device in the fault forwarding path. Furthermore, the number of detection messages flowing through the input port and output port of each network device before the fault forwarding path forwards the detection message can be determined as the initial message count of the first port and the second port of the network device.
[0042] In an embodiment of the present application, after determining the fault forwarding path, the number of detection packets flowing through the first port and the second port of each network device in the fault forwarding path is determined, and the initial packet count of the first port and the second port of each network device before the fault forwarding path is located, that is, before the fault forwarding path forwards the detection packet, is determined.
[0043] Step 530: After forwarding the detection message based on the fault forwarding path, determine the actual message counts of the first port and the second port of each network device in the fault forwarding path.
[0044] The detection message is an INT detection message. When the INT detection message is sent from the sending server to the receiving server based on the fault forwarding path, it can carry the inbound port, outbound port, inbound port time information, outbound port time information, etc. of each network device in the fault forwarding path.
[0045] After the fault forwarding path is determined, it can be determined that a faulty device exists in the fault forwarding path. In order to determine the faulty device in the fault forwarding path, it is necessary to locate the fault in the fault forwarding path.
[0046] After determining the fault forwarding path, the probe message can be forwarded based on the fault forwarding path to send the probe message from the sending server to the receiving server. After the probe message is sent from the sending server to the receiving server based on the fault forwarding path, the receiving server cannot receive the probe message due to the presence of a faulty device in the fault forwarding path. Furthermore, the faulty device can be determined by the number of probe messages flowing through the first port and the second port of each network device in the fault forwarding path before and after the probe message is forwarded. Therefore, after sending the probe message from the sending server to the receiving server based on the fault forwarding path, the number of probe messages flowing through the input port and the output port of each network device in the fault forwarding path can be counted based on the ACL policy bound to the input port and the output port of the network device. Furthermore, the number of probe messages flowing through the input port and the output port of each network device after the fault forwarding path forwards the probe message can be determined as the actual message count of the first port and the second port of the network device.
[0047] In an embodiment of the present application, after forwarding the detection message based on the fault forwarding path, the number of detection messages flowing through the first port and the second port of each network device in the fault forwarding path is determined, and the actual message count of the first port and the second port of each network device in the process of fault locating the fault forwarding path, that is, after the fault forwarding path forwards the detection message, is determined.
[0048] Step 540: Determine a faulty port according to the initial message counts and the actual message counts of the first port and the second port of each network device, and determine the network device to which the faulty port belongs as a faulty device.
[0049] After the non-faulty network device forwards the detection message, the actual message counts of the first port and the second port of the network device are incremented by 1 compared to the initial message counts.
[0050] On the one hand, the theoretical message counts and actual message counts of the first port and the second port of each network device after the fault forwarding path forwards the detection message can be compared, the fault port can be determined based on the comparison result, and the network device to which the fault port belongs can be determined as the faulty device; on the other hand, the actual message counts of the first port and the second port of each network device before and after the fault forwarding path forwards the detection message can be determined compared with the count increment of the initial message technology, the fault port can be determined based on the count enhancement, and the network device to which the fault port belongs can be determined as the faulty device.
[0051] In an embodiment of the present application, the fault port is determined based on the initial message counts of the first port and the second port of each network device before the fault forwarding path forwards the detection message, and the actual message counts of the first port and the second port of each network device after the fault forwarding path forwards the detection message, so that the network device to which the fault port belongs is determined as the fault device, and the fault device in the fault forwarding path is quickly located.
[0052] The fault location method provided by an embodiment of the present application includes: after determining that a business message is lost between a sending server and a receiving server, determining the current forwarding path corresponding to the business message as the fault forwarding path; determining the initial message counts of the first port and the second port of each network device in the fault forwarding path; after forwarding the detection message based on the fault forwarding path, determining the actual message counts of the first port and the second port of each network device in the fault forwarding path; determining the fault port based on the initial message count and the actual message count of the first port and the second port of each network device, and determining the network device to which the fault port belongs as the fault device. The above technical solution, in the process of sending a business message from a sending server to a receiving server, after determining that the receiving server has not received the business message within a preset time, can determine that the business message has been lost in the current forwarding path, and can determine the current forwarding path corresponding to the business message as the fault forwarding path, so as to accurately determine the fault forwarding path. After determining the fault forwarding path, the number of detection messages flowing through the first port and the second port of each network device in the fault forwarding path can be determined, so as to determine the initial message count of the first port and the second port of each network device before locating the fault on the fault forwarding path, that is, before the fault forwarding path forwards the detection message, and then forward the detection message based on the fault forwarding path, and then based on the fault forwarding path, the detection message is forwarded. After the forwarding path forwards the detection message, the number of detection messages flowing through the first port and the second port of each network device in the fault forwarding path can be determined, so as to determine the actual message count of the first port and the second port of each network device in the process of fault locating the fault forwarding path, that is, after the fault forwarding path forwards the detection message. Finally, the fault port can be determined based on the initial message count of the first port and the second port of each network device before the fault forwarding path forwards the detection message and the actual message count of the first port and the second port of each network device after the fault forwarding path forwards the detection message, and the network device to which the fault port belongs can be determined as the fault device, so as to realize rapid positioning of the fault device in the fault forwarding path.
[0053] Figure 6 is a flowchart of another fault location method provided by an embodiment of the present application. The embodiment of the present application is applicable to situations where it is necessary to quickly determine the faulty device in the forwarding path. Based on the above embodiment, the embodiment of the present application adds: "When the receiving server receives the detection message at any moment greater than the time threshold within the preset time, the delay information of each network device in the fault forwarding path is determined according to the time information of the first port and the second port of each network device contained in the message information corresponding to the detection message; the network device with delay information greater than the preset delay is determined as a delay device." The explanation of the terms that are the same or corresponding to the above embodiment will not be repeated here. Referring to Figure 6, the fault location method provided by the embodiment of the present application includes:
[0054] Step 610: After determining that a service message is lost between a sending server and a receiving server, determine the current forwarding path corresponding to the service message as a faulty forwarding path.
[0055] As mentioned above, in the process of sending a business message from the sending server to the receiving server, if the receiving server does not receive the business message within the preset time, it is determined that the business message is lost between the sending server and the receiving server, and then, the current forwarding path corresponding to the business message can be determined as a faulty forwarding path.
[0056] In one implementation, step 610 may include:
[0057] Based on the five-tuple corresponding to the business message, the current forwarding path corresponding to the business message is determined; in the process of sending the business message from the sending server to the receiving server based on the current forwarding path, if the receiving server does not receive the business message within a preset time, it is determined that the business message is lost between the sending server and the receiving server; the current forwarding path determined by the five-tuple corresponding to the business message is determined as the fault forwarding path.
[0058] The five-tuple corresponding to the service message includes the sending server and the receiving server. Accordingly, determining the current forwarding path corresponding to the service message based on the five-tuple corresponding to the service message includes:
[0059] Determine the network devices between the sending server and the receiving server included in the five-tuple corresponding to the business message; determine the current forwarding path corresponding to the business message based on a hash operation, wherein the current forwarding path is composed of the sending server, the receiving server, and the network devices selected between the sending server and the receiving server.
[0060] The five-tuple includes the source IP address, destination IP address, source port, destination port and transmission protocol. The five-tuple corresponding to the business message may include the sending server, the receiving server, the port used by the sending server to send the business message, the port used by the receiving server to receive the business message, and the transmission protocol of the business message between the sending server and the receiving server.
[0061] The preset time is determined by the maximum latency of all network devices in the current forwarding path and can be understood as the sum of the maximum latency of all network devices in the current forwarding path. A service message is sent from the sending server to the receiving server along the current forwarding path. If all network devices in the current forwarding path are healthy, the receiving server will receive the service message within the preset time after the sending server sends the service message.
[0062] First, we can determine the network devices between the sending server and the receiving server included in the five-tuple corresponding to the business message, and then determine the target network devices used to send the business message from the sending server to the receiving server based on the hash operation. Then, we can determine the current forwarding path corresponding to the business message based on the sending server, the target network devices determined in sequence, and the receiving server.
[0063] Furthermore, the business message can be sent from the sending server to the receiving server based on the current forwarding path. In the process of sending the business message from the sending server to the receiving server based on the current forwarding path, if the receiving server does not receive the business message within a preset time after the sending server sends the business message, it is determined that the business message is lost in the current forwarding path, that is, the business message is lost between the sending server and the receiving server. At this time, the current forwarding path can be determined as the fault forwarding path, so that the fault forwarding path can be accurately determined.
[0064] In the process of sending a service message from a sending server to a receiving server based on the current forwarding path, if the receiving server receives the service message at any time greater than the time threshold within the preset time, the current forwarding path corresponding to the service message can be determined as a delayed forwarding path.
[0065] The time threshold is determined by the preset latency of all network devices in the current forwarding path and can be understood as the sum of the preset latency of all network devices in the current forwarding path. A service message is sent from the sending server to the receiving server based on the current forwarding path. If multiple network devices in the current forwarding path are all non-latency network devices, the receiving server will receive the service message within the time threshold after the sending server sends the service message.
[0066] Therefore, after determining that the current forwarding path corresponding to the service message is a delayed forwarding path, the detection message can be forwarded based on the delayed forwarding path. According to the time information of the first port and the second port of each network device in the delayed forwarding path contained in the message information corresponding to the detection message received by the receiving server, the delay information of the network device can be determined, and the network device whose delay information is greater than the preset delay is determined as a delay device.
[0067] In an embodiment of the present application, in the process of sending a business message from a sending server to a receiving server, if it is determined that the receiving server has not received the business message within a preset time, it is determined that the business message has been lost in the current forwarding path. Therefore, the current forwarding path corresponding to the business message can be determined as the fault forwarding path, thereby accurately determining the fault forwarding path.
[0068] Step 620: Determine the initial message counts of the first port and the second port of each network device in the fault forwarding path.
[0069] In one embodiment, step 620 may include:
[0070] After each network device in the fault forwarding path forwards the previous detection message, the statistical message counts of the first port and the second port of each network device in the fault forwarding path are determined based on the access control list (ACL) policy bound to the first port and the second port of each network device in the fault forwarding path, and the statistical message counts of the first port and the second port of each network device are determined as the initial message counts of the first port and the second port of each network device.
[0071] As mentioned above, the initial message count of the input port and output port of each network device in the fault forwarding path can be understood as the number of probe messages flowing through the input port and output port of the network device in the fault forwarding path before the fault forwarding path forwards the probe message, that is, after the network device in the fault forwarding path forwards the previous probe message.
[0072] Therefore, before the fault forwarding path forwards the detection message, that is, after each network device in the fault forwarding path forwards the previous detection message, the statistical message counts of the first port and the second port of each network device in the fault forwarding path can be determined based on the ACL policy bound to the first port and the second port of each network device in the fault forwarding path, and the statistical message counts of the first port and the second port of each network device can be determined as the initial message counts of the first port and the second port of the network device.
[0073] FIG7 is a schematic diagram of a forwarding path between a sending server and a receiving server in a fault location method provided in an embodiment of the present application. As shown in FIG7 , the fault forwarding path is: server-1>T0-SW-1>T1-SW-1>T0-SW-4>server-2. Therefore, before the fault forwarding path forwards the detection message, that is, after each network device in the fault forwarding path forwards the previous detection message, it is determined that the statistical message counts of port 1 and port 2 of T0-SW-1, port 3 and port 4 of T1-SW-1, and port 5 and port 6 of T0-SW-4 are all 0, and the statistical message counts of the first port and the second port of each network device are determined as the initial message counts of the first port and the second port of the network device. It can be determined that the initial message counts of the first port and the second port of multiple network devices are all 0.
[0074] In an embodiment of the present application, after determining the fault forwarding path, the number of detection packets flowing through the first port and the second port of each network device in the fault forwarding path is determined, and the initial packet count of the first port and the second port of each network device before the fault forwarding path is located, that is, before the fault forwarding path forwards the detection packet, is determined.
[0075] Step 630: Forward the detection message based on the fault forwarding path.
[0076] In one implementation, step 630 may include:
[0077] The detection message is forwarded in sequence based on multiple network devices in the fault forwarding path.
[0078] After the fault forwarding path is determined, the detection message may be forwarded sequentially based on multiple network devices in the fault forwarding path, so as to send the detection message from the sending server to the receiving server.
[0079] As shown in Figure 7 , the probe packets can be sent from server-1 to server-2 in sequence based on T0-SW-1, T1-SW-1, and T0-SW-4 in the fault forwarding path server-1 > T0-SW-1 > T1-SW-1 > T0-SW-4 > server-2.
[0080] Step 640: Determine the actual packet counts of the first port and the second port of each network device in the fault forwarding path.
[0081] In one embodiment, step 640 may include:
[0082] The actual message counts of the first port and the second port of each network device in the fault forwarding path are determined based on the ACL policy bound to the first port and the second port of each network device.
[0083] After the probe message is sent from the sending server to the receiving server based on the fault forwarding path, the number of probe messages flowing through the ingress and egress ports of each network device in the fault forwarding path can be counted based on the ACL policy bound to the ingress and egress ports of the network device. Furthermore, the number of probe messages flowing through the ingress and egress ports of each network device after the fault forwarding path forwards the probe message can be determined as the actual message count of the first port and the second port of the network device.
[0084] As shown in Figure 7, it can be determined that the number of probe packets flowing through ports 1 and 2 of T0-SW-1, ports 3 and 4 of T1-SW-1, and port 5 of T0-SW-4 is all 1, and the number of probe packets flowing through port 6 of T0-SW-4 is 0. Furthermore, it can be determined that the actual packet counts of ports 1 and 2 of T0-SW-1, ports 3 and 4 of T1-SW-1, and port 5 of T0-SW-4 are all 1, and the actual packet count of port 6 of T0-SW-4 is 0.
[0085] In an embodiment of the present application, after forwarding the detection message based on the fault forwarding path, the number of detection messages flowing through the first port and the second port of each network device in the fault forwarding path is determined, and the actual message count of the first port and the second port of each network device in the process of fault locating the fault forwarding path, that is, after the fault forwarding path forwards the detection message, is determined.
[0086] Step 650: Determine a faulty port according to the initial message counts and the actual message counts of the first port and the second port of each network device, and determine the network device to which the faulty port belongs as a faulty device.
[0087] In one embodiment, step 650 may include:
[0088] Determine the theoretical message counts of the first port and the second port of each network device based on the initial message counts of the first port and the second port of each network device; determine the port whose actual message count is inconsistent with the theoretical message count as the faulty port; and determine the network device to which the faulty port belongs as the faulty device.
[0089] The theoretical message counts of the first port and the second port of each network device after the fault forwarding path forwards the detection message can be determined based on the initial message counts of the first port and the second port of each network device before the fault forwarding path forwards the detection message. Furthermore, the theoretical message counts and the actual message counts of the first port and the second port of each network device in the fault forwarding path can be compared. If the actual message count and the theoretical message count of any port of any network device in the fault forwarding path are inconsistent, the port is determined to be a faulty port, and the network device to which the faulty port belongs can be determined as a faulty device.
[0090] As shown in Figure 7, it can be determined that the theoretical message counts of ports 1 and 2 of T0-SW-1, ports 3 and 4 of T1-SW-1, and ports 5 and 6 of T0-SW-4 are all 1. Since the actual message counts of ports 1 and 2 of T0-SW-1, ports 3 and 4 of T1-SW-1, and port 5 of T0-SW-4 are all 1, the actual message count of port 6 of T0-SW-4 is 0. Therefore, port 6 of T0-SW-4 can be determined as a faulty port, and T0-SW-4 to which port 6 belongs can be determined as a faulty device.
[0091] In another embodiment, step 650 may include:
[0092] Determine the count increments of the first port and the second port of each network device based on the initial message counts and the actual message counts of the first port and the second port of each network device; determine the port with a count increment of zero as the faulty port; and determine the network device to which the faulty port belongs as the faulty device.
[0093] The count increments of the first port and the second port of each network device can be determined based on the actual message counts of the first port and the second port of each network device after the fault forwarding path forwards the detection message, compared with the initial message counts of the first port and the second port of the network device before the fault forwarding path forwards the detection message. If the count increment of any port of any network device in the fault forwarding path is not 1, then the port is determined to be a faulty port, and the network device to which the faulty port belongs can be determined to be a faulty device.
[0094] As shown in Figure 7, it can be determined that the theoretical message counts of ports 1 and 2 of T0-SW-1, ports 3 and 4 of T1-SW-1, and ports 5 and 6 of T0-SW-4 are all 1. Since the actual message counts of ports 1 and 2 of T0-SW-1, ports 3 and 4 of T1-SW-1, and port 5 of T0-SW-4 are all 1, and the actual message count of port 6 of T0-SW-4 is 0, it can be determined that the count increments of ports 1 and 2 of T0-SW-1, ports 3 and 4 of T1-SW-1, and port 5 of T0-SW-4 are 1, and the count increment of port 6 of T0-SW-4 is 0, which is not 1. Therefore, port 6 of T0-SW-4 can be determined to be a faulty port, and T0-SW-4, to which port 6 belongs, can be determined to be a faulty device.
[0095] In an embodiment of the present application, the fault port is determined based on the initial message counts of the first port and the second port of each network device before the fault forwarding path forwards the detection message, and the actual message counts of the first port and the second port of the network device after the fault forwarding path forwards the detection message, so that the network device to which the fault port belongs is determined as the fault device, and the fault device in the fault forwarding path is quickly located.
[0096] The fault location method provided in the embodiment of the present application includes: determining the current forwarding path corresponding to the business message based on the five-tuple corresponding to the business message; in the process of sending the business message from the sending server to the receiving server based on the current forwarding path, if the receiving server does not receive the business message within a preset time, determining that the business message is lost between the sending server and the receiving server; determining the current forwarding path determined by the five-tuple corresponding to the business message as the fault forwarding path; after each network device in the fault forwarding path forwards the previous detection message, based on the access control list bound to the first port and the second port of each network device in the fault forwarding path The ACL policy determines the statistical message counts of the first port and the second port of each of the network devices, and determines the statistical message counts of the first port and the second port of each network device as the initial message counts of the first port and the second port of each network device; forwards the detection message in sequence based on multiple network devices in the fault forwarding path; determines the actual message counts of the first port and the second port of each network device based on the ACL policy bound to the first port and the second port of each network device in the fault forwarding path; determines the faulty port according to the initial message count and the actual message count of the first port and the second port of each network device, and determines the network device to which the faulty port belongs as the faulty device.The above technical solution, in the process of sending a business message from a sending server to a receiving server, after determining that the receiving server has not received the business message within a preset time, can determine that the business message has been lost in the current forwarding path, and can determine the current forwarding path corresponding to the business message as the fault forwarding path, thereby accurately determining the fault forwarding path. After determining the fault forwarding path, the number of detection messages flowing through the first port and the second port of each network device in the fault forwarding path can be determined, thereby determining the initial message count of the first port and the second port of each network device before locating the fault on the fault forwarding path, that is, before the fault forwarding path forwards the detection message, and then, based on the multiple network devices in the fault forwarding path, forwarding the detection message in sequence, After forwarding the detection message based on the fault forwarding path, the number of detection messages flowing through the first port and the second port of each network device in the fault forwarding path can be determined, so as to determine the actual message count of the first port and the second port of each network device in the process of fault locating the fault forwarding path, that is, after the fault forwarding path forwards the detection message. Finally, the fault port can be determined based on the initial message count of the first port and the second port of each network device before the fault forwarding path forwards the detection message and the actual message count of the first port and the second port of the network device after the fault forwarding path forwards the detection message, and the network device to which the fault port belongs can be determined as the fault device, so as to realize rapid positioning of the fault device in the fault forwarding path.
[0097] Figure 8 is a schematic diagram of the structure of a fault location device provided in an embodiment of the present application. This device and the fault location method of the above embodiment share the same concept. For details not fully described in the embodiment of the fault location device, please refer to the embodiment of the above fault location method.
[0098] The structure of the fault location device is shown in FIG8 , and includes:
[0099] The path determination module 810 is configured to determine the current forwarding path corresponding to the business message as the fault forwarding path after determining that the business message is lost between the sending server and the receiving server; the first counting module 820 is configured to determine the initial message count of the first port and the second port of each network device in the fault forwarding path; the second counting module 830 is configured to determine the actual message count of the first port and the second port of each network device in the fault forwarding path after forwarding the detection message based on the fault forwarding path; the execution module 840 is configured to determine the fault port based on the initial message count and the actual message count of the first port and the second port of each network device, and determine the network device to which the fault port belongs as the fault device.
[0100] Based on the above embodiment, the first counting module 820 is configured as follows:
[0101] After each network device in the fault forwarding path forwards the previous detection message, the statistical message counts of the first port and the second port of each network device in the fault forwarding path are determined based on the access control list (ACL) policy bound to the first port and the second port of each network device in the fault forwarding path, and the statistical message counts of the first port and the second port of each network device are determined as the initial message counts of the first port and the second port of each network device.
[0102] Based on the above embodiment, the second counting module 830 is configured as follows:
[0103] The detection message is forwarded in sequence based on multiple network devices in the fault forwarding path; and the actual message count of the first port and the second port of each network device in the fault forwarding path is determined based on the ACL policy bound to the first port and the second port of each network device.
[0104] Based on the above embodiment, the execution module 840 is configured to:
[0105] The theoretical message counts of the first port and the second port of each network device are determined according to the initial message counts of the first port and the second port of each network device; and the port whose actual message count is inconsistent with the theoretical message count is determined as the faulty port.
[0106] Based on the above embodiment, the execution module 840 is configured to:
[0107] Determine the count increments of the first port and the second port of each network device according to the initial message counts and the actual message counts of the first port and the second port of each network device; and determine the port with a count increment of zero as the faulty port.
[0108] Based on the above embodiment, the path determination module 810 is configured as follows:
[0109] Based on the five-tuple corresponding to the business message, the current forwarding path corresponding to the business message is determined; in the process of sending the business message from the sending server to the receiving server based on the current forwarding path, if the receiving server does not receive the business message within a preset time, it is determined that the business message is lost between the sending server and the receiving server; the current forwarding path determined by the five-tuple corresponding to the business message is determined as the fault forwarding path.
[0110] In one embodiment, the quintuple corresponding to the service message includes the sending server and the receiving server. Accordingly, determining the current forwarding path corresponding to the service message based on the quintuple corresponding to the service message includes:
[0111] Determine the network devices between the sending server and the receiving server included in the five-tuple corresponding to the business message; determine the current forwarding path corresponding to the business message based on a hash operation, wherein the current forwarding path is composed of the sending server, the receiving server, and the network devices selected between the sending server and the receiving server.
[0112] The fault location device provided in the embodiments of the present application can execute the fault location method provided in any embodiment of the present application, and has the corresponding functional modules and effects for executing the fault location method.
[0113] In the embodiment of the above-mentioned fault location device, the multiple units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the names of the multiple functional units are only for the convenience of distinguishing each other and are not used to limit the scope of protection of this application.
[0114] Figure 9 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 9 shows a block diagram of an exemplary computer device 9 suitable for implementing the embodiments of the present application. The computer device 9 shown in Figure 9 is merely an example and should not limit the functionality and scope of use of the embodiments of the present application.
[0115] As shown in Figure 9, computer device 9 is a general-purpose computing electronic device. Components of computer device 9 may include: one or more processors or processing units 16, system memory 28, and a bus 18 connecting various system components (including system memory 28 and processing unit 16).
[0116] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0117] The computer device 9 includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 9, including volatile and non-volatile media, removable and non-removable media.
[0118] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 9 may include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be configured to read and write to a non-removable, non-volatile magnetic medium (not shown in FIG. 9 , commonly referred to as a “hard drive”). Although not shown in FIG. 9 , a magnetic disk drive for reading and writing to a removable non-volatile magnetic disk (e.g., a “floppy disk”) may be provided, as well as an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a Compact Disc Read-Only Memory (CD-ROM), a Digital Video Disc Read-Only Memory (DVD-ROM), or other optical media). In these cases, each drive may be connected to the bus 18 via one or more data media interfaces. The system memory 28 may include at least one program product having a set (eg, at least one) of program modules. These program modules are configured to perform the functions of the embodiments of the present application.
[0119] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 may include an operating system, one or more application programs, other program modules, and program data, each of which, or a combination thereof, may include an implementation of a network environment. Program modules 42 generally implement the functions and / or methods of the embodiments described herein.
[0120] The computer device 9 can also communicate with one or more external devices 14 (e.g., a keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 9, and / or any device that enables the computer device 9 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). This communication can occur via an input / output (I / O) interface 22. Furthermore, the computer device 9 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 20. As shown in FIG9 , the network adapter 20 communicates with other modules of the computer device 9 via a bus 18. Although not shown in FIG9 , other hardware and / or software modules can be used in conjunction with the computer device 9, including microcode, device drivers, redundant processing units, external disk drive arrays, redundant array of independent disks (RAID) systems, tape drives, and data backup storage systems.
[0121] The processing unit 16 executes various functional applications and page displays by running programs stored in the system memory 28, for example, implementing the fault locating method provided in the embodiment of the present invention, which includes:
[0122] After determining that a business message is lost between a sending server and a receiving server, the current forwarding path corresponding to the business message is determined as the fault forwarding path; the initial message counts of the first port and the second port of each network device in the fault forwarding path are determined; after forwarding the detection message based on the fault forwarding path, the actual message counts of the first port and the second port of each network device in the fault forwarding path are determined; the fault port is determined based on the initial message count and the actual message count of the first port and the second port of each network device, and the network device to which the fault port belongs is determined as the fault device.
[0123] Those skilled in the art will appreciate that the processor may also implement the technical solution of the fault location method provided in any embodiment of the present application.
[0124] The present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the fault location method provided in the present invention is implemented, for example. The method includes:
[0125] After determining that a business message is lost between a sending server and a receiving server, the current forwarding path corresponding to the business message is determined as the fault forwarding path; the initial message counts of the first port and the second port of each network device in the fault forwarding path are determined; after forwarding the detection message based on the fault forwarding path, the actual message counts of the first port and the second port of each network device in the fault forwarding path are determined; the fault port is determined based on the initial message count and the actual message count of the first port and the second port of each network device, and the network device to which the fault port belongs is determined as the fault device.
[0126] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media.Computer-readable media can be computer-readable signal media or computer-readable storage media.Computer-readable storage media can be, for example: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination of the above.Examples of computer-readable storage media (non-exhaustive list) include: electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memories (EPROM or flash memory), optical fibers, CD-ROMs, optical storage devices, magnetic storage devices, or any suitable combination of the above.In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0127] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0128] The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.
[0129] The computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a LAN or WAN, or can be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0130] Those skilled in the art will appreciate that the aforementioned multiple modules or steps of the present application can be implemented using a general-purpose computing device. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into multiple integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
Claims
1. A fault location method, comprising: After determining that a service message is lost between a sending server and a receiving server, determining a current forwarding path corresponding to the service message as a fault forwarding path; Determining initial message counts of a first port and a second port of each network device in the fault forwarding path; After forwarding the detection message based on the fault forwarding path, determining the actual message count of the first port and the second port of each network device in the fault forwarding path; The faulty port is determined according to the initial message count and the actual message count of the first port and the second port of each network device, and the network device to which the faulty port belongs is determined as the faulty device.
2. The fault location method according to claim 1, wherein: The determining of the initial message counts of the first port and the second port of each network device in the fault forwarding path includes: After each network device in the fault forwarding path forwards the previous detection message, the statistical message counts of the first port and the second port of each network device in the fault forwarding path are determined based on the access control list (ACL) policy bound to the first port and the second port of each network device in the fault forwarding path, and the statistical message counts of the first port and the second port of each network device are determined as the initial message counts of the first port and the second port of each network device.
3. The fault location method according to claim 1, wherein: The forwarding of the detection message based on the fault forwarding path includes: The detection message is forwarded in sequence based on multiple network devices in the fault forwarding path.
4. The fault location method according to claim 2, wherein: The determining of the actual message counts of the first port and the second port of each network device in the fault forwarding path includes: The actual message counts of the first port and the second port of each network device in the fault forwarding path are determined based on the ACL policy bound to the first port and the second port of each network device.
5. The fault location method according to claim 1, wherein: The determining the faulty port according to the initial message count and the actual message count of the first port and the second port of each network device comprises: Determine theoretical message counts of the first port and the second port of each network device according to the initial message counts of the first port and the second port of each network device; The port whose actual message count is inconsistent with the theoretical message count is determined as the faulty port.
6. The fault location method according to claim 1, wherein: Determining the faulty port according to the initial message count and the actual message count of the first port and the second port of each network device includes: Determine the count increment of the first port and the second port of each network device according to the initial message count and the actual message count of the first port and the second port of each network device; The port whose count increment is zero is determined as the faulty port.
7. The fault location method according to claim 1, wherein: After determining that the service message is lost between the sending server and the receiving server, determining the current forwarding path corresponding to the service message as the fault forwarding path includes: Determine the current forwarding path corresponding to the service message based on the quintuple corresponding to the service message; In the process of sending the service message from the sending server to the receiving server based on the current forwarding path, if the receiving server does not receive the service message within a preset time, determining that the service message is lost between the sending server and the receiving server; The current forwarding path determined by the five-tuple corresponding to the service message is determined as the fault forwarding path.
8. The fault location method according to claim 7, wherein: The five-tuple corresponding to the service message includes the sending server and the receiving server, and the determining the current forwarding path corresponding to the service message based on the five-tuple corresponding to the service message includes: Determine the network device between the sending server and the receiving server included in the quintuple corresponding to the service message; The current forwarding path corresponding to the service message is determined based on a hash operation, wherein the current forwarding path is composed of the sending server, the receiving server, and a network device selected between the sending server and the receiving server.
9. A fault location device, comprising: A path determination module, configured to determine a current forwarding path corresponding to the service message as a fault forwarding path after determining that the service message is lost between the sending server and the receiving server; A first counting module, configured to determine an initial message count of a first port and a second port of each network device in the fault forwarding path; A second counting module, configured to determine actual message counts of the first port and the second port of each network device in the fault forwarding path after forwarding the detection message based on the fault forwarding path; The execution module is configured to determine the faulty port according to the initial message count and the actual message count of the first port and the second port of each network device, and to connect the network device to which the faulty port belongs to Determined to be a faulty device.
10. A computer device comprising: at least one processor; a storage device configured to store at least one program, When the at least one program is executed by the at least one processor, the at least one processor implements the fault location method as described in any one of claims 1-8.
11. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the fault location method according to any one of claims 1 to 8 when executed by a computer processor.
Citation Information
Patent Citations
Failure positioning method and associated equipment
CN102868553A
Packet loss port positioning method and device
CN106411624A
Network fault checking method and device and terminal equipment
CN116471173A
Fault positioning method and device, equipment and storage medium
CN117061331A
Automated network fault location
US20150023151A1