Network detection method, apparatus, device, and storage medium

CN115242693BActive Publication Date: 2026-11-03ZTE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110437918.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-22
Publication Date
2026-11-03
Estimated Expiration
2041-04-22

AI Technical Summary

Technical Problem

Traditional network detection methods are incomplete and cannot meet users' needs for efficient detection, nor can they detect faults in communication networks in a timely manner.

Method used

By sending SBFD messages with ports from a preset port set as source ports to the device under test and obtaining response information, the transmission path between the testing device and the device under test is changed until all ports in the port set are source ports, thereby achieving fault detection on all transmission paths.

Benefits of technology

It enables comprehensive detection of all transmission paths in the communication network, improves the fault detection rate, and can detect network faults in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115242693B_ABST
    Figure CN115242693B_ABST
Patent Text Reader

Abstract

The application provides a network detection method, device, equipment and storage medium. The method comprises the following steps: sending a current SBFD packet to a to-be-detected device through a current transmission path between the detection device and the to-be-detected device; obtaining current response information of the to-be-detected device to the current SBFD packet; sending a next SBFD packet to the to-be-detected device through a next transmission path between the detection device and the to-be-detected device; obtaining next response information of the to-be-detected device to the next SBFD packet; until all SBFD packets in which ports in a preset port set are source ports are sent to the to-be-detected device, and the response information of the to-be-detected device to all SBFD packets is obtained; and determining a first detection result of the transmission path between the detection device and the to-be-detected device according to the response information of the to-be-detected device to all SBFD packets. The method can realize fault detection of all transmission paths between the detection device and the to-be-detected device, so that the network detection is more comprehensive, and the fault discovery rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communications, and more specifically to a network detection method, apparatus, device, and storage medium. Background Technology

[0002] With the rapid development of communication technology, especially the rapid advancement of 5G networks, increasingly stringent requirements are being placed on fault diagnosis of communication networks. Maintenance personnel desire more comprehensive and efficient network detection to promptly identify various problems across the network and facilitate rapid fault location. However, traditional network detection methods are incomplete and cannot meet users' needs. Summary of the Invention

[0003] This application provides methods, apparatus, devices, and storage media for network detection.

[0004] In a first aspect, embodiments of this application provide a network detection method applied to a detection device, the method comprising:

[0005] The current SBFD message is sent to the device under test via the current transmission path between the detection device and the device under test. The source port in the current SBFD message is a port in a preset port set. The number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test. The current response information of the device under test to the current SBFD message is then obtained.

[0006] The next SBFD message is sent to the device under test via the next transmission path, wherein the source port in the next SBFD message is another port in a preset port set; and the next response information of the device under test to the next SBFD message is obtained.

[0007] The process continues until all SBFD messages with the source port in the preset port set have been sent to the device under test, and the response information of the device under test to all SBFD messages has been obtained.

[0008] The first detection result of the transmission path between the detection device and the device under test is determined based on the response information of the device under test to all SBFD messages.

[0009] Secondly, embodiments of this application provide a network detection device integrated into a detection equipment, the device comprising:

[0010] The first sending module is used to send a current SBFD message to the device under test via the current transmission path between the device and the device under test. The source port in the current SBFD message is a port in a preset port set, and the number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test. The first obtaining module is used to obtain the current response information of the device under test to the current SBFD message.

[0011] The first sending module is further configured to send a next SBFD message to the device under test via the next transmission path between the device and the device under test, wherein the source port in the next SBFD message is another port in a preset port set; the first obtaining module is further configured to obtain the next response information of the device under test to the next SBFD message;

[0012] The first sending module is further configured to send SBFD messages with all preset port sets as source ports to the device under test; the first obtaining module is further configured to obtain the response information of the device under test to all SBFD messages.

[0013] The first determining module is used to determine the first detection result of the transmission path between the detection device and the device under test based on the response information of the device under test to all SBFD messages.

[0014] Thirdly, embodiments of this application provide a network detection device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the network detection method provided in the first aspect of embodiments of this application.

[0015] Fourthly, embodiments of this application provide a storage medium storing a computer program, which, when executed by a processor, implements the steps of the network detection method provided in the first aspect of embodiments of this application.

[0016] The network detection method, apparatus, device, and storage medium provided in this application embodiment, because the number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test, and because the transmission path between the detection device and the device under test can be changed by changing the source port of the SBFD message, can achieve fault detection of one of the transmission paths between the device under test and the device under test by sending SBFD messages with ports in the preset port set as source ports to the device under test. Thus, after all SBFD messages with ports in the preset port set as source ports have been sent to the device under test, fault detection of all transmission paths between the detection device and the device under test can be achieved through the response information of the device under test to all SBFD messages. That is, all transmission paths can be detected, making network detection more comprehensive and improving the fault detection rate. Attached Figure Description

