Packet loss sampling analysis implementation method, device, equipment and medium
By creating an internal loopback and next hop node in the network device, redirecting packet loss packets is sampled and parsed, the problem of incomplete packet loss statistics and difficult to analyze the cause in the existing technology is solved, and the fine-grained Packet loss analysis and network performance optimization improve user experience and network security.
Patent Information
- Application Number
- CN202411302276.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-18
AI Technical Summary
The prior art cannot provide fine packet loss statistics and cause analysis, affecting network performance optimization and user experience.
By creating an internal loopback and the next hop node, the packet loss packet is redirected to the internal loopback for sampling, obtaining sample packets and parsing them to obtain detailed information of the packet loss, such as five-tuple information, for analysis and optimize network performance.
It realizes fine packet loss statistics and cause analysis, improves the accuracy and user experience of network performance optimization, simplifies troubleshooting and positioning, and improves network security and reliability.
Smart Images

Figure CN119135574A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for implementing packet loss sampling and analysis. Background Art
[0002] With the rapid development of Internet technology, network communication plays an increasingly important role in people's lives and work. However, packet loss often occurs during Internet transmission, which seriously affects network performance and brings a bad experience to users.
[0003] In the past, communication equipment could only perceive packet loss by counting the number of packets in and out of the port and then subtracting the difference. Although this method is simple and easy to use, it has obvious limitations. It cannot provide detailed packet loss statistics, is not conducive to the comprehensive perception of the device forwarding situation, and cannot accurately determine the cause of packet loss and the content of the discarded message. Summary of the invention
[0004] One or more embodiments of the present specification provide a method, device, equipment and medium for implementing packet loss sampling and analysis, which are used to solve the technical problems raised by the background technology.
[0005] One or more embodiments of this specification adopt the following technical solutions:
[0006] One or more embodiments of this specification provide a method for implementing packet loss sampling and analysis, the method comprising:
[0007] Creating an internal loopback interface and a next-hop node, and directing the exit of the next-hop node to the internal loopback interface;
[0008] When packet loss occurs, the next hop of the route related to the packet loss data packet is pointed to the next hop node;
[0009] Sampling the packet loss data packet at the internal loopback interface to obtain a sampled message;
[0010] The sampled message is sent to a CPU so that the CPU can parse the sampled message to obtain a packet loss parsing result.
[0011] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0012] Provide detailed packet loss statistics: By sampling and parsing the packet loss data packets, more detailed packet loss statistics can be obtained, which can include the number, frequency, and distribution of packet loss. This helps to more fully understand the packet loss situation in the network and provide a basis for optimizing network performance.
[0013] It is conducive to the comprehensive perception of the forwarding situation of the device: by pointing the next hop of the packet loss data packet to the internal loopback port for sampling, the packet loss situation of the device during the forwarding process can be obtained. This helps to fully perceive the forwarding performance of the device, discover potential problems in time, and take corresponding measures to optimize it.
[0014] Accurately determine the cause of packet loss and the content of the discarded packets: By parsing the sampled packets, you can obtain relevant information about the packet loss, such as the source IP address, source port, destination IP address, destination port, and protocol type. This information helps to accurately determine the cause of packet loss, such as network congestion, equipment failure, protocol error, etc. At the same time, you can also understand the content of the discarded packets, providing clues for further analysis and problem solving.
[0015] Improve user experience: Timely detection and resolution of packet loss issues can reduce network latency and improve data transmission reliability, thereby improving the user experience in network communications.
[0016] Optimize network performance: Based on the packet loss analysis results, targeted measures can be taken to optimize network performance, such as adjusting network topology, increasing bandwidth, optimizing routing strategies, etc. This helps improve the overall performance and efficiency of the network.
[0017] Facilitates troubleshooting and location: When packet loss occurs in the network, the problem can be quickly located through packet loss sampling and analysis, thus narrowing the scope of troubleshooting and improving the efficiency of troubleshooting.
[0018] Further, the CPU parses the sampled message to obtain a packet loss analysis result, including:
[0019] The CPU parses the sampled message to extract five-tuple information, where the five-tuple information includes a source IP address, a source port, a destination IP address, a destination port, and a protocol type;
[0020] Based on the quintuple information, the packet loss analysis result is obtained.
[0021] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0022] More accurate analysis of packet loss causes: By extracting the five-tuple information, the specific location and related factors of packet loss can be more accurately determined. This helps to gain insight into the cause of packet loss, such as whether there is a problem with a specific source or destination IP address, port, or protocol type.
[0023] Targeted problem solving: The packet loss analysis results obtained based on the five-tuple information can provide more targeted measures to solve the packet loss problem. For example, if it is found that the packet loss is mainly concentrated in a specific source or destination IP address, the network connection or device configuration of the address can be further checked.
[0024] Optimize network configuration: Knowing the five-tuple information of packet loss can help optimize network configuration. For example, you can adjust firewall rules, routing policies, or QoS (Quality of Service) settings based on packet loss to improve network performance and reduce packet loss.
[0025] Troubleshooting and location: The five-tuple information is very helpful for troubleshooting and location. It can provide detailed information about the packet loss, allowing network administrators to find the problem faster and take appropriate measures to fix it.
[0026] Improve network security: By analyzing the five-tuple information, potential security threats or abnormal traffic patterns can be detected. This helps to take timely measures to protect network security and prevent malicious attacks or data leaks.
[0027] Support performance optimization decisions: Packet loss analysis results combined with quintuple information can provide a basis for decision-making for network performance optimization. For example, priority setting or resource allocation can be performed based on the requirements of different applications or services for quintuples to ensure the normal operation of key businesses.
[0028] Further, obtaining the packet loss analysis result based on the quintuple information includes:
[0029] Associating the five-tuple information with the lost data packet to obtain associated information;
[0030] Based on the association information, the packet loss analysis result is obtained.
[0031] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0032] More comprehensive packet loss analysis: By correlating the five-tuple information with the packet loss data, a more comprehensive packet loss analysis can be obtained. This helps to understand the specific context in which the packet loss occurred, including details of the source and destination, as well as the protocol and port associated with the packet loss.
[0033] Accurate packet loss location: Correlation information can help locate the location of packet loss more accurately. By correlating the five-tuple with the packet loss data, it can be determined whether the packet loss occurred between a specific source and destination, or was related to a specific protocol or port.
[0034] Gain deeper insights into network behavior: Packet loss analysis based on correlation information can provide deeper insights into network behavior. This helps identify potential network issues, such as unusual traffic patterns for a specific application or service, or frequent packet loss on a specific network path.
[0035] Targeted troubleshooting: Correlation information makes troubleshooting more targeted. Based on the packet loss analysis results, you can focus on checking the network components, devices, or applications related to the correlation information to quickly determine the root cause of the packet loss.
[0036] Optimizing network performance: Understanding the correlation between packet loss and the five-tuple can provide guidance for optimizing network performance. Network configuration can be adjusted, routing can be optimized, or traffic control policies can be implemented based on the correlation information to reduce packet loss and improve the overall performance of the network.
[0037] Further, obtaining the packet loss analysis result based on the association information includes:
[0038] Determining a packet loss mode of the lost data packet according to the associated information;
[0039] Based on the packet loss pattern, determine one or more network problems that caused the packet loss;
[0040] The packet loss analysis result is obtained according to the one or more network problems.
[0041] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0042] Pinpoint the cause of packet loss: By determining the packet loss pattern, you can more accurately identify the network problem that caused the packet loss. This helps to quickly locate the root cause of the problem and reduce the time and cost of troubleshooting.
[0043] Comprehensive understanding of network status: Identifying various network issues based on packet loss patterns provides a comprehensive understanding of potential problems in the network. This helps to discover and resolve potential risks that may affect network performance in advance, improving network stability and reliability.
[0044] Targeted problem solving: After identifying the specific network problem that caused the packet loss, targeted measures can be taken to solve it. This improves the efficiency of problem solving and avoids blindly trying various solutions, thereby restoring the normal operation of the network more quickly.
[0045] Optimize network performance: Solving network problems that cause packet loss can optimize network performance. Reducing packet loss can improve the efficiency and accuracy of data transmission, reduce latency, and improve user experience.
[0046] Prevent problems from happening again: By analyzing the packet loss analysis results, you can summarize lessons learned and develop corresponding preventive measures. This helps prevent similar network problems from happening again in the future and improves the overall reliability of the network.
[0047] Further, if the route related to the packet loss data packet is ACL denied forwarding, the step of pointing the next hop of the route related to the packet loss data packet to the next hop node includes:
[0048] The next hop that the ACL denies forwarding is directed to the next hop node.
[0049] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0050] Quickly locate the problem: By pointing the next hop of the ACL-denied forwarding to the correct node and sampling the packet loss data at the internal loopback interface, the location and cause of the packet loss can be quickly determined. This helps network administrators quickly locate the problem and take appropriate measures to fix it.
[0051] Further, if the route associated with the packet loss data packet is a black hole route, directing the next hop of the route associated with the packet loss data packet to the next hop node includes:
[0052] The next hop of the black hole route is directed to the next hop node.
[0053] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0054] Quickly locate the problem: point the next hop of the black hole route to the correct next hop node, and sample the lost packets at the internal loopback interface, and send the sampled packets to the CPU for analysis, so that the location and cause of the packet loss can be quickly determined. This helps network administrators quickly locate the problem and take appropriate measures to fix it.
[0055] Furthermore, before sampling the lost packet at the internal loopback interface, the method further includes:
[0056] A port sampling function is configured on the internal loopback port, and a corresponding sampling rate is set.
[0057] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0058] Improve sampling accuracy: By configuring the port sampling function on the internal loopback port and setting an appropriate sampling rate, you can ensure accurate sampling of lost packets. The appropriate sampling rate can ensure that lost packets are effectively captured without losing important information.
[0059] One or more embodiments of this specification provide a packet loss sampling and analysis implementation device, including:
[0060] A creation unit, creating an internal loopback interface and a next-hop node, and directing an exit of the next-hop node to the internal loopback interface;
[0061] A routing pointing unit, when packet loss occurs, points the next hop of the route related to the packet loss data packet to the next hop node;
[0062] A sampling unit, sampling the packet loss data packet at the internal loopback interface to obtain a sampled message;
[0063] The parsing unit sends the sampled message to the CPU so that the CPU parses the sampled message to obtain a packet loss parsing result.
[0064] One or more embodiments of this specification provide a packet loss sampling and analysis implementation device, including:
[0065] at least one processor; and,
[0066] a memory communicatively connected to the at least one processor; wherein,
[0067] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0068] Creating an internal loopback interface and a next-hop node, and directing the exit of the next-hop node to the internal loopback interface;
[0069] When packet loss occurs, the next hop of the route related to the packet loss data packet is pointed to the next hop node;
[0070] Sampling the packet loss data packet at the internal loopback interface to obtain a sampled message;
[0071] The sampled message is sent to a CPU so that the CPU can parse the sampled message to obtain a packet loss parsing result.
[0072] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer executable instructions, which can achieve the following when executed by a computer:
[0073] Creating an internal loopback interface and a next-hop node, and directing the exit of the next-hop node to the internal loopback interface;
[0074] When packet loss occurs, the next hop of the route related to the packet loss data packet is pointed to the next hop node;
[0075] Sampling the packet loss data packet at the internal loopback interface to obtain a sampled message;
[0076] The sampled message is sent to a CPU so that the CPU can parse the sampled message to obtain a packet loss parsing result.
[0077] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0078] Provide detailed packet loss statistics: By sampling and parsing the packet loss data packets, more detailed packet loss statistics can be obtained, including the number, frequency, and distribution of packet loss. This helps to more fully understand the packet loss situation in the network and provide a basis for optimizing network performance.
[0079] It is conducive to the comprehensive perception of the forwarding situation of the device: by pointing the next hop of the packet loss data packet to the internal loopback port for sampling, the packet loss situation of the device during the forwarding process can be obtained. This helps to fully perceive the forwarding performance of the device, discover potential problems in time, and take corresponding measures to optimize it.
[0080] Accurately determine the cause of packet loss and the content of the discarded packets: By parsing the sampled packets, you can obtain relevant information about the packet loss, such as the source IP address, source port, destination IP address, destination port, and protocol type. This information helps to accurately determine the cause of packet loss, such as network congestion, equipment failure, protocol error, etc. At the same time, you can also understand the content of the discarded packets, providing clues for further analysis and problem solving.
[0081] Improve user experience: Timely detection and resolution of packet loss issues can reduce network latency and improve data transmission reliability, thereby improving the user experience in network communications.
[0082] Optimize network performance: Based on the packet loss analysis results, targeted measures can be taken to optimize network performance, such as adjusting network topology, increasing bandwidth, optimizing routing strategies, etc. This helps improve the overall performance and efficiency of the network.
[0083] Facilitates troubleshooting and location: When packet loss occurs in the network, the problem can be quickly located through packet loss sampling and analysis, thus narrowing the scope of troubleshooting and improving the efficiency of troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:
[0085] Figure 1A flowchart of a packet loss sampling and analysis implementation method provided in one or more embodiments of this specification;
[0086] Figure 2 A schematic diagram of the structure of a packet loss sampling and analysis implementation device provided in one or more embodiments of this specification;
[0087] Figure 3 A schematic diagram of the structure of a packet loss sampling and analysis implementation device provided in one or more embodiments of this specification. DETAILED DESCRIPTION
[0088] The embodiments of this specification provide a method, device, equipment and medium for implementing packet loss sampling and analysis.
[0089] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0090] Figure 1 A schematic diagram of a process flow of a packet loss sampling and analysis implementation method provided in one or more embodiments of this specification, which can be executed by a packet loss sampling and analysis system. Certain input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.
[0091] The method steps of the embodiment of this specification are as follows:
[0092] S102: Create an internal loopback interface and a next-hop node, and point the exit of the next-hop node to the internal loopback interface.
[0093] In the examples of this specification, the above content can be implemented by the following specific implementation scheme:
[0094] Determine the network device: Select a network device that supports internal loopback ports and routing configuration.
[0095] Log in to the network device: Log in to the management interface of the network device using the appropriate login credentials.
[0096] Enter configuration mode: In the management interface, enter the configuration mode of the device.
[0097] Create an internal loopback interface: Use the corresponding command or interface option to create an internal loopback interface. The specific command or operation method may vary depending on the device.
[0098] Configure the next hop node: Specify the IP address or other identifier of the next hop node.
[0099] Set the next-hop node's exit to the internal loopback port: Use the routing configuration command to set the next-hop node's exit to the internal loopback port.
[0100] Save Configuration: Make sure to save the configuration changes you made for the settings to take effect.
[0101] S104, when packet loss occurs, directing the next hop of the route related to the lost data packet to the next hop node.
[0102] In the examples of this specification, the above content can be implemented by the following specific implementation scheme:
[0103] Monitor packet loss events: Use network monitoring tools or devices to monitor packet loss in real time. When a packet loss event is detected, subsequent actions are triggered.
[0104] Get relevant routing information: Get routing information related to the lost data packet, including source address, destination address, routing table, etc.
[0105] Modify the routing table: Based on the obtained routing information, point the next hop of the route related to the lost packet to the created next hop node.
[0106] Further, if the route related to the lost packet data packet is ACL rejected forwarding, when the next hop of the route related to the lost packet data packet is directed to the next hop node, the next hop of the ACL rejected forwarding can be directed to the next hop node.
[0107] In the examples of this specification, the above content can be implemented by the following specific implementation scheme:
[0108] Check ACL rules: Identify the access control list (ACL) rules associated with the dropped packets. ACL rules are used to control the forwarding and access of network traffic.
[0109] Find the next hop that is denied forwarding by the ACL: In the ACL rule, find the next hop address or interface that is denied forwarding of the packet.
[0110] Modify the next hop direction: Change the next hop address or interface that is denied by the ACL to the specified next hop node.
[0111] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0112] Quickly locate the problem: By pointing the next hop of the ACL-denied forwarding to the correct node and sampling the packet loss data at the internal loopback interface, the location and cause of the packet loss can be quickly determined. This helps network administrators quickly locate the problem and take appropriate measures to fix it.
[0113] Further, if the route associated with the lost packet data packet is a black hole route, when the next hop of the route associated with the lost packet data packet is directed to the next hop node, the next hop of the black hole route may be directed to the next hop node.
[0114] In the examples of this specification, the above content can be implemented by the following specific implementation scheme:
[0115] Check route type: Check whether the determined route is a black hole route. A black hole route is a special route that directly discards data packets without forwarding them.
[0116] Get next hop information: Get the node information of the next hop of the black hole route. The next hop is the next network node to which the data packet will be forwarded under this route.
[0117] Modify the next hop direction: point the next hop of the black hole route to the specified next hop node. This can be achieved by modifying the routing table or related network configuration.
[0118] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0119] Quickly locate the problem: point the next hop of the black hole route to the correct next hop node, and sample the lost packets at the internal loopback interface, and send the sampled packets to the CPU for analysis, so that the location and cause of the packet loss can be quickly determined. This helps network administrators quickly locate the problem and take appropriate measures to fix it.
[0120] S106: Sampling the lost data packet at the internal loopback interface to obtain a sampled message.
[0121] In the examples of this specification, the above content can be implemented by the following specific implementation scheme:
[0122] Enable sampling: Enable sampling on the internal loopback interface to sample dropped packets.
[0123] Define sampling rules: Define sampling rules as needed, such as sampling frequency, sampling quantity, etc.
[0124] Receive packet loss data packets: When packet loss occurs, the packet loss data packets will be sent to the internal loopback port.
[0125] Sampling: The internal loopback port samples the lost data packets according to the defined sampling rules to obtain sampled messages.
[0126] Furthermore, before sampling the lost data packet at the internal loopback port, a port sampling function may be configured on the internal loopback port, and a corresponding sampling rate may be set.
[0127] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0128] Improve sampling accuracy: By configuring the port sampling function on the internal loopback port and setting an appropriate sampling rate, you can ensure accurate sampling of lost packets. The appropriate sampling rate can ensure that lost packets are effectively captured without losing important information.
[0129] S108: Send the sampled message to the CPU so that the CPU parses the sampled message to obtain a packet loss parsing result.
[0130] In an embodiment of the present specification, when the CPU parses the sampled message and obtains a packet loss analysis result, the CPU parses the sampled message and extracts five-tuple information, wherein the five-tuple information includes a source IP address, a source port, a destination IP address, a destination port, and a protocol type; based on the five-tuple information, the packet loss analysis result is obtained.
[0131] In the examples of this specification, the above content can be implemented by the following specific implementation scheme:
[0132] CPU analyzes sampled packets: The CPU uses corresponding protocol analysis tools to analyze sampled packets.
[0133] Extract five-tuple information: Extract the five-tuple information of source IP address, source port, destination IP address, destination port and protocol type from the parsed message.
[0134] Packet loss analysis based on quintuple information: Analyze the cause and situation of packet loss based on the extracted quintuple information. The specific cause of packet loss can be determined by comparing with other network data, checking the routing table, etc.
[0135] Obtaining a packet loss analysis result: using the analyzed packet loss cause and situation as the packet loss analysis result.
[0136] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0137] More accurate analysis of packet loss causes: By extracting the five-tuple information, the specific location and related factors of packet loss can be more accurately determined. This helps to gain insight into the cause of packet loss, such as whether there is a problem with a specific source or destination IP address, port, or protocol type.
[0138] Targeted problem solving: The packet loss analysis results obtained based on the five-tuple information can provide more targeted measures to solve the packet loss problem. For example, if it is found that the packet loss is mainly concentrated in a specific source or destination IP address, the network connection or device configuration of the address can be further checked.
[0139] Optimize network configuration: Knowing the five-tuple information of packet loss can help optimize network configuration. For example, you can adjust firewall rules, routing policies, or QoS (Quality of Service) settings based on packet loss to improve network performance and reduce packet loss.
[0140] Troubleshooting and location: The five-tuple information is very helpful for troubleshooting and location. It can provide detailed information about the packet loss, allowing network administrators to find the problem faster and take appropriate measures to fix it.
[0141] Improve network security: By analyzing the five-tuple information, potential security threats or abnormal traffic patterns can be detected. This helps to take timely measures to protect network security and prevent malicious attacks or data leaks.
[0142] Support performance optimization decisions: Packet loss analysis results combined with quintuple information can provide a basis for decision-making for network performance optimization. For example, priority setting or resource allocation can be performed based on the requirements of different applications or services for quintuples to ensure the normal operation of key businesses.
[0143] Furthermore, when the packet loss analysis result is obtained based on the quintuple information, the quintuple information can be associated with the packet loss data packet to obtain associated information; and the packet loss analysis result is obtained based on the associated information.
[0144] In the examples of this specification, the above content can be implemented by the following specific implementation scheme:
[0145] Obtain five-tuple information: The CPU parses the sampled message and extracts the five-tuple information of source IP address, source port, destination IP address, destination port, and protocol type.
[0146] Get lost data packets: Get the data packets where lost data packets occur.
[0147] Associating the five-tuple information with the packet loss data packet: Associating the five-tuple information with the corresponding packet loss data packet, and using a certain identifier or index to establish the association relationship.
[0148] Storing associated information: The associated five-tuple information and the lost packet data are stored for subsequent analysis and processing.
[0149] Analyze correlation information: Perform analysis based on correlation information, such as checking the characteristics of the lost packet and its relationship with other packets, to determine the cause of the packet loss and possible solutions.
[0150] Obtain packet loss analysis results: Based on the analysis results, draw conclusions about packet loss analysis, such as determining whether packet loss is caused by network congestion, device failure, or other reasons.
[0151] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0152] More comprehensive packet loss analysis: By correlating the five-tuple information with the packet loss data, a more comprehensive packet loss analysis can be obtained. This helps to understand the specific context in which the packet loss occurred, including details of the source and destination, as well as the protocol and port associated with the packet loss.
[0153] Accurate packet loss location: Correlation information can help locate the location of packet loss more accurately. By correlating the five-tuple with the packet loss data, it can be determined whether the packet loss occurred between a specific source and destination, or was related to a specific protocol or port.
[0154] Gain deeper insights into network behavior: Packet loss analysis based on correlation information can provide deeper insights into network behavior. This helps identify potential network issues, such as unusual traffic patterns for a specific application or service, or frequent packet loss on a specific network path.
[0155] Targeted troubleshooting: Correlation information makes troubleshooting more targeted. Based on the packet loss analysis results, you can focus on checking the network components, devices, or applications related to the correlation information to quickly determine the root cause of the packet loss.
[0156] Optimizing network performance: Understanding the correlation between packet loss and the five-tuple can provide guidance for optimizing network performance. Network configuration can be adjusted, routing can be optimized, or traffic control policies can be implemented based on the correlation information to reduce packet loss and improve the overall performance of the network.
[0157] Furthermore, when the packet loss analysis result is obtained based on the associated information, the packet loss pattern of the lost data packet can be determined according to the associated information; one or more network problems causing the packet loss can be determined according to the packet loss pattern; and the packet loss analysis result can be obtained according to the one or more network problems.
[0158] In the examples of this specification, the above content can be implemented by the following specific implementation scheme:
[0159] Correlation information analysis: Analyze the acquired correlation information in detail. Observe the time series, quantity, distribution and other characteristics of the lost data packets. Compare the packet loss under different five-tuple information.
[0160] Determine the packet loss pattern: Based on the analysis results of the associated information, determine the packet loss pattern, such as whether there is periodic packet loss, burst packet loss, or packet loss at a specific source or destination.
[0161] Identify network problems: Based on the packet loss pattern, infer one or more network problems that may cause packet loss. Possible network problems include network congestion, link failure, device failure, configuration error, etc. Other network monitoring data and device logs can be combined to further confirm network problems.
[0162] Get packet loss analysis results: The determined network problem is used as the packet loss analysis result. Provide a detailed description, including the type of problem, possible causes, and impact range.
[0163] It should be noted that the embodiments of this specification have the following beneficial effects through the above contents:
[0164] Pinpoint the cause of packet loss: By determining the packet loss pattern, you can more accurately identify the network problem that caused the packet loss. This helps to quickly locate the root cause of the problem and reduce the time and cost of troubleshooting.
[0165] Comprehensive understanding of network status: Identifying various network issues based on packet loss patterns provides a comprehensive understanding of potential problems in the network. This helps to discover and resolve potential risks that may affect network performance in advance, improving network stability and reliability.
[0166] Targeted problem solving: After identifying the specific network problem that caused the packet loss, targeted measures can be taken to solve it. This improves the efficiency of problem solving and avoids blindly trying various solutions, thereby restoring the normal operation of the network more quickly.
[0167] Optimize network performance: Solving network problems that cause packet loss can optimize network performance. Reducing packet loss can improve the efficiency and accuracy of data transmission, reduce latency, and improve user experience.
[0168] Prevent problems from happening again: By analyzing the packet loss analysis results, you can summarize lessons learned and develop corresponding preventive measures. This helps prevent similar network problems from happening again in the future and improves the overall reliability of the network.
[0169] It should be noted that packet loss often occurs during Internet transmission, which affects network performance. The packet loss sampling and statistics function can detect packet loss that occurs during the forwarding process of the message inside the device. When packet loss occurs, the device will sample the packet loss and send the sampling information to the CPU according to the sampling rate configured by the user. The CPU parses the five-tuple information of the packet loss message and finally presents the packet loss information to the user.
[0170] In the past, communication equipment could only detect packet loss by counting the number of messages in the port's inbound and outbound directions, subtracting the difference, and obtaining the number of lost packets.
[0171] The embodiment of this specification provides a solution, which redirects the packet loss message to a designated port, and then uses the port sampling function to regularly sample the redirected message at a set sampling rate and send it to the CPU, and the CPU parses the five-tuple information, so as to realize the visualization of packet loss and facilitate the rapid location of faults.
[0172] The steps of setting up the embodiment of this specification include:
[0173] 1. First, create the internal loopback interface loopbackA.
[0174] 2. Create the next hop nexthop B, and the exit of the next hop points to loopbackA.
[0175] 3. Change the ACL deny forwarding action to redirect to nexthop B.
[0176] 4. Set the next hop of the black hole route to nexthop B.
[0177] 5. Enable the port sampling function on loopback A and set the sampling rate.
[0178] 6. Send the sampled message to the CPU.
[0179] 7. The CPU parses the received message, extracts the five-tuple information, and feeds the information back to the client.
[0180] It should be noted that when the packet enters the switch device, it hits the ACL DROP rejection forwarding entry. The packet is not discarded directly, but redirected to the next hop B, and then redirected to the loopback A through the interface pointed to by the next hop. Enable the port sampling function on the loopback A and configure the sampling rate. The packet redirected to the loopback A is sent to the CPU controller through port sampling at the configured sampling rate. After receiving the packet, the CPU controller parses the five-tuple information of the packet and sends the five-tuple information to the client foreground to display to the user. The packet loss information is visualized.
[0181] The black hole routing message enters the switch device and hits the black hole routing table entry. The message is not discarded directly, but is also redirected to the next hop B. The subsequent forwarding process is the same as the above process.
[0182] The embodiments of this specification have the following beneficial effects:
[0183] 1. This solution can visualize packet loss through detailed packet loss statistics, and easily view the cause of packet loss and the specific content of packet loss, so as to achieve the purpose of accurate and rapid fault location.
[0184] 2. This solution can control the number of samples sent to the CPU by setting the sampling rate of the loopback port, thus avoiding sending all discarded packets to the CPU, which would cause excessive impact on the CPU and affect performance.
[0185] Figure 2 A schematic diagram of the structure of a packet loss sampling and analysis implementation device provided for one or more embodiments of this specification includes: a creation unit 202, a routing pointing unit 204, a sampling unit 206 and a parsing unit 208.
[0186] A creating unit 202, creating an internal loopback interface and a next-hop node, and directing an exit of the next-hop node to the internal loopback interface;
[0187] The route pointing unit 204 points the next hop of the route related to the lost packet data packet to the next hop node when packet loss occurs;
[0188] The sampling unit 206 samples the packet loss data packet at the internal loopback interface to obtain a sampled message;
[0189] The parsing unit 208 sends the sampled message to the CPU so that the CPU parses the sampled message to obtain a packet loss parsing result.
[0190] Figure 3A schematic diagram of a packet loss sampling and analysis implementation device provided for one or more embodiments of this specification includes:
[0191] at least one processor; and,
[0192] a memory communicatively connected to the at least one processor; wherein,
[0193] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0194] Creating an internal loopback interface and a next-hop node, and directing the exit of the next-hop node to the internal loopback interface;
[0195] When packet loss occurs, the next hop of the route related to the packet loss data packet is pointed to the next hop node;
[0196] Sampling the packet loss data packet at the internal loopback interface to obtain a sampled message;
[0197] The sampled message is sent to a CPU so that the CPU can parse the sampled message to obtain a packet loss parsing result.
[0198] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer executable instructions, which can achieve the following when executed by a computer:
[0199] Creating an internal loopback interface and a next-hop node, and directing the exit of the next-hop node to the internal loopback interface;
[0200] When packet loss occurs, the next hop of the route related to the packet loss data packet is pointed to the next hop node;
[0201] Sampling the packet loss data packet at the internal loopback interface to obtain a sampled message;
[0202] The sampled message is sent to a CPU so that the CPU can parse the sampled message to obtain a packet loss parsing result.
[0203] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A method for implementing packet loss sampling and analysis, characterized in that: include: Creating an internal loopback interface and a next-hop node, and directing the exit of the next-hop node to the internal loopback interface; When packet loss occurs, the next hop of the route related to the packet loss data packet is pointed to the next hop node; Sampling the packet loss data packet at the internal loopback interface to obtain a sampled message; The sampled message is sent to a CPU so that the CPU can parse the sampled message to obtain a packet loss parsing result.
2. The method according to claim 1, characterized in that The CPU parses the sampled message to obtain a packet loss analysis result, including: The CPU parses the sampled message to extract five-tuple information, where the five-tuple information includes a source IP address, a source port, a destination IP address, a destination port, and a protocol type; Based on the quintuple information, the packet loss analysis result is obtained.
3. The method according to claim 2, characterized in that The obtaining the packet loss analysis result based on the quintuple information includes: Associating the five-tuple information with the lost data packet to obtain associated information; Based on the association information, the packet loss analysis result is obtained.
4. The method according to claim 3, characterized in that The obtaining the packet loss analysis result based on the association information includes: Determining a packet loss mode of the lost data packet according to the associated information; Based on the packet loss pattern, determine one or more network problems that caused the packet loss; The packet loss analysis result is obtained according to the one or more network problems.
5. The method according to claim 3, characterized in that: If the route related to the packet loss data packet is ACL denied forwarding, directing the next hop of the route related to the packet loss data packet to the next hop node includes: The next hop that the ACL denies forwarding is directed to the next hop node.
6. The method according to claim 3, characterized in that If the route associated with the packet loss data packet is a black hole route, directing the next hop of the route associated with the packet loss data packet to the next hop node includes: The next hop of the black hole route is directed to the next hop node.
7. The method according to claim 1, characterized in that Before sampling the lost packet at the internal loopback interface, the method further includes: A port sampling function is configured on the internal loopback port, and a corresponding sampling rate is set.
8. A packet loss sampling and analysis implementation device, characterized in that: include: A creation unit, creating an internal loopback interface and a next-hop node, and directing an exit of the next-hop node to the internal loopback interface; A routing pointing unit, when packet loss occurs, points the next hop of the route related to the packet loss data packet to the next hop node; A sampling unit, sampling the packet loss data packet at the internal loopback interface to obtain a sampled message; The parsing unit sends the sampled message to the CPU so that the CPU parses the sampled message to obtain a packet loss parsing result.
9. A packet loss sampling and analysis implementation device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Creating an internal loopback interface and a next-hop node, and directing the exit of the next-hop node to the internal loopback interface; When packet loss occurs, the next hop of the route related to the packet loss data packet is pointed to the next hop node; Sampling the packet loss data packet at the internal loopback interface to obtain a sampled message; The sampled message is sent to a CPU so that the CPU can parse the sampled message to obtain a packet loss parsing result.
10. A non-volatile computer storage medium, characterized in that: Computer executable instructions are stored, and when the computer executable instructions are executed by a computer, the following can be achieved: Creating an internal loopback interface and a next-hop node, and directing the exit of the next-hop node to the internal loopback interface; When packet loss occurs, the next hop of the route related to the packet loss data packet is pointed to the next hop node; Sampling the packet loss data packet at the internal loopback interface to obtain a sampled message; The sampled message is sent to a CPU so that the CPU can parse the sampled message to obtain a packet loss parsing result.
Citation Information
Patent Citations
Exchange device and packet loss method
CN104717150A
Method and device for analyzing cache packet loss in network
CN105306381A
Packet loss analysis system and method, and storage medium
CN115550224A
Packet loss processing method and device and storage medium
CN115941816A
Equivalent load sharing method and device, network equipment and storage medium
CN116032819A
