Network gray fault detection method and device, medium and switch system
By using a self-looping key generator and XOR accumulation processing in the switch system, the problems of misjudgment and high resource requirements in gray fault detection in the network are solved, achieving high-precision gray fault detection and improving network security.
Patent Information
- Application Number
- CN202511753932.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-06
AI Technical Summary
Existing technologies are insufficient to effectively detect gray faults in networks that cause non-temporary packet loss and only affect a portion of traffic. In particular, when facing malicious attacks, detection methods suffer from misjudgment and high resource requirements.
By introducing a self-looping key generator into the switch system, generating a check key value and performing XOR accumulation processing, combined with check sliding window technology, packet loss and out-of-order packet detection can be accurately distinguished, achieving high-precision gray fault detection.
It improves the accuracy of gray fault detection, reduces false positives, lowers resource requirements and overhead, and enhances network security.
Smart Images

Figure CN121619260A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network fault detection technology, and more specifically, to a method, device, medium, and switch system for detecting network gray faults. Background Technology
[0002] Gray faults refer to any abnormal situation in the network that causes non-temporary packet loss and only affects a portion of the traffic (i.e., any improper or unexpected behavior). Such anomalies may be caused by malicious attacks, specifically including hardware problems (such as fiber optic, interface, and chip failures) or software problems (such as network operating system failures). Moreover, the attacked traffic cannot be clearly attributed to a specific data packet or data stream. Therefore, how to detect gray faults in real time is also an important aspect of network security. Summary of the Invention
[0003] In view of this, this application provides a method, device, medium, and switch system for detecting network gray faults, so as to at least solve the problems existing in the related technologies.
[0004] Specifically, this application is implemented through the following technical solution: This application provides a method for detecting network gray-scale faults, applied to a first switch in a packet transmission path, wherein the first switch is any switch in the packet transmission path other than a second switch, and the second switch is the ingress switch; the method includes: The first verification configuration instruction sent by the receiving server is used to instruct the first switch to perform packet loss gray fault detection on the received packet stream. The second switch receives a target packet stream sent by the front-end switch. The target packet stream is obtained by the second switch adding a checksum key value to the header of each packet in the packet stream in the order of packet arrival based on a self-loop key generator. The checksum value of the target message stream is determined by performing an XOR summation process on the checksum key value carried by each message in the target message stream. If the check value differs from the preset value, it is determined that the message stream has a packet loss gray fault event during transmission.
[0005] This application provides another method for detecting network gray-scale faults, applied to a second switch in a packet transmission path, wherein the second switch is the entry switch in the packet transmission path; the method includes: The second verification configuration instruction sent by the server is used to instruct the second switch to modify the packet header when the received packet stream is the same as the preset packet stream type. Receive a message stream. If the message stream type is a preset message stream type, add a check key value to the header of each message in the message stream in sequence based on the self-loop key generator to modify the message header and obtain the target message stream. The target packet stream is sent to the first switch; the first switch is another switch in the packet transmission path besides the second switch, and the first switch is used to perform packet loss gray fault detection based on the verification key value carried by the target packet stream according to the indication information of the first verification configuration instruction sent by the server.
[0006] This application also provides another method for detecting network gray-scale faults, applied to a server, the method comprising: In response to the configuration operation, segmented routing configuration information, a first verification configuration instruction, and a second verification configuration instruction are generated; the segmented routing configuration information is used to indicate the packet transmission path to be fault detected, the packet transmission path includes a first switch and a second switch, the first switch is the other switch in the packet transmission path except for the second switch, and the second switch is the ingress switch; The second verification configuration instruction is sent to the second switch. The second verification configuration instruction is used to instruct the second switch to modify the packet header of the received packet stream to obtain the target packet stream. The first verification configuration instruction is sent to the first switch; the first verification configuration instruction is used to instruct the first switch to perform packet loss fault detection on the target packet stream after receiving the target packet stream sent by the front-end switch.
[0007] This application also provides a switching system, including a first switch and a second switch, wherein the second switch is the ingress switch in the packet transmission path, and the first switch is any other switch in the packet transmission path besides the second switch. The second switch is used to receive a second verification configuration instruction sent by the server, and according to the second verification configuration instruction, when the received packet stream is a preset packet stream type, to add a verification key value to the header of each packet in the packet stream in sequence based on the self-loop key generator, generate a target packet stream, and send the target packet stream to the first switch; The first switch is configured to receive a first verification configuration instruction sent by the server, and according to the first verification configuration instruction, when the target packet stream is received, to perform XOR accumulation processing on the verification key value carried by the target packet stream to determine the verification value of the target packet stream, and if the verification value is different from the preset value, to determine that the packet stream has a packet loss gray fault event during transmission.
[0008] This application also provides a switching system, including a first switch and a second switch, wherein the second switch is the ingress switch in the packet transmission path, and the first switch is any other switch in the packet transmission path besides the second switch. The second switch is used to receive a second verification configuration instruction sent by the server, and according to the second verification configuration instruction, when the received packet stream is a preset packet stream type, to add a verification key value to the header of each packet in the packet stream in sequence based on the self-loop key generator, generate a target packet stream, and send the target packet stream to the first switch; The first switch is configured to receive a first verification configuration instruction sent by the server, and according to the first verification configuration instruction, when the target packet stream is received, to perform XOR accumulation processing on the verification key value carried by the target packet stream to determine the verification value of the target packet stream, and if the verification value is different from the preset value, to determine that the packet stream has a packet loss gray fault event during transmission.
[0009] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the network gray fault detection method described in any of the foregoing embodiments.
[0010] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the network gray fault detection method described in any of the foregoing embodiments.
[0011] This application also provides a computer program product, including a computer program that, when run by a processor, performs the steps of any of the possible network gray fault detection methods described above.
[0012] The technical solutions provided by the embodiments of this application may include the following beneficial effects: In this embodiment, the ingress switch adds a checksum key value to the header of each packet in the packet stream according to the packet arrival order, based on the self-loop key generator, to generate the target packet stream. After receiving the target packet stream sent by the front-end switch, the second switch performs XOR accumulation on the checksum key value carried by each packet in the target packet stream to determine the checksum value of the target packet stream, and compares it with a preset value. In this way, packet loss fault detection can be achieved.
[0013] Furthermore, the fixed sequence key value based on the self-loop key generator and the window XOR accumulation check can accurately distinguish between "packet loss" and "out-of-order" errors, avoiding misjudgments and thus improving the accuracy of fault detection.
[0014] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0015] Figure 1 This is a schematic diagram illustrating the interaction between a switch system and a server, as shown in an exemplary embodiment of this application. Figure 2 This is a flowchart illustrating a server-side network gray fault detection method according to an exemplary embodiment of this application; Figure 3 This is a schematic diagram illustrating the interaction process between a server and a switch system according to an exemplary embodiment of this application; Figure 4 This is a flowchart illustrating an exemplary embodiment of the present application of a method for detecting network gray faults applied to a second switch; Figure 5 This is a schematic diagram illustrating the structure of a message header according to an exemplary embodiment of this application; Figure 6 This is a flowchart illustrating an exemplary embodiment of the present application of a method for detecting network gray faults applied to a first switch; Figure 7 This is a schematic diagram illustrating a message stream transmission process according to an exemplary embodiment of this application; Figure 8 This is a schematic diagram illustrating a telemetry report reporting method according to an exemplary embodiment of this application; Figure 9 This is a schematic diagram illustrating a message transmission process within a switch system according to an exemplary embodiment of this application; Figure 10 This is a schematic diagram illustrating packet loss rate and detection accuracy in an exemplary embodiment of this application; Figure 11 This is a comparison diagram of fault detection results shown in an exemplary embodiment of this application; Figure 12 This is a hardware structure diagram of a computer device illustrated in an exemplary embodiment of this application. Detailed Implementation
[0016] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0017] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0018] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0019] Segment Routing over IPv6 (SRv6) technology has been widely adopted in numerous large commercial networks to meet the needs of diverse services. However, equipment vendors may implant hardware backdoors, and malicious attackers can even degrade network quality through social engineering techniques such as contaminating fiber optic cables and interfaces. Common methods of such attacks include bribing maintenance personnel to perform covert operations, such as contaminating fiber optic cables and interfaces with tiny particles, or manipulating environmental humidity to induce static electricity buildup. These attacks increase signal loss, leading to difficult-to-detect network performance degradation. Such events (attacks and failures) can compromise the security of routing paths, rendering the network untrustworthy and unreliable.
[0020] Gray faults refer to any abnormal situation in a network that causes non-temporary packet loss and only affects a portion of traffic (i.e., any improper or unexpected behavior). Such anomalies may be caused by malicious attacks, specifically hardware problems (such as fiber optic, interface, or chip failures) or software problems (such as network operating system failures), and the attacked traffic cannot be clearly attributed to a specific data packet or data stream. Therefore, the ability to detect these gray faults in real time is a crucial aspect of network security.
[0021] Packet loss detection typically employs out-of-band and in-band detection methods. Out-of-band detection methods (such as host-based methods) struggle to accurately reflect the true state of packet forwarding, particularly for intermittent anomalies. In-band detection methods, depending on the deployment location of the core function, are divided into centralized solutions centered around the controller and distributed solutions executed within the switch. Controller-centered solutions require centralized processing of large volumes of traffic generated by long routing paths, resulting in unsustainable overhead. Switch-based solutions have high resource requirements and can expose systemic flaws when facing device congestion, out-of-order packets, and clock synchronization deviations, leading to false alarms.
[0022] Based on the above research, this disclosure provides a method for detecting network gray faults. This method is applied to a first switch in a packet transmission path, where the first switch is any switch other than a second switch in the packet transmission path, and the second switch is the ingress switch. In this method, the first switch receives a first verification configuration instruction sent by a server, which instructs the first switch to perform packet loss gray fault detection on the received packet stream. It then receives a target packet stream sent by a preceding switch, which is obtained by the second switch sequentially adding a verification key value to the header of each packet in the packet stream according to the packet arrival order, based on a self-looping key generator. The verification key values carried by each packet in the target packet stream are sequentially XORed and accumulated to determine the verification value of the target packet stream. If the verification value differs from a preset value, it is determined that a packet loss gray fault event exists in the packet stream during transmission.
[0023] In this embodiment, the ingress switch adds a checksum key value to the header of each packet in the packet stream according to the packet arrival order, based on the self-loop key generator, to generate the target packet stream. After receiving the target packet stream sent by the front-end switch, the second switch performs XOR accumulation on the checksum key value carried by each packet in the target packet stream to determine the checksum value of the target packet stream, and compares it with a preset value. In this way, packet loss fault detection can be achieved.
[0024] Furthermore, the fixed sequence key value based on the self-loop key generator and the window XOR accumulation check can accurately distinguish between "packet loss" and "out-of-order" errors, avoiding misjudgments and thus improving the accuracy of fault detection.
[0025] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0026] Please see the appendix Figure 1 This is a schematic diagram illustrating the interaction between a switch system and a server, as shown in an exemplary embodiment of this application. Figure 1 As shown, the switch system 100 includes first switches 20 (such as first switches 20A, 20B, ..., 20N, where N represents an unknown number) and second switches 10. Here, a message transmission path is formed between the second switches 10, the first switches 20A, ..., the first switches 20N. The second switches 10 are the ingress switches, the first switches are all other switches in the message transmission path except the second switches, and the first switches 20N are the egress switches. The server 200 communicates with each of the first switches 20 and the second switches 10. Specifically, each switch is deployed with an agent (or agent process), and the server 200 completes communication with each switch through the agent deployed on the switch.
[0027] It should be noted that the number of switches included in the switch system 100 in this application is not limited.
[0028] For details, please see Figure 2 This is a flowchart illustrating a method for detecting network gray-scale faults on the server side, provided in an embodiment of this application. The method is applied to a server, which can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data, and artificial intelligence platforms.
[0029] like Figure 2 As shown, the method for detecting network gray-scale faults on the server side includes steps S201~S203: S201: In response to the configuration operation, generate segmented routing configuration information, a first verification configuration instruction, and a second verification configuration instruction; the segmented routing configuration information is used to indicate the packet transmission path to be fault detected, the packet transmission path includes a first switch and a second switch, the first switch is the other switch in the packet transmission path except for the second switch, and the second switch is the ingress switch.
[0030] Here, in response to the user's configuration operation, segmented routing configuration information, a first verification configuration command, and a second verification configuration command can be generated.
[0031] For example, users can select a message transmission path with fault detection in the preset configuration interface.
[0032] S202: Send the second verification configuration instruction to the second switch. The second verification configuration instruction is used to instruct the second switch to modify the header of the received packet stream to obtain the target packet stream.
[0033] Server 200 can send the second verification configuration command to the second switch 10 (agent). In this way, the second switch 10 can modify the packet header of the received packet stream to generate the target packet stream.
[0034] S203: Send the first verification configuration instruction to the first switch; the first verification configuration instruction is used to instruct the first switch to perform packet loss fault detection on the target packet stream after receiving the target packet stream sent by the front-end switch.
[0035] Similarly, server 200 also sends the first verification configuration command to the first switch. In this way, after receiving the first verification configuration command, the first switch can perform packet loss fault detection on the target packet stream after receiving the target packet stream sent by the front-end switch.
[0036] For example, please see Figure 3 This is a schematic diagram illustrating the interaction process between the server and the switch system. For example... Figure 3 As shown, in response to the user's configuration operation, server 200 generates segmented routing configuration information, a first verification configuration instruction, and a second verification configuration instruction. It sends the first verification configuration instruction to first switch 20 and the second verification configuration instruction to second switch 10. After receiving the packet stream, second switch modifies the packet header to obtain the target packet stream and sends the target packet stream to first switch 20. After receiving the target packet stream, first switch 20 performs packet loss fault detection on the target packet stream.
[0037] In some implementations, after the first switch 20 detects packet loss faults, if a packet loss gray fault event is detected, the first switch 20 can also generate a telemetry report based on the event information of the packet loss gray fault event and send the telemetry report to the server 200. The server 200 performs fault location based on the received telemetry report to determine the first switch that has failed.
[0038] The following section provides a detailed description of the packet flow processing procedures of the first and second switches.
[0039] Depend on Figure 1 As can be seen, since the second switch 10 is the ingress switch, this application first targets the ingress switch, and combines with... Figure 4 This paper introduces methods for detecting gray network faults.
[0040] Figure 4 A flowchart illustrating a network gray fault detection method applied to a second switch, provided as an exemplary embodiment of this application. Figure 4 As shown, this method is applied to the second switch (i.e., the ingress switch), including S401~S403: S401: Receive the second verification configuration instruction sent by the server. The second verification configuration instruction is used to instruct the second switch to modify the packet header when the received packet stream is the same as the preset packet stream type.
[0041] Here, the second switch can receive the second verification configuration command sent by the server through the proxy. In this way, the second switch can be configured according to the second verification configuration command to modify the packet header when the received packet stream is the same as the preset packet stream type.
[0042] The second verification configuration instruction can be an instruction generated by the user performing a configuration operation. Specifically, the user can edit the segmented routing configuration information, the first verification configuration instruction, and the second verification configuration instruction in the configuration interface displayed on the server side. The segmented routing configuration information is used to indicate the packet transmission path to be detected for faults. For example, the user can select the packet transmission path formed by switch A, switch C, and switch D as the packet transmission path to be detected for faults, or the user can select the packet transmission path formed by switch A, switch B, and switch D as the packet transmission path to be detected for faults.
[0043] The methods for detecting gray-scale network faults on the server side will be described in detail later, and will not be repeated here.
[0044] S402: Receive message stream. If the message stream type is a preset message stream type, add a check key value to the header of each message in the message stream in sequence based on the self-loop key generator to modify the message header and obtain the target message stream.
[0045] After receiving the packet stream, the second switch first determines whether the packet stream type is a preset packet stream type. If it is a preset packet stream type, it adds a check key value to the header of each packet in the packet stream in turn based on the self-loop key generator to modify the packet header and obtain the target packet stream.
[0046] The self-looping key generator is used to cyclically generate a sequence of check key values with a fixed period (e.g., Furthermore, the generation of the check key value is synchronized with the arrival order of the messages; that is, each message is assigned a unique check key value in the order of arrival.
[0047] Here, the preset packet flow type can be set according to actual needs. For example, the preset packet flow type can be divided according to the five-tuple. Specifically, the preset packet flow type can be a packet flow type divided according to the source IP, or it can be a packet flow type divided according to the destination IP, etc., without limitation. Optionally, the preset packet flow type can be pre-configured on the server side. The server side sends the configuration information of the preset packet flow to the ingress switch. In this way, after receiving the packet flow, the ingress switch first performs type matching between the packet flow and the preset packet flow type. If the match is successful, the subsequent packet loss detection process is executed; if the match fails, the subsequent packet loss detection process is not executed.
[0048] Please see Figure 5 This is a schematic diagram of a message header structure provided as an exemplary embodiment of this application. Figure 5 As shown, the message header includes an Ethernet header, an IPv6 basic header, a segmented routing header, a segmented list, an additional header, and a payload. Unlike traditional message headers, the message header in this application includes an additional header: the additional header contains fields such as a type field, a flow ID field, and a check sequence field, which are used to identify the flow, type, and sequence information to which the message belongs, assisting in flow management or verification.
[0049] Optionally, when adding a checksum key value to the header of each packet in the packet stream sequentially based on the self-loop key generator to modify the packet header and obtain the target packet stream, the self-loop key generator sequentially generates a corresponding checksum key value for the currently arriving packet and writes the checksum key value into the checksum sequence field of the packet header to modify the packet header and obtain the target packet stream.
[0050] S403: Send the target packet stream to the first switch; the first switch is another switch in the packet transmission path besides the second switch, and the first switch is used to perform packet loss gray fault detection based on the verification key value carried by the target packet stream according to the indication information of the first verification configuration instruction sent by the server.
[0051] After generating the target packet stream, the second switch sends the target packet stream to the first switch for reception. Figure 1 For example, if the first switch 20 includes the first switch (20A), switch (20B), ..., switch (20N), then the target packet flow will be transmitted to each of the downstream switches in sequence, and each of the downstream switches will perform packet loss gray fault detection based on the check key value carried by the target packet flow.
[0052] The content regarding the gray-scale fault detection of packet loss by the first switch will be discussed later (see [link]). Figure 6 (This will be introduced in more detail here.)
[0053] Please see the appendix Figure 6 The flowchart illustrates a method for detecting network gray faults applied to a first switch, as an exemplary embodiment of this application. Figure 6 As shown, the network gray fault detection method in this embodiment of the present disclosure is applied to, for example, Figure 1 The first switch shown in the figure includes the following steps S601~S604: S601: Receive the first verification configuration instruction sent by the server. The first verification configuration instruction is used to instruct the first switch to perform packet loss gray fault detection on the received packet stream.
[0054] Here, the first switch can receive the first verification configuration command sent by the server through the proxy, so that the first switch can be configured according to the first verification configuration command to perform packet loss gray fault detection on the received packet stream.
[0055] S602: Receive the target packet stream sent by the front-end switch. The target packet stream is obtained by the second switch by adding a checksum key value to the header of each packet in the packet stream in the order of packet arrival, based on the self-loop key generator.
[0056] Here, the front-end switch can refer to the upstream switch adjacent to the first switch, in order to... Figure 1 For example, if the first switch is the first switch (20A), then the front-end switch is the second switch 10; if the first switch is the first switch (20B), then the front-end switch is the first switch (20A).
[0057] S603: Perform XOR accumulation on the check key value carried by each packet in the target packet stream to determine the check value of the target packet stream.
[0058] For example, the checksum key values of each packet in the target packet stream are as follows: Then, each check key value is XORed and accumulated sequentially, that is, Here, since the messages arrive sequentially, it is necessary to perform XOR accumulation on the checksum key value of the currently arriving message to obtain the checksum value of the target message stream.
[0059] S604: If the check value is different from the preset value, it is determined that there is a packet loss gray fault event in the transmission process of the message stream.
[0060] After obtaining the checksum of the target packet stream, the checksum can be compared with the preset value. Here, since the checksum key value is a fixed checksum key value generated periodically by the self-loop key generator, it can be determined that the preset value of the target packet stream is known in the absence of packet loss. Therefore, the checksum can be compared with the preset value. If they are the same, it means that no packet loss has occurred. If they are different, it means that the checksum key value is missing, which indicates that there is a packet loss gray fault event.
[0061] In this application, the first switch determines the check value of the target packet flow by sequentially performing XOR accumulation on the check key value carried by each packet in the target packet flow, and compares it with a preset value. In this way, the detection accuracy of packet loss gray fault events can be improved.
[0062] Optionally, in step S603, when performing XOR accumulation on the verification key values carried by the target packet stream to determine the verification value of the target packet stream, the target packet stream can be sequentially trunculated according to a preset verification sliding window. For any sub-packet stream trunculated at any given time, a first verification value of the sub-packet stream is determined based on the verification key value carried by each packet in the sub-packet stream. If the first verification value of at least one sub-packet stream is different from the first preset value, it is determined that the packet stream has a packet loss gray fault event during transmission.
[0063] The values of the verification sliding window can be set according to actual needs, and are not limited here.
[0064] In this embodiment, the target packet stream is sequentially slid-trimmed by a verification sliding window, and the sub-packet streams are locally verified. That is, based on the verification key value carried by each packet in the sub-packet stream, a first verification value is determined, and the first verification value is compared with a first preset value. If the first verification value of at least one sub-packet stream is different from the first preset value, it is determined that there is a packet loss gray fault event in the packet stream during transmission.
[0065] It should be noted that the above-mentioned sliding interception of the target packet stream based on the verification sliding window refers to interception without repetition. For example, if the target packet stream includes packets A1 to A8 and the size of the verification sliding window is 4, then the sub-packet stream obtained by the first interception is A1 to A4, and the sub-packet stream obtained by the second interception is A5 to A8.
[0066] In this embodiment, the first switch detects packet loss by verifying the sub-packet stream within the verification window. Compared with related technologies that compare the number of packets sent by the front-end switch and the number of packets received by the first switch within a preset time period, this avoids dependence on clock synchronization.
[0067] In some implementations, to reduce false alarms caused by out-of-order packets, this application can also perform joint verification on the sub-packet streams captured multiple times by the verification sliding window. Specifically, the first verification value of each sub-packet stream can be stored in a register. If the first verification value of any sub-packet stream is different from a first preset value, the first verification values corresponding to a preset number of sub-packet streams, including the sub-packet stream, are read from the register, and the first verification values corresponding to the multiple sub-packet streams are XORed and accumulated to obtain a second verification value. The multiple sub-packet streams refer to the sub-packet stream and a preset number of other sub-packet streams that arrive after the arrival time of the sub-packet stream.
[0068] The preset quantity can be set according to actual needs, such as 2 or 3, etc., without limitation.
[0069] For example, with a preset number of 2, if the multiple intercepted sub-message streams include sub-message stream A, sub-message stream B, sub-message stream C, and sub-message stream D, and if the first check value of sub-message stream A is different from the first preset value, then the first check values corresponding to sub-message stream B and sub-message stream C are read from the register respectively, and then each check value is XORed and accumulated to obtain the second check value.
[0070] Furthermore, if the second check value corresponding to at least one of the sub-message streams is different from the second preset value, it indicates that the message stream has a packet loss gray fault event during transmission.
[0071] Similarly, if the second check value is the same as the second preset value, it indicates that there is an out-of-order situation among the sub-message streams captured in different times. Thus, it can be determined that there is an out-of-order fault event in the sub-message stream during transmission.
[0072] In this embodiment, the secondary fault determination is completed by the above method, which can reduce false alarms.
[0073] In this application, the process of forwarding packets can be handled by the data plane (i.e., chip) of the switch, while the process of jointly verifying the sub-packet streams captured multiple times by the verification sliding window can be executed by the control plane (i.e., processor (CPU)) in the first switch.
[0074] Optionally, if the first switch is an egress switch, after completing the gray-scale fault detection of packet loss, the egress switch can delete the checksum key value in the header of each packet in the target packet flow. This can avoid the additional header from having other effects on the forwarding path.
[0075] In this embodiment of the application, after determining that there is a packet loss gray fault event in the transmission of the message stream, the relevant information of the packet loss gray fault event can also be uploaded to the server.
[0076] Furthermore, if the first switch is not the egress switch, and there is no packet loss gray fault event during the transmission of the packet flow, the first switch will add a new check key value to the header of each packet in the packet flow based on the self-loop key generator (that is, based on the new check key value, the check key value carried by the received packet flow is overwritten) to update the target packet flow, and send the updated target packet flow to the downstream first switch.
[0077] Please see Figure 7 This is a schematic diagram illustrating a message stream transmission process provided in an exemplary embodiment of this application. Figure 7 As shown, the second switch (ingress switch) receives a packet stream containing multiple packets. The second switch uses a self-looping key generator to sequentially insert checksum key values into the packet headers according to the arrival order to generate a target packet stream. When transmitting the target packet stream to the first switch, packet loss occurs (as shown by the white square 01 in the figure). The first switch receives the target packet stream and sequentially segments it using a checksum sliding window. Each segment yields a sub-packet stream. As can be seen from the figure, if packet loss occurs, a checksum key value will be missing, which means that the first checksum value will differ from the first preset value. Therefore, the first detection will consider that the sub-packet stream has a packet loss gray fault event.
[0078] Furthermore, since the switch forwards data through the data plane (i.e., the chip), without affecting data forwarding, the switch performs secondary fault verification through the control plane (i.e., the CPU) to eliminate out-of-order faults, such as... Figure 7 As shown, both sub-message streams 70 and 71 were detected as having packet loss gray faults. By performing cross-window verification on these two sub-message streams, it was determined that packet 02 in sub-message stream 70 and packet 03 in sub-message stream 71 were out of order, and there was no packet loss gray fault event.
[0079] Optionally, in order to reduce telemetry bandwidth and reduce server-side overhead, this application can selectively upload information based on the self-information of the packet loss gray fault event when uploading relevant information to the server. Specifically, it includes the following steps (1) to (3): (1) Determine at least one observation network segment associated with the packet loss gray fault event and the total number of switches in each observation network segment; the observation network segment is a segment of the packet transmission path.
[0080] Here, when determining at least one observation network segment associated with a packet loss gray fault event, fault association information (such as the packet flow identifier corresponding to the packet loss gray fault event, the check key value carried in the packet, and the upstream and downstream switches) can be obtained based on the first check value. In this way, at least one observation network segment associated with the packet loss gray fault information can be determined according to the information of the packet transmission path. Here, the observation network segment may include a single switch or a link formed by multiple switches.
[0081] For example, if a packet loss gray fault event is associated with only a single switch port (e.g., only the output port of node E has no packet forwarding record), then it matches "single-node observation network segment (node E)"; if a packet loss gray fault event is associated with links of multiple adjacent switches (e.g., packet anomalies are detected on the output port of node C, the forwarding path of node D, and the input port of node E), then it matches "multi-node area predefined network segment (CDE segment)".
[0082] (2) For each observed network segment, the self-information value of the packet loss gray fault event occurring in the observed network segment is determined based on the independent packet loss probability of each switch in the observed network segment and the total number of switches.
[0083] In this embodiment, the self-information of the event is introduced. Under given network environment conditions, the self-information of the event can be expressed as shown in formula (1): (1) in, For the event In network parameters The probability of occurrence of the following.
[0084] Set up network segment It contains l forwarding devices, each with an independent probability of violation. Then in The self-information of a packet loss gray fault event can be expressed as formula (2): (2) When the overall violation rate of the network is low, the self-information of the "no packet loss" event is approximated as shown in formula (3): (3) Based on the above formula, the self-information value of the packet loss gray fault event occurring in each observation network segment can be determined.
[0085] (3) Based on the observation network segment information corresponding to the maximum self-information value and the packet loss gray fault event, generate a telemetry report and send the telemetry report to the server.
[0086] Based on the above self-information calculation logic, network segments consisting of fewer devices with lower device reliability (higher probability of independent violations) have higher self-information values when packet loss events occur, and such packet loss events have more significant reference value for gray fault location.
[0087] To achieve efficient telemetry, the agent process deployed on the switch periodically reports telemetry data according to a preset cycle (using the device's internal timestamp, eliminating the need for network-wide time synchronization). Each switch only reports the telemetry data corresponding to the packet loss gray fault event with the highest self-information value observed by it (e.g., Figure 7 (As shown).
[0088] Figure 8 This is a schematic diagram illustrating a telemetry report submission method as provided in an exemplary embodiment of this application. Figure 8 As shown, each observation network segment includes BCDE, DE, and CDE. The switch calculates the self-information values corresponding to each observation network segment through the agent, which are 0.25, 0, and 0.33, respectively. Figure 8 As can be seen, the maximum self-information value is 0.33. The observation network segment information corresponding to the maximum self-information value and the packet loss gray fault event are used to generate a telemetry report, which is then sent to the server. The server receives the telemetry reports reported by each switch. By making fault assumptions and logical inferences for the links that have not received telemetry reports, the network violation location can be completed. That is, switch C can be located as the fault location.
[0089] The following is combined Figure 9This section provides a detailed introduction to the message transmission process in a switch system. Figure 9 This is a schematic diagram of a message transmission process within a switch system, provided as an exemplary embodiment of this application.
[0090] like Figure 9 As shown, the second switch 91 is the ingress switch. The second switch 91 receives the packet stream and, according to the order of packet arrival, adds a checksum key value to the header of each packet in the packet stream in sequence based on the self-loop key generator to generate the target packet stream. The second switch 91 sends the target packet stream to the first switch 92.
[0091] The first switch 92 performs packet loss gray fault detection on the target packet flow. Specifically, it sequentially performs XOR accumulation on the checksum key value carried by each packet in the target packet flow to determine the checksum value of the target packet flow. If the checksum value is different from the preset value, it is determined that there is a packet loss gray fault event in the packet flow during transmission. In the case of a packet loss gray fault event, the target packet flow can be intercepted and reported. If the checksum value is the same as the preset value, it is determined that there is no packet loss gray fault event in the packet flow during transmission. If there is no packet loss gray fault event, a new checksum key value can be added to the header of each packet in the packet flow sequentially based on the self-loop key generator to update the target packet flow. The updated target packet flow is then forwarded, that is, the target packet flow is sent to the first switch 93.
[0092] Here, since the first switch 93 is not an egress switch, the first switch 93 performs the same packet loss fault detection mechanism as the first switch 92. After the detection is completed, the updated target packet stream (the new checksum key value added by the first switch 93 is different from the new checksum key value added by the first switch 92) is sent to the first switch 94. The first switch 94 performs the same packet loss fault detection mechanism as the first switch 92. After the detection is completed, since the first switch 94 is an egress switch, the first switch 94 will delete the checksum key value carried in the target packet stream, thereby restoring the initial packet stream.
[0093] This application, in addition to the above-described method, also evaluates the detection accuracy of the method. Please see [link to relevant documentation]. Figure 10 This is a schematic diagram illustrating packet loss rate and detection accuracy, provided as an exemplary embodiment of this application. Figure 10 As shown, the analysis focuses on the number of packets in the packet flow and the packet loss rate. The packet loss rate increases from 0.1% to 95%, and the number of packets in the packet flow increases from 10 to 100,000. Green numbers represent completely reliable fault location results, yellow numbers represent partially reliable results, and red numbers represent location failures.
[0094] When the number of packets in each packet stream is small (e.g., 10, 100), only partially reliable fault location can be achieved in some scenarios with high packet loss rates (e.g., 50%, 95%), and location fails in most cases. When the number of packets in each packet stream reaches 1000 or more, except for the very special scenario with a packet loss rate of 95%, completely reliable fault location can be achieved at almost all packet loss rates. The overall trend of the detection results is that the more packets in each packet stream, the stronger the reliability of fault location, and the reliability is greatly improved when the packet loss rate is in the middle range (1%~50%).
[0095] Furthermore, this application compares the above methods with related technologies; please refer to [link / reference needed]. Figure 11 This is a telemetry event rate comparison chart provided in an embodiment of this application. Figure 11 The difference in telemetry event rates between the "baseline method" and the "this method (selective telemetry)" in different networks is shown. The horizontal axis represents the network type, including Bell Canada, US Signal, WaveNet, Tata, Coggent, and Sprint; the vertical axis represents the telemetry event rate. Data comparison: The baseline method (red diagonal bars) generally has a higher telemetry event rate in all networks; the this method (blue square bars) has a significantly lower telemetry event rate than the baseline method in all networks, with a particularly noticeable decrease in the WaveNet.
[0096] Based on the above analysis, it can be seen that after using selective telemetry (selectively uploading telemetry reports), the number of event reports for "telemetry events (i.e., uploaded telemetry reports)" in the figure is reduced by about 1 / 3, which effectively reduces telemetry bandwidth overhead and server aggregation pressure. This verifies the advantages of selective telemetry in reducing redundant event reports and optimizing network telemetry efficiency, while maintaining full visibility of all gray faults.
[0097] Corresponding to the above-described method for detecting network gray-scale faults, this disclosure also provides a computer device, such as... Figure 12 The diagram shown is a structural schematic of a computer device provided in an embodiment of this disclosure. Figure 12 As shown, the computer device 1200 includes a processor 1210, an internal bus 1220, memory 1230, a network interface 1240, and non-volatile memory 1250, and may also include other hardware required for its functions. One or more embodiments of this specification can be implemented in software, for example, the processor 1210 reads the corresponding computer program from the non-volatile memory 1250 into the memory 1230 and then runs it. Of course, besides software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0098] The memory 1230, also known as internal memory, is used to temporarily store the computational data in the processor 1210, as well as the data exchanged with non-volatile memory 1250 such as hard disk. The processor 1210 exchanges data with the non-volatile memory 1250 through the memory 1230.
[0099] In this embodiment, memory 1230 is specifically used to store application code that executes the solution of this application, and its execution is controlled by processor 1210. That is, when the computer device is running, processor 1210 communicates with network interface 1240, memory 1230 and non-volatile memory 1250 through internal bus 1220, so that processor 1210 executes the application code stored in memory 1230 and non-volatile memory 1250, thereby executing the network gray fault detection method described in the above method embodiment.
[0100] Processor 1210 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware microservices. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.
[0101] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the computer device 1200. In other embodiments of this application, the computer device 1200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0102] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the network gray-field fault detection method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0103] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the network gray fault detection method in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0104] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0105] The embodiments of the subject matter and functional operation described in this specification can be implemented in the following ways: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof.
[0106] The processing and logic flow described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flow can also be executed by dedicated logic circuitry—such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the device can also be implemented as dedicated logic circuitry.
[0107] Computers suitable for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory and / or random access memory. Basic computer microservices include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.
[0108] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.
[0109] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.
[0110] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and microservices in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program microservices and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0111] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.
[0112] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for detecting network gray failure, characterized in that, A first switch applied to a message transmission path, the first switch being other switches in the message transmission path except a second switch, the second switch being an ingress switch; the method comprises: receiving a first check configuration instruction sent by a server, the first check configuration instruction being used for instructing the first switch to perform a packet loss gray fault detection on a received message flow; receiving a target message flow sent by a previous stage switch, the target message flow being obtained by the second switch by adding check key values to message headers of each message in the message flow in sequence based on a self-loop key generator according to a message arrival order; performing an exclusive or accumulation processing on the check key values carried by each message in the target message flow in sequence to determine a check value of the target message flow; in a case where the check value is different from a preset value, determining that there is a packet loss gray fault event in a transmission process of the message flow.
2. The method of claim 1, wherein, The performing of the exclusive or accumulation processing on the check key values carried by the target message flow in sequence to determine the check value of the target message flow comprises: performing a sliding interception on the target message flow according to a preset check sliding window, and determining a first check value of a sub-message flow intercepted at each time based on the check key values carried by each message in the sub-message flow; The determining of the packet loss gray fault event in the transmission process of the message flow in the case where the check value is different from the preset value comprises: in a case where the first check value of any one of the sub-message flows is different from a first preset value, determining that there is the packet loss gray fault event in the transmission process of the message flow.
3. The method of claim 2, wherein, The first switch comprises a register; the method further comprises: storing the first check value of each of the sub-message flows to the register; The determining of the packet loss gray fault event in the transmission process of the message flow in the case where the first check value of any one of the sub-message flows is different from the first preset value comprises: in the case where the first check value of any one of the sub-message flows is different from the first preset value, reading, from the register, first check values respectively corresponding to a preset number of sub-message flows including the sub-message flow, and performing an exclusive or accumulation processing on the first check values respectively corresponding to the plurality of sub-message flows to obtain a second check value; the plurality of sub-message flows refer to the sub-message flow and a preset number of other sub-message flows after an arrival time sequence of the sub-message flow; if the second check value corresponding to at least one of the sub-message flows is different from a second preset value, determining that there is the packet loss gray fault event in the transmission process of the message flow.
4. The method of claim 3, wherein, The method further comprises: if the second check value is the same as the second preset value, determining that there is an out-of-order fault event in the transmission process of the sub-message flow.
5. The method of claim 1, wherein, The first switch comprises an egress switch; the method further comprises: after completing the packet loss gray fault detection, deleting the check key values in the message headers of each message in the target message flow.
6. The method of claim 5, wherein, The method comprises: If the first switch is not an egress switch and there is no packet loss gray fault event in the transmission process of the packet flow, a new check key value is added to the packet header of each packet in the packet flow in turn based on a self-loop key generator to update the target packet flow.
7. The method according to any of claims 1 to 6, characterized in that After the determination that there is a packet loss gray fault event in the transmission process of the packet flow, the method further comprises: determining at least one observed network segment associated with the packet loss gray fault event and the total number of switches in each observed network segment; the observed network segment is a segment in the packet transmission path; for each observed network segment, determining a self-information value of the packet loss gray fault event occurring in the observed network segment according to the independent packet loss probability of each switch in the observed network segment and the total number of switches; generating a telemetry report based on the observed network segment information corresponding to the maximum self-information value and the packet loss gray fault event, and sending the telemetry report to a server.
8. A method of detecting network gray failure, the method comprising: The second switch is applied to a packet transmission path, and the second switch is an ingress switch in the packet transmission path; the method comprises: receiving a second check configuration instruction sent by a server, the second check configuration instruction being used to instruct the second switch to perform packet header modification processing in the case that a received packet flow is of the same type as a preset packet flow type; receiving a packet flow, and in the case that the type of the packet flow is a preset packet flow type, adding a check key value to the packet header of each packet in the packet flow in turn based on a self-loop key generator to achieve modification of the packet header, thereby obtaining a target packet flow; sending the target packet flow to a first switch; the first switch is a switch other than the second switch in the packet transmission path, and the first switch is used to perform packet loss gray fault detection based on the check key value carried by the target packet flow according to the indication information of the first check configuration instruction sent by the server.
9. The method of claim 8, wherein, The packet header comprises a check sequence field; the adding of the check key value to the packet header of each packet in the packet flow in turn based on the self-loop key generator to achieve modification of the packet header and obtain a target packet flow comprises: generating a corresponding check key value for a currently arrived packet in turn based on the self-loop key generator, and writing the check key value into the check sequence field of the packet header of the packet to achieve modification of the packet header and obtain a target packet flow.
10. A method of detecting network gray failure, the method comprising: The method applied to a server comprises: in response to a configuration operation, generating segment routing configuration information, a first check configuration instruction and a second check configuration instruction; the segment routing configuration information is used to indicate a packet transmission path to be subjected to fault detection, and the packet transmission path comprises a first switch and a second switch; the first switch is a switch other than the second switch in the packet transmission path, and the second switch is an ingress switch. sending the second check configuration instruction to the second switch, the second check configuration instruction being used to instruct the second switch to perform packet header modification processing on a received packet flow to obtain a target packet flow; sending the first check configuration instruction to the first switch, the first check configuration instruction being used to instruct the first switch to perform packet loss fault detection on the target packet flow after receiving the target packet flow sent by a previous stage switch.
11. A switch system, characterized by The method comprises the following steps: The second switch is configured to receive a second check configuration instruction sent by a server, and based on the second check configuration instruction, add a check key value to the packet header of each packet in the received packet flow in sequence based on a self-loop key generator, generate a target packet flow, and send the target packet flow to the first switch, when the received packet flow is a preset packet flow type. The first switch is configured to receive a first check configuration instruction sent by the server, and based on the first check configuration instruction, perform exclusive-OR accumulation processing on the check key values carried by the target packet flow in sequence, determine a check value of the target packet flow, and determine that there is a packet loss gray fault event in the transmission process of the packet flow when the check value is different from a preset value.
12. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the method of any one of claims 1-10.
13. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the steps of the method of any one of claims 1-10.