[0017] Figure 1 A system architecture diagram applicable to the network detection method provided in the embodiments of this application;

[0018] Figure 2 A schematic flowchart of a network detection method provided in an embodiment of this application;

[0019] Figure 3 Another system architecture diagram applicable to the network detection method provided in the embodiments of this application;

[0020] Figure 4 Another schematic flowchart of the network detection method provided in the embodiments of this application;

[0021] Figure 5 A schematic diagram of the network detection device provided in an embodiment of this application;

[0022] Figure 6 This is a schematic diagram of a network detection device provided in an embodiment of this application. Detailed Implementation

[0023] Figure 1 This is a system architecture diagram applicable to the network detection method provided in the embodiments of this application. (See diagram below.) Figure 1 As shown, the system may include a detection device 101 and multiple devices 102 to be tested. The multiple devices 102 to be tested form one or more networks, which may be a service network, a management network, or a storage network. The detection device 101 is used to detect the network formed by the multiple devices 102 to promptly identify faults in the network. Optionally, the detection device 101 may be a standalone server or a server cluster; this embodiment does not limit this.

[0024] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be arbitrarily combined with each other.

[0025] It should be noted that the executing entity of the following method embodiments can be a network detection device, which can be implemented as the above-mentioned detection equipment through software, hardware, or a combination of software and hardware. The following method embodiments are described using the example of a detection device as the executing entity (i.e., the following method embodiments are applied to a detection device).

[0026] Figure 2 This is a schematic flowchart illustrating a network detection method provided in an embodiment of this application. This embodiment describes the specific process by which a detection device detects all transmission paths between the detection device and the device under test. Figure 2 As shown, the method may include:

[0027] S201. Send a current Seamless Bidirectional Forwarding Detection (SBFD) message to the device under test through the current transmission path between the device and the device under test, and obtain the current response information of the device under test to the current SBFD message.

[0028] In this context, the source port in the current SBFD message is a port from a preset port set, and the number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test.

[0029] The aforementioned device under test is a device in the network that requires transmission path detection. Typically, there are multiple transmission paths between the detection device and the device under test. To improve the comprehensiveness of the detection, fault detection is needed for each transmission path. This embodiment provides a detection method based on SBFD, which can detect all transmission paths between the detection device and the device under test. Specifically, the detection device can use SBFD messages to detect the transmission path between the detection device and the device under test. Simultaneously, the detection device can allocate transmission paths using the five-tuple of the SBFD message. The five-tuple is used to distinguish different sessions and can include the source port, destination port, source Internet Protocol address (IP), destination IP address, and transport layer protocol. The source port is the port of the detection device, the source IP address is the IP address of the detection device, the destination port is the port of the device under test, the destination IP address is the IP address of the device under test, and the transport layer protocol refers to the transport layer protocol used between the detection device and the device under test, such as User Datagram Protocol (UDP). In this way, the detection device can change the transmission path between the detection device and the device under test by changing the source port in the five-tuple. To this end, a preset port set is pre-defined, wherein the number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test, so that the detection device can traverse all transmission paths by changing the source port in the quintuple. Optionally, the port values ​​in the preset port set can be in the range of [49152, 49251], and the number of ports can be 100, which is much greater than the number of transmission paths between the detection device and the device under test.

[0030] Before performing a detection task using SBFD messages, SBFD detection parameters can be pre-configured, such as the first time threshold (used to determine whether the response message of the SBFD message has been successfully obtained), the initiator descriptor (i.e., the descriptor of the detection device), the reflector descriptor (i.e., the descriptor of the device to be detected), and the first detection frequency. In specific implementations, the first time threshold and the first detection frequency can be set based on the detection requirements; for example, the first detection frequency can be set to 5 seconds.

[0031] The aforementioned current SBFD message is the SBFD message corresponding to the current detection period. The detection device can allocate a transmission path based on the source port in the current SBFD message; that is, the current transmission path is the transmission path allocated within the current detection period, used to transmit the current SBFD message. In this way, the detection device sends the current SBFD message to the device under test in the network through the allocated current transmission path and detects whether it receives a response message from the device under test for the current SBFD message within a first time threshold. If a response message from the device under test for the current SBFD message is received within the first time threshold, the detection device can also calculate the response duration of the device under test for the current SBFD message.

[0032] S202. Send the next SBFD message to the device under test through the next transmission path between the device and the device under test, and obtain the next response information of the device under test to the next SBFD message.

[0033] In this context, the source port in the next SBFD message is another port in a preset port set. The next SBFD message corresponds to the next detection cycle. The detection device can allocate a transmission path based on the source port in the next SBFD message; that is, the next transmission path is the transmission path allocated within the next detection cycle for transmitting the next SBFD message. Furthermore, the source port of the next SBFD message is different from that of the current SBFD message; therefore, the next transmission path allocated by the detection device is different from the current transmission path.

[0034] As time progresses, upon the arrival of the next detection cycle, the detection device sends the next SBFD message to the device under test in the network via the allocated next transmission path, and checks whether it receives a response message from the device under test for the next SBFD message within the first time threshold. If a response message from the device under test for the next SBFD message is received within the first time threshold, the detection device can also calculate the response time of the device under test for the next SBFD message.

[0035] S203. Continue until all SBFD messages with ports as source ports in the preset port set have been sent to the device under test, and obtain the response information of the device under test to all SBFD messages.

[0036] In this system, the source port of each SBFD message is another port in a preset port set, and the source port of each SBFD message is different. When the source port in an SBFD message changes, the detection device will reallocate a transmission path for that SBFD message. In this way, the detection device sequentially sends SBFD messages with ports in the preset port set as source ports to the device under test through the corresponding transmission paths, until all SBFD messages with ports in the preset port set as source ports have been sent to the device under test. The device then detects whether it receives a response message from the device under test for all SBFD messages within a first time threshold, thus enabling the detection of all transmission paths.

[0037] S204. Determine the first detection result of the transmission path between the detection device and the device under test based on the response information of the device under test to all SBFD messages.

[0038] Specifically, the detection device can determine the first detection result of the transmission path between the detection device and the device under test based on whether it obtains the response message of each SBFD message within the first time threshold.

[0039] Optionally, the above S204 process can be as follows: if not all response information of the device under test to all SBFD messages is obtained, it is determined that at least one transmission path between the testing device and the device under test is faulty; if all response information of the device under test to all SBFD messages is obtained, it is checked whether the response information of each SBFD message matches the data content of the SBFD message. If they all match, it is determined that the transmission path between the testing device and the device under test is normal; otherwise, it is determined that at least one transmission path between the testing device and the device under test is faulty.

[0040] Specifically, if the current SBFD message is sent to the device under test via the current transmission path, and a response message from the device under test is received within the first time threshold, the current transmission path is considered fault-free; otherwise, it is considered faulty. Similarly, if the next SBFD message is sent to the device under test via the next transmission path, and a response message is received within the first time threshold, the next transmission path is considered fault-free; otherwise, it is considered faulty. This process continues until, after the detection device sends SBFD messages to the device under test via different transmission paths, if a response message is not received from the device under test within the first time threshold, at least one transmission path between the detection device and the device under test is considered faulty. If all response information of the device under test to each SBFD message is obtained within the first time threshold, it is also necessary to check whether the response message of the SBFD message is incorrect, that is, to check whether the response message of the SBFD message matches the data content of the sent SBFD message. If they match, it is determined that the transmission path between the testing device and the device under test is normal; otherwise, it is determined that at least one transmission path between the testing device and the device under test is faulty.

[0041] The network detection method provided in this application embodiment has the advantage that, since the number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test, and the transmission path between the detection device and the device under test can be changed by altering the source port of the SBFD message, fault detection of one of the transmission paths between the two devices can be achieved by sending SBFD messages with ports in the preset port set as source ports to the device under test. Thus, after all SBFD messages with ports in the preset port set as source ports have been sent to the device under test, fault detection of all transmission paths between the detection device and the device under test can be achieved through the response information of the device under test to all SBFD messages. In other words, all transmission paths can be detected, making network detection more comprehensive and improving the fault detection rate.

[0042] In one embodiment, such as Figure 3 As shown, optionally, the device under test is electrically connected to the gateway (GW) device 103 in the network, and the testing device accesses the GW device through a Virtual Extensible LAN (VxLAN) tunnel. Based on this system architecture, when using the SBFD detection method, optionally, before the above S201, the method further includes: obtaining a port from a preset port set, using that port as the source port, and generating the current SBFD message.

[0043] The detection device obtains ports from a preset port set and checks if the port is idle. If idle, it uses that port as the source port and encapsulates a UDP detection packet using the source port, a pre-configured initiator descriptor, a reflector descriptor, and a destination port (the common destination port for SBFD is 7784). The encapsulated UDP detection packet is then identified as the current SBFD packet. In practical applications, the detection device can obtain ports from the preset port set in ascending, descending, or random order of port size; this embodiment does not limit this.

[0044] Correspondingly, based on this system architecture, the specific process of S201 above can be: sending the current SBFD message to the GW device through the VxLAN tunnel, so that the GW device can send the current SBFD message to the device under test through the current transmission path between the GW device and the device under test.

[0045] In this way, the detection device generates the current SBFD message and sends the generated current SBFD message to the GW device through the VxLAN tunnel. The GW device then forwards the SBFD message to the device under test. Compared with the traditional method of logging into the GW device to distribute detection messages, this reduces the resource overhead on the GW device. This allows the network diagnostic frequency to be increased to the second level, so that faults in the network can be detected in a timely manner, further improving the fault detection rate.

[0046] In one embodiment, a detection method based on the Internet Control Message Protocol (ICMP) is also provided. The detection method will be described in detail below, as follows: Figure 4 As shown, the method also includes:

[0047] S401. Send the current ICMP message to the device under test and obtain the current response information of the device under test to the current ICMP message.

[0048] The current ICMP message length is the length data in the preset dataset, which includes multiple length data of different sizes.

[0049] To improve the comprehensiveness of the detection, ICMP messages of varying lengths can be used to test the transmission path between the detection device and the device under test, thus verifying whether the transmission path can withstand ICMP messages of different lengths. For this purpose, a preset dataset is established, containing multiple data points of varying lengths, so that the ICMP messages obtained based on this dataset can cover both short and long messages. For example, the preset dataset could be [32, 64, 128, 256, 512, 1024, 2550], with each data point in bytes.

[0050] Before performing an ICMP detection task, ICMP detection parameters can be pre-configured, such as the second time threshold (used to determine whether the ICMP message response message has been successfully obtained), lifetime, method for obtaining length data, and second detection frequency. In specific implementations, the second time threshold and second detection frequency can be set based on detection requirements; for example, the second detection frequency can be set to 5 seconds.

[0051] The current ICMP message is the ICMP message corresponding to the current detection period. Within the current detection period, the detection device sends the current ICMP message to the device under test in the network and checks whether a response message from the device under test to the current ICMP message is obtained within a second time threshold. If a response message from the device under test to the current ICMP message is obtained within the second time threshold, the detection device can also calculate the response duration of the device under test to the current ICMP message.

[0052] Optionally, the detection equipment can be based on, for example, Figure 3 The system architecture shown performs ICMP inspection on the network. Based on this, when using the ICMP inspection method, before step S401 above, the method may further include: obtaining length data from a preset dataset and generating a current ICMP packet based on that length data. Correspondingly, the specific process of step S401 above can be: sending the current ICMP packet to the GW device through a VxLAN tunnel, so that the GW device sends the current ICMP packet to the device to be inspected.

[0053] The detection device can obtain length data from a preset dataset in an incremental, decremental, or random manner, and construct an ICMP message based on the obtained length data to obtain the current ICMP message. Next, the detection device sends the generated current ICMP message to the GW device through a VxLAN tunnel. The GW device then forwards the current ICMP message to the device under test. Compared to the traditional method of logging into the GW device to distribute detection messages, this reduces the resource overhead on the GW device. This allows the network diagnostic frequency to be increased to the second level, enabling timely detection of network faults and further improving the fault detection rate.

[0054] S402. Send the next ICMP message to the device under test and obtain the next response information of the device under test to the next ICMP message.

[0055] The length of the next ICMP message is set to other lengths in the preset dataset. The next ICMP message corresponds to the next detection period, and its length differs from the current ICMP message. As time progresses, upon the arrival of the next detection period, the detection device sends the next ICMP message to the device under test in the network and checks whether a response message from the device under test to the next ICMP message is received within a second time threshold. If a response message from the device under test to the next ICMP message is received within the second time threshold, the detection device can also calculate the response time of the device under test to the next ICMP message.

[0056] It should be noted that the generation and transmission methods of the next ICMP message can refer to the generation and transmission methods of the current ICMP message described in S401 above, and will not be repeated here in this embodiment.

[0057] S403. Continue until all ICMP messages with a length equal to the message length in the preset dataset have been sent to the device under test, and obtain the response information of the device under test to all ICMP messages.

[0058] Similarly, the detection device sequentially sends ICMP messages of varying lengths from the preset dataset to the device under test until all ICMP messages of varying lengths from the preset dataset have been sent to the device under test. It also checks whether a response message from the device under test to all ICMP messages is received within a second time threshold, thereby enabling the detection of the transmission path between the detection device and the device under test using ICMP messages of varying lengths.

[0059] S404. Determine the second detection result of the transmission path between the detection device and the device under test based on the response information of the device under test to all ICMP messages.

[0060] Specifically, the detection device can determine the second detection result of the transmission path between the detection device and the device under test based on whether it obtains response messages for each ICMP message within a second time threshold. If all response information from the device under test for all ICMP messages is obtained, it is determined that there is no fault in the transmission path between the detection device and the device under test; that is, the transmission path can pass both short and long messages. If response messages from the device under test for short ICMP messages are obtained, but no response messages for long ICMP messages are obtained, it is determined that the transmission path between the detection device and the device under test can only pass short messages and cannot pass long messages.

[0061] In this embodiment, since the preset dataset includes multiple data points of varying lengths, by sending ICMP messages with message lengths equal to those in the preset dataset to the device under test, it is possible to detect the transmission path between the testing device and the device under test for a given message length. After all ICMP messages with message lengths equal to those in the preset dataset have been sent to the device under test, the response information from the device under test to all ICMP messages allows for fault detection of the transmission path between the testing device and the device under test for different message lengths. In other words, during network detection, the entire process, from shorter to longer messages, is fully covered, realistically simulating network transmission conditions, making network detection more comprehensive, and further improving the fault detection rate.

[0062] In practical applications, the two detection methods described above (SBFD-based detection and ICMP-based detection based on different packet lengths) can be configured according to the actual situation in the network. When all devices under test in the network support SBFD, SBFD detection can be used to detect the transmission path between the testing device and the devices under test, or ICMP detection can be used. When some devices under test in the network support SBFD, the transmission path of those devices can be detected using SBFD detection, while the transmission path of other devices under test that do not support SBFD can be detected using ICMP detection.

[0063] To facilitate users' intuitive understanding of the faults existing in the network, in addition to the above embodiments, the detection device may optionally display a first detection result based on the SBFD detection method and a second detection result based on the ICMP detection method.

[0064] As an optional implementation, the testing device can send the first and second test results to the client and display them in a table format. Simultaneously, it can also display the packet loss rate and average response time to SBFD messages of the device under test in a table format. Furthermore, the testing device can periodically calculate and persistently store metrics such as the total number of failures, maximum consecutive failures, packet loss rate, and average response time within a given time period in a database for historical data analysis.

[0065] As another alternative implementation, the process of the detection device displaying the first detection result and the second detection result can be: rendering the first detection result and the second detection result, and displaying the rendered result.

[0066] The detection device can render and display the first detection result based on SBFD and the second detection result based on ICMP in real time. In specific implementation, the detection device can render the first and second detection results based on a preset threshold. For example, if the first detection result is a failure, the number of consecutive failures is counted. If the number of consecutive failures exceeds the threshold, the first detection result is marked in red; otherwise, it is marked in yellow. If the first detection result is a success (response messages from the device under test for all SBFD packets are obtained within the first time threshold, and all response messages are correct), the first detection result is marked in blue. Furthermore, the detection device can push the rendered results to a client for real-time display. The client also supports multi-dimensional historical data queries to identify potential network risks through analysis.

[0067] In this embodiment, the detection device can display a first detection result based on SBFD detection and a second detection result based on ICMP detection. It can also display the first and second detection results using network topology rendering, thus visually presenting the detection results and facilitating maintenance personnel to quickly identify faults in the network.

[0068] Figure 5 This is a schematic diagram of a network detection device provided in an embodiment of this application. Figure 5 As shown, the device may include: a first sending module 501, a first acquiring module 502, and a first determining module 503.

[0069] Specifically, the first sending module 501 is used to send a current SBFD message to the device under test through the current transmission path between the device and the device under test. The source port in the current SBFD message is a port in a preset port set, and the number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test. The first obtaining module 502 is used to obtain the current response information of the device under test to the current SBFD message.

[0070] The first sending module 501 is further configured to send a next SBFD message to the device under test via the next transmission path between the device under test and the device under test, wherein the source port in the next SBFD message is another port in a preset port set; the first obtaining module 502 is further configured to obtain the next response information of the device under test to the next SBFD message;

[0071] The first sending module 501 is further configured to send SBFD messages with all ports in the preset port set as source ports to the device under test; the first obtaining module 502 is configured to obtain the response information of the device under test to all SBFD messages;

[0072] The first determining module 503 is used to determine the first detection result of the transmission path between the detection device and the device under test based on the response information of the device under test to all SBFD messages.

[0073] The network detection device provided in this application embodiment has the advantage that, since the number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test, and the transmission path between the detection device and the device under test can be changed by altering the source port of the SBFD message, fault detection of one of the transmission paths between the two devices can be achieved by sending SBFD messages with ports in the preset port set as source ports to the device under test. Thus, after all SBFD messages with ports in the preset port set as source ports have been sent to the device under test, fault detection of all transmission paths between the detection device and the device under test can be achieved through the response information of the device under test to all SBFD messages. In other words, all transmission paths can be detected, making network detection more comprehensive and improving the fault detection rate.

[0074] Based on the above embodiments, optionally, the device under test is electrically connected to the GW device in the network, and the testing device accesses the GW device through a VxLAN tunnel;

[0075] The device also includes: a first generation module.

[0076] Specifically, the first generation module is used to obtain a port from a preset port set and use the port as the source port to generate the current SBFD message before the first sending module 501 sends the current SBFD message to the device under test through the current transmission path between the first sending module and the device under test.

[0077] The first sending module 501 is specifically used to send the current SBFD message to the GW device through the VxLAN tunnel, so that the GW device sends the current SBFD message to the device under test through the current transmission path between the GW device and the device under test.

[0078] Optionally, based on the above embodiments, the device may further include: a second sending module, a second acquiring module, and a second determining module.

[0079] Specifically, the second sending module is used to send a current ICMP message to the device under test, the message length of which is the length data in a preset dataset, and the preset dataset includes multiple length data of different sizes; the second obtaining module is used to obtain the current response information of the device under test to the current ICMP message.

[0080] The second sending module is also used to send the next ICMP message to the device under test, wherein the message length of the next ICMP message is other length data in the preset dataset; the second obtaining module is also used to obtain the next response information of the device under test to the next ICMP message;

[0081] The second sending module is also used to send ICMP messages with a length equal to the message length in all preset datasets to the device under test; the second obtaining module is also used to obtain the response information of the device under test to all ICMP messages;

[0082] The second determining module is used to determine the second detection result of the transmission path between the detection device and the device under test based on the response information of the device under test to all ICMP messages.

[0083] Optionally, based on the above embodiments, the device further includes: an acquisition module and a second generation module.

[0084] Specifically, the acquisition module is used to acquire length data from a preset dataset before the second sending module sends the current ICMP message to the device under test;

[0085] The second generation module is used to generate the current ICMP message based on the length data;

[0086] Correspondingly, the second sending module is specifically used to send the current ICMP message to the GW device through the VxLAN tunnel, so that the GW device sends the current ICMP message to the device under test.

[0087] Based on the above embodiments, optionally, the acquisition module is specifically used to acquire length data from a preset dataset in an incrementing, decrementing, or random manner according to the size of the length data.

[0088] Optionally, based on the above embodiments, the device further includes a display module.

[0089] Specifically, the display module is used to display the first detection result and the second detection result.

[0090] Based on the above embodiments, optionally, the display module is specifically used to render the first detection result and the second detection result, and display the rendering result.

[0091] Based on the above embodiments, optionally, the first determining module 503 is specifically used to determine that at least one transmission path between the testing device and the device under test is faulty when not all response information of the device under test to all SBFD messages has been obtained; when all response information of the device under test to all SBFD messages has been obtained, it checks whether the response information of each SBFD message matches the data content of the SBFD message. If they all match, it determines that the transmission path between the testing device and the device under test is normal; otherwise, it determines that at least one transmission path between the testing device and the device under test is faulty.

[0092] In one embodiment, a network detection device is provided, the internal structure of which can be shown in the following diagram. Figure 6 As shown, the network detection device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data generated during network detection. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a network detection method.

[0093] Those skilled in the art will understand that Figure 6The structure shown is merely a block diagram of a portion of the structure related to the solution of this application and does not constitute a limitation on the network detection device to which the solution of this application is applied. A specific network detection device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0094] In one embodiment, a network detection device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0095] The current SBFD message is sent to the device under test via the current transmission path between the detection device and the device under test. The source port in the current SBFD message is a port in a preset port set. The number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test. The current response information of the device under test to the current SBFD message is then obtained.

[0096] The next SBFD message is sent to the device under test via the next transmission path, wherein the source port in the next SBFD message is another port in a preset port set; and the next response information of the device under test to the next SBFD message is obtained.

[0097] The process continues until all SBFD messages with the source port in the preset port set have been sent to the device under test, and the response information of the device under test to all SBFD messages has been obtained.

[0098] The first detection result of the transmission path between the detection device and the device under test is determined based on the response information of the device under test to all SBFD messages.

[0099] In one embodiment, the device under test is electrically connected to a GW device in the network, and the testing device accesses the GW device through a VxLAN tunnel. When the processor executes the computer program, it also performs the following steps: obtaining a port from a preset port set and using the port as the source port to generate a current SBFD message; sending the current SBFD message to the GW device through the VxLAN tunnel, so that the GW device sends the current SBFD message to the device under test through the current transmission path between the GW device and the device under test.

[0100] In one embodiment, when the processor executes the computer program, it further implements the following steps: sending a current ICMP message to the device under test, the message length of the current ICMP message being the length data in a preset dataset, the preset dataset including multiple length data of different sizes; and obtaining the current response information of the device under test to the current ICMP message; sending a next ICMP message to the device under test, the message length of the next ICMP message being other length data in the preset dataset; and obtaining the next response information of the device under test to the next ICMP message; until all ICMP messages with a message length in the preset dataset have been sent to the device under test, and the response information of the device under test to all ICMP messages has been obtained; and determining a second detection result of the transmission path between the detection device and the device under test based on the response information of the device under test to all ICMP messages.

[0101] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining length data from a preset dataset and generating the current ICMP message based on the length data; sending the current ICMP message to the GW device through the VxLAN tunnel, so that the GW device sends the current ICMP message to the device under test.

[0102] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining length data from a preset dataset in an incrementing, decrementing, or random manner according to the size of the length data.

[0103] In one embodiment, when the processor executes the computer program, it further performs the following steps: displaying the first detection result and the second detection result.

[0104] In one embodiment, when the processor executes the computer program, it further performs the following steps: rendering the first detection result and the second detection result, and displaying the rendered result.

[0105] In one embodiment, when the processor executes the computer program, it further implements the following steps: if not all response information of the device under test to all SBFD messages is obtained, it is determined that at least one transmission path between the detection device and the device under test is faulty; if all response information of the device under test to all SBFD messages is obtained, it is detected whether the response information of each SBFD message matches the data content of the SBFD message; if they all match, it is determined that the transmission path between the detection device and the device under test is normal; otherwise, it is determined that at least one transmission path between the detection device and the device under test is faulty.

[0106] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0107] The current SBFD message is sent to the device under test via the current transmission path between the detection device and the device under test. The source port in the current SBFD message is a port in a preset port set. The number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test. The current response information of the device under test to the current SBFD message is then obtained.

[0108] The next SBFD message is sent to the device under test via the next transmission path, wherein the source port in the next SBFD message is another port in a preset port set; and the next response information of the device under test to the next SBFD message is obtained.

[0109] The process continues until all SBFD messages with the source port in the preset port set have been sent to the device under test, and the response information of the device under test to all SBFD messages has been obtained.

[0110] The first detection result of the transmission path between the detection device and the device under test is determined based on the response information of the device under test to all SBFD messages.

[0111] In one embodiment, the device under test is electrically connected to a GW device in the network, and the testing device accesses the GW device through a VxLAN tunnel. When the computer program is executed by the processor, it further performs the following steps: obtaining a port from a preset port set and using the port as the source port to generate a current SBFD message; sending the current SBFD message to the GW device through the VxLAN tunnel, so that the GW device sends the current SBFD message to the device under test through the current transmission path between the GW device and the device under test.

[0112] In one embodiment, when the computer program is executed by a processor, it further implements the following steps: sending a current ICMP message to the device under test, the message length of the current ICMP message being the length data in a preset dataset, the preset dataset including multiple length data of different sizes; and obtaining the current response information of the device under test to the current ICMP message; sending a next ICMP message to the device under test, the message length of the next ICMP message being other length data in the preset dataset; and obtaining the next response information of the device under test to the next ICMP message; until all ICMP messages with a message length in the preset dataset have been sent to the device under test, and the response information of the device under test to all ICMP messages has been obtained; and determining a second detection result of the transmission path between the detection device and the device under test based on the response information of the device under test to all ICMP messages.

[0113] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining length data from a preset dataset and generating the current ICMP message based on the length data; sending the current ICMP message to the GW device through the VxLAN tunnel, so that the GW device sends the current ICMP message to the device under test.

[0114] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining length data from a preset dataset in an incrementing, decrementing, or random manner according to the size of the length data.

[0115] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: displaying the first detection result and the second detection result.

[0116] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: rendering the first detection result and the second detection result, and displaying the rendered result.

[0117] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if not all response information of the device under test to all SBFD messages is obtained, it is determined that at least one transmission path between the detection device and the device under test is faulty; if all response information of the device under test to all SBFD messages is obtained, it is checked whether the response information of each SBFD message matches the data content of the SBFD message; if they all match, it is determined that the transmission path between the detection device and the device under test is normal; otherwise, it is determined that at least one transmission path between the detection device and the device under test is faulty.

[0118] The network detection apparatus, device, and storage medium provided in the above embodiments can execute the network detection method provided in any embodiment of this application, and have the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in the above embodiments can be found in the network detection method provided in any embodiment of this application.

[0119] The above description is merely an exemplary embodiment of this application and is not intended to limit the scope of protection of this application.

[0120] Generally, the various embodiments of this application can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although this application is not limited thereto.

[0121] Embodiments of this application can be implemented by executing computer program instructions through the data processor of a mobile device, for example, in a processor entity, or through hardware, or through a combination of software and hardware. The computer program instructions can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.

[0122] Any block diagram of logical flow in the accompanying drawings of this application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. The computer program may be stored in memory. The memory may be of any type suitable to the local technical environment and may be implemented using any suitable data storage technology, such as, but not limited to, read-only memory (ROM), random access memory (RAM), optical storage devices and systems (Digital Multifunction Discs, DVDs, or CDs), etc. Computer-readable media may include non-transitory storage media. The data processor may be of any type suitable to the local technical environment, such as, but not limited to, general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable logic devices (FGPAs), and processors based on multi-core processor architectures.

[0123] A detailed description of exemplary embodiments of this application has been provided above through exemplary and non-limiting examples. However, various modifications and adjustments to the above embodiments will be apparent to those skilled in the art when considered in conjunction with the accompanying drawings and claims, without departing from the scope of the invention. Therefore, the proper scope of the invention will be determined by the claims.

Claims

1. A network detection method, characterized in that, Applied to a testing device, the method includes: The system sends a current seamless bidirectional forwarding detection (SBFD) message to the device under test (DUT) via the current transmission path between the detection device and the DUT. The source port in the current SBFD message is a port from a preset port set, and the number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the DUT. The system also obtains the current response information of the DUT to the current SBFD message. The DUT is electrically connected to a gateway (GW) device in the network, and the detection device accesses the GW device through a Virtual Extended Local Area Network (VxLAN) tunnel. The next SBFD message is sent to the device under test via the next transmission path, wherein the source port in the next SBFD message is another port in a preset port set; and the next response information of the device under test to the next SBFD message is obtained. The process continues until all SBFD messages with the source port in the preset port set have been sent to the device under test, and the response information of the device under test to all SBFD messages has been obtained. The first detection result of the transmission path between the detection device and the device under test is determined based on the response information of the device under test to all SBFD messages. The method further includes, prior to sending the current SBFD message to the device under test via the current transmission path between the device and the device under test: Obtain ports from a preset port set and use those ports as source ports to generate the current SBFD message; The step of sending the current SBFD message to the device under test via the current transmission path includes: The current SBFD message is sent to the GW device through the VxLAN tunnel, so that the GW device sends the current SBFD message to the device under test through the current transmission path between the GW device and the device under test.

2. The method according to claim 1, characterized in that, The method further includes: Send a current Internet Control Message Protocol (ICMP) message to the device under test. The length of the current ICMP message is the length data in a preset dataset, which includes multiple length data of different sizes. And obtain the current response information of the device under test to the current ICMP message. Send the next ICMP message to the device under test, the length of the next ICMP message being other length data in the preset dataset; and obtain the next response information of the device under test to the next ICMP message; The process continues until all ICMP messages with a length equal to the message length in the preset dataset have been sent to the device under test, and the response information of the device under test to all ICMP messages has been obtained. The second detection result of the transmission path between the detection device and the device under test is determined based on the response information of the device under test to all ICMP messages.

3. The method according to claim 2, characterized in that, Before sending the current ICMP message to the device under test, the method further includes: Obtain length data from a preset dataset, and generate the current ICMP message based on the length data; Correspondingly, sending the current ICMP message to the device under test includes: The current ICMP message is sent to the GW device through the VxLAN tunnel, so that the GW device can send the current ICMP message to the device under test.

4. The method according to claim 3, characterized in that, The step of obtaining length data from a preset dataset includes: Length data is obtained from a preset dataset in an incrementing, decrementing, or random manner based on the size of the length data.

5. The method according to claim 2, characterized in that, The method further includes: Display the first detection result and the second detection result.

6. The method according to claim 5, characterized in that, The display of the first detection result and the second detection result includes: Render the first detection result and the second detection result, and display the rendering result.

7. The method according to any one of claims 1 to 6, characterized in that, The first detection result for determining the transmission path between the detection device and the device under test based on the response information of the device under test to all SBFD messages includes: If the response information of the device under test to all SBFD messages is not obtained, it is determined that at least one transmission path between the testing device and the device under test is faulty. When all the response information of the device under test to all SBFD messages is obtained, it is checked whether the response information of each SBFD message matches the data content of the SBFD message. If they all match, it is determined that the transmission path between the detection device and the device under test is normal; otherwise, it is determined that at least one transmission path between the detection device and the device under test is faulty.

8. A network detection device, characterized in that, Integrated into the testing equipment, the device includes: A first sending module is configured to send a current SBFD message to the device under test via the current transmission path between the device and the device under test. The source port in the current SBFD message is a port from a preset port set, and the number of ports in the preset port set is greater than or equal to the number of transmission paths between the detection device and the device under test. A first obtaining module is configured to obtain the current response information of the device under test to the current SBFD message. The device under test is electrically connected to a gateway (GW) device in the network, and the detection device accesses the GW device through a Virtual Extended Local Area Network (VxLAN) tunnel. The first sending module is further configured to send a next SBFD message to the device under test via the next transmission path between the device under test and the device under test, wherein the source port in the next SBFD message is another port in a preset port set; the first obtaining module is further configured to obtain the next response information of the device under test to the next SBFD message; The first sending module is further configured to send SBFD messages with all preset port sets as source ports to the device under test; the first obtaining module is further configured to obtain the response information of the device under test to all SBFD messages. The first determining module is used to determine the first detection result of the transmission path between the detection device and the device under test based on the response information of the device under test to all SBFD messages; The device further includes: The first generation module is used to obtain a port from a preset port set and use the port as the source port to generate the current SBFD message before the first sending module sends the current SBFD message to the device under test through the current transmission path between the first sending module and the device under test. The first sending module is specifically used to send the current SBFD message to the GW device through the VxLAN tunnel, so that the GW device sends the current SBFD message to the device under test through the current transmission path between the GW device and the device under test.

9. A network detection device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Bidirectional forwarding detection method and device

    CN111654406A