A network fault location method, system, electronic device and storage medium based on enhanced ICMP
By adopting the enhanced ICMP (EICMP) protocol in the PON network, EICMP messages containing network performance and physical layer monitoring information are generated, which solves the problem that the existing ICMP protocol cannot quickly and accurately identify network failures, and realizes rapid positioning and detailed analysis of network failures, reducing operation and maintenance costs and improving efficiency.
Patent Information
- Application Number
- CN202411051994.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-08-01
AI Technical Summary
In the prior art, the standard ICMP protocol has limitations in providing fault information, and it is impossible to quickly and accurately identify specific types of network failures, such as port failure or VLAN configuration errors. Especially in the PON field, the state errors of the optical link cannot be located, and specialized testing instruments and professional operation and maintenance personnel are required to locate, resulting in time costs and waste of human and material resources.
The network fault location method based on enhanced ICMP (EICMP) is adopted. After receiving the ICMP ping command at the network failure node, the current fault status is detected and the EICMP message is generated. The EICMP message contains the network performance monitoring information and physical layer monitoring information of the network device, and returns to the requesting host for analysis and fault analysis.
It realizes rapid positioning of PON network failures, provides detailed network failure information, reduces dependence on specialized testing instruments and professional operation and maintenance personnel, reduces the maintenance cost of network operation and maintenance, and improves the efficiency of fault detection and analysis.
Smart Images

Figure CN118764377B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a network fault locating method, system, electronic device and storage medium, and in particular to a network fault locating method, system, electronic device and storage medium based on enhanced ICMP, belonging to the technical field of maintenance, operation and management of data exchange networks. Background Art
[0002] Existing network fault diagnosis methods rely on the standard ICMP protocol. The ICMP protocol has limitations in providing fault information and cannot quickly and accurately identify specific types of network faults, such as port failures or VLAN configuration errors. Especially in the PON field, the status errors of the optical link cannot be located and require special testing instruments and professional operation and maintenance personnel to locate, which requires a lot of time, manpower and material resources. Summary of the invention
[0003] The purpose of the present invention is to provide a network fault locating method, system, electronic device and storage medium based on enhanced ICMP, which can make up for the limitations of ICMP protocol in providing fault information, quickly locate PON network faults, and solve the shortcomings of the prior art.
[0004] The present invention provides the following scheme:
[0005] A network fault location method based on enhanced ICMP, applied to PON network monitoring, includes:
[0006] Monitor the host network in real time. If a host network failure is detected, the host will send an ICMP ping command to the network fault node for fault diagnosis.
[0007] The network device at the network fault node receives the ICMP ping command, detects the current fault status, and generates an EICMP message according to the current fault status;
[0008] The EICMP message includes network performance monitoring information and physical layer monitoring information of the network device. The EICMP message is returned to the requesting host that sends the ICMP ping command, and the EICMP message is parsed to perform corresponding fault analysis.
[0009] Furthermore, the network device at the network fault node receives an ICMP ping instruction and detects the current fault state, further comprising:
[0010] The destination address of the ICMP ping instruction is the IP address of the network node where the network failure occurs. The host sends the ICMP ping instruction to the gateway, and forwards it to the network device at the network node failure location through the router;
[0011] The network device at the faulty network node receives the ICMP ping instruction, detects the data specified in the ICMP ping instruction according to the request of the ICMP ping instruction, and determines whether the network device at the faulty network node has an abnormality;
[0012] If the network device that detects the current network node failure has an abnormal situation, a corresponding data message is generated according to the data and status corresponding to the abnormal situation for storage and forwarding.
[0013] Furthermore, if a host network failure is detected, the host sends an ICMP ping command to the network failure node for fault diagnosis, specifically:
[0014] If it is detected that the ICMP ping command cannot be forwarded at the destination address, the ICMP ping command is resent;
[0015] If the ICMP ping command is resent three or more times, it is determined that the network device at the destination address is faulty and returns a corresponding ICMP ping error message response;
[0016] In the process of resending the ICMP ping command, the timeout period is determined by using an RTT algorithm with a weighted coefficient, and the RTT algorithm satisfies the following formula:
[0017] New RTT = α * old RTT + (1-α) * current RTT;
[0018] Where α is the smoothing factor.
[0019] Further, the network device at the network fault node receives an ICMP ping instruction, detects a current fault state, and generates an EICMP message according to the current fault state, further comprising:
[0020] The network device at the network fault node receives the ICMP ping command and then performs a self-check to obtain its own device status information;
[0021] The network device at the network fault node packages the device status information and basic information for responding to the ICMP ping instruction into an EICMP message, and returns the EICMP message to the host that sent the ICMP ping instruction.
[0022] Further, the device status information includes VLAN, source IP, destination IP and port status, and the basic information of the ICMP ping instruction includes ICMP Echo Reply information;
[0023] The EICMP message further includes returning an ICMP ping error message response, wherein the ICMP ping error message response is specifically a "time exceeded" message or a "destination unreachable" message;
[0024] Further, the network performance monitoring information is specifically the optical power information of the network device, and the physical layer monitoring information is specifically the PON LOS information of the network device;
[0025] The EICMP message also includes domain information, and the domain information further includes: domain identifier, domain length, domain information and domain information check code.
[0026] Furthermore, the type field of the EICMP message is 240, and the data structure of the EICMP message includes: an ICMP header, a fault code, and a fault check code.
[0027] A network fault location system based on enhanced ICMP, comprising:
[0028] The host network fault detection module is used to monitor the host network in real time. If a host network fault is detected, the host sends an ICMP ping command to the network fault node for fault diagnosis.
[0029] An EICMP message generation module, in which a network device at a network fault node receives an ICMP ping command, detects a current fault state, and generates an EICMP message according to the current fault state;
[0030] The EICMP message parsing module includes network performance monitoring information and physical layer monitoring information of the network device in the EICMP message, returns the EICMP message to the requesting host that sends the ICMP ping command, parses the EICMP message, and performs corresponding fault analysis.
[0031] An electronic device, characterized in that it includes: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method.
[0032] A computer-readable storage medium stores a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of the method.
[0033] Compared with the prior art, the present invention has the following advantages:
[0034] The present invention is suitable for PON network fault detection. In view of the simple function and limitations of the standard ICMP protocol in the prior art, an enhanced ICMP (EICMP) data message mode is adopted to respond to fault detection at a network fault node, and a new fault detection and diagnosis function is added to the enhanced ICMP (EICMP) data message. Through the EICMP message, corresponding fault analysis can be performed, and detailed network fault information can be quickly located and provided, so as to help network administrators locate and solve problems in a timely and accurate manner, without the need for special test instruments and professional operation and maintenance personnel to participate, thereby reducing the maintenance cost of network operation and maintenance and improving the efficiency of fault detection and analysis.
[0035] The data message of the enhanced ICMP (EICMP) provided by the present invention includes not only device status information, basic ICMP Echo Reply information and domain-related information, but also network performance monitoring information and physical layer monitoring information. The requesting host that sends the ICMP ping command obtains the above-mentioned information content that is closely related to the current fault status of the network device, parses the corresponding EICMP message, can perform corresponding fault analysis, and quickly locate the location of the network fault. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 This is a flow chart of a network fault location method based on enhanced ICMP.
[0038] Figure 1A It is a flow chart of the optimization technical solution of step S2.
[0039] Figure 2 This is an architecture diagram of a network fault location system based on enhanced ICMP.
[0040] Figure 3 It is a structural diagram of an electronic device. DETAILED DESCRIPTION
[0041] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] like Figure 1 The network fault location method based on enhanced ICMP is applied to PON network monitoring, including:
[0043] Step S1, real-time monitoring of the host network, if a host network failure is detected, the host sends an ICMP ping command to the network fault node for fault diagnosis; in step S1, the host network refers to the local area network or wide area network to which the host is connected. In this embodiment, it is usually understood according to the local area network to which the host is connected. The host network can be other devices or network resources controlled or managed by the host, or it can be a collection of all network interfaces on the host, including Ethernet interfaces, wireless interfaces, etc., and it can also be a virtual network resource used by a virtual machine (VM) managed by a virtualization platform. The host can provide various network services for the network connected to it.
[0044] Step S2, the network device at the network fault node receives the ICMP ping instruction, detects the current fault state, and generates an EICMP message according to the current fault state; in this step, the EICMP message is an extension based on the ICMP message, that is, an enhanced ICMP message, and the EICMP message includes fault information.
[0045] Step S3, the EICMP message includes network performance monitoring information and physical layer monitoring information of the network device, and the EICMP message is returned to the requesting host that sends the ICMP ping command, and the EICMP message is parsed to perform corresponding fault analysis.
[0046] Steps S1 to S3 monitor the host network in real time to ensure that network faults can be discovered in a timely manner. Once a network fault is detected, the host will send an ICMP ping command to the network device at the network fault node to start the fault diagnosis process. After receiving the ICMP ping command, the network device at the fault node will detect its own fault status and generate an EICMP message containing fault information based on this. The EICMP message not only contains basic ICMP information, but also extends the fault information. The extended fault information includes network performance monitoring information and physical layer monitoring information. On the basis of the simple ICMP ping command, the ability to obtain the fault information of the network device itself is increased, thereby improving the ability to analyze network fault information, and the cause of the fault can be quickly determined and relevant personnel can be notified to take corresponding repair measures.
[0047] Steps S1 to S3 can respond quickly to network failures and reduce the impact of failures on services. More detailed information can be provided through EICMP messages. The network performance and physical layer monitoring information contained in the EICMP messages provide rich data support for fault analysis and can more accurately locate the cause of the fault. This process is an automated and intelligent process. The automated and intelligent fault diagnosis process reduces manual intervention and improves the efficiency of fault handling.
[0048] like Figure 1A As shown, preferably, in step S2, the network device at the network fault node receives the ICMP ping instruction and detects the current fault state, further comprising:
[0049] Step S21, the destination address of the ICMP ping instruction is the IP address of the network node where the network failure occurs, the host sends the ICMP ping instruction to the gateway, and forwards it to the network device at the network node failure location through the router;
[0050] Step S22, the network device at the faulty network node receives the ICMP ping instruction, detects the data specified in the ICMP ping instruction according to the request of the ICMP ping instruction, and determines whether the network device at the faulty network node has an abnormality;
[0051] Step S23: if the network device detecting the current network node failure has an abnormality, a corresponding data message is generated according to the data and status corresponding to the abnormality for storage and forwarding.
[0052] The optimization technical solution provided by steps S21 to S23 uses the ICMP ping instruction to perform network fault detection and diagnosis processes, identifies and responds to abnormal conditions in the network through the ICMP protocol, and then generates and forwards corresponding data packets for fault location and processing. The process of steps S21 to S23 can accurately locate the location of the fault by setting the destination address of the ICMP ping instruction to the IP address of the network node where the fault occurs. After receiving the ICMP ping instruction, the network device actively detects its own status and configuration to determine whether there is an abnormality. For example, the content of the self-check of the network device includes VLAN, port status, etc. Once an abnormality is detected, the network device generates specific data packets according to the abnormal situation. These packets contain detailed information about the fault, which provides a basis for generating EICMP packets and conducting further fault analysis and processing.
[0053] Preferably, the optimization technical solution of step S1 includes detecting a host network failure, specifically:
[0054] If it is detected that the ICMP ping command cannot be forwarded at the destination address, the ICMP ping command is resent;
[0055] If the ICMP ping command is resent three or more times, it is determined that the network device at the destination address is faulty and returns a corresponding ICMP ping error message response;
[0056] In the process of resending the ICMP ping command, the timeout period is determined by using an RTT algorithm with a weighted coefficient, and the RTT algorithm satisfies the following formula:
[0057] New RTT = α * old RTT + (1-α) * current RTT;
[0058] Where α is the smoothing factor.
[0059] It can be seen that in the optimization technical solution of step S1, a host network failure is detected. At this time, if the ICMP ping command cannot be forwarded, retransmission is required to avoid misjudging the network device failure due to instantaneous network fluctuations or temporary problems. After a certain number of retransmissions, if it still cannot be successfully forwarded, the system will determine that the network device at the destination address has a fault, and use the RTT algorithm with a weighted coefficient to dynamically adjust the timeout time to adapt to changes in network conditions and improve the sensitivity and response speed of fault detection.
[0060] By setting a retransmission mechanism in the optimization technical solution of step S1, false alarms caused by transient network problems are reduced, the accuracy of fault detection is improved, the fault can be quickly identified and an error message response is returned when a network fault occurs, the fault response time is accelerated, the dynamic calculation of the timeout time can adapt to the real-time changes in network conditions, the retransmission strategy is optimized, the number of unnecessary retransmissions is reduced, and an intelligent algorithm (RTT algorithm) is introduced to assist the fault detection process, reduce manual intervention, and improve the level of automation of network management.
[0061] Preferably, in step S2, the network device at the network fault node receives the ICMP ping instruction, detects the current fault state, and generates an EICMP message according to the current fault state, further comprising:
[0062] The network device at the network fault node receives the ICMP ping command and then performs a self-check to obtain its own device status information;
[0063] The network device at the network fault node packages the device status information and basic information for responding to the ICMP ping instruction into an EICMP message, and returns the EICMP message to the host that sent the ICMP ping instruction.
[0064] In step S2, the enhanced ICMP message (EICMP message) not only has the traditional ICMP Echo Reply response content, but also adds other response content. The newly added response content includes the status information of the device itself, and provides richer network diagnostic information in the form of EICMP (enhanced ICMP) messages.
[0065] The traditional ICMP ping command in the prior art can only test network connectivity, but does not provide status information of network devices, which has certain limitations. The optimization technical solution of step S2 enables network devices to share their own device status information through EICMP messages, providing more context information for fault diagnosis. After applying the EICMP message, the optimization technical solution enables network devices to share their own device status information through EICMP messages, providing more context information for fault diagnosis, reducing the need for manual intervention. The EICMP message integrates the device status information with the ICMP response information to form a unified EICMP message, simplifying the information transmission process and adding more information content to the response message.
[0066] Exemplarily, the device status information includes VLAN, source IP, destination IP and port status, and the basic information of the ICMP ping instruction includes ICMP Echo Reply information;
[0067] The EICMP message further includes returning an ICMP ping error message response, wherein the ICMP ping error message response is specifically a "time exceeded" message or a "destination unreachable" message;
[0068] More specifically, the network performance monitoring information is specifically the optical power information of the network device, and the physical layer monitoring information is specifically the PON LOS information of the network device.
[0069] The EICMP message also includes domain information, and the domain information further includes: domain identifier, domain length, domain information and domain information check code.
[0070] Compared with the traditional ICMP ping command, Enhanced ICMP (EICMP) provides a more comprehensive network monitoring and fault response mechanism. When a network device receives an ICMP ping command, it not only responds with basic ICMP EchoReply information, but also expands the response content to include device status information, as well as more detailed network performance and physical layer monitoring information, such as optical power information and status information.
[0071] Enhanced ICMP messages (EICMP messages) provide comprehensive status information of network devices and can monitor network performance and the physical layer. By obtaining information such as optical power and PON LOS status, the monitoring capability of network performance and physical connection status is enhanced. Combined with traditional ICMP error message responses, it provides more specific problem indications for fault diagnosis, helping network administrators to more accurately identify and locate problems, enabling network administrators to have a more comprehensive understanding of the status and performance of network devices, and improving the transparency and efficiency of network management. By automatically collecting and responding to fault information, manual intervention is reduced, the speed of fault response and repair is accelerated, and the risk of potential network interruption and performance degradation is reduced, which is conducive to rapid troubleshooting, improves network reliability, helps to optimize the use and management of network resources, and can adjust optical power allocation or repair physical links in a targeted manner.
[0072] It is worth noting that the optimization technical solution provided in this embodiment is applied to PON network monitoring. The content of PON network monitoring includes monitoring of network performance monitoring information and physical layer monitoring information, but it does not mean that the message content of the enhanced ICMP message (EICMP message) is limited to the above two types of information. The network performance monitoring information can be the optical power information of the network device, or other information of the network device, and is not limited to the optical power information of the network device, such as: bandwidth utilization, error rate, delay or latency monitoring, packet loss rate, throughput, connection status, service quality indicators, configuration changes, system resource usage, etc. Bandwidth utilization can monitor the bandwidth usage of network links to understand traffic load; error rate can track the number of error packets in the network, such as CRC errors or frame synchronization errors; delay or latency monitoring includes measuring the delay time of data packet transmission and the change of delay to ensure that the delay requirements can be met in application scenarios with high real-time requirements (such as VoIP, video conferencing, etc.); packet loss rate is used to monitor the proportion of data packets lost in the network; throughput can evaluate the amount of data successfully processed and forwarded by network devices in a given time; connection status can monitor whether the interfaces and connected devices of network devices are active; service quality indicators refer to continuous monitoring of whether the current network status can meet specific service quality requirements, such as bandwidth guarantees, delay requirements, etc.; configuration changes can monitor changes in network device configurations to facilitate tracking of potential configuration errors or unauthorized changes; system resource usage refers to monitoring the usage of important system resources in network devices, such as CPU, memory, storage media, etc., to avoid overload or failure accidents, etc. A person skilled in the art can add any network performance monitoring information in the PON network to an enhanced ICMP message (EICMP message) based on his / her general technical knowledge of the PON network, so as to enrich the content of the response message and realize more functions.
[0073] Similarly, the physical layer monitoring information may be the PON LOS information of the network device, or other information of the network device, and is not limited to the PON LOS information of the network device, such as: optical fiber connection status, signal quality, transmission distance, power status, hardware health status, temperature monitoring, system log, backup link status, etc. The fiber connection status can monitor whether the fiber link is correctly connected, whether there is a disconnection or poor contact problem; signal quality is used to evaluate the quality of the transmission signal, which may include indicators such as signal-to-noise ratio (SNR) and bit error rate (BER); transmission distance is used to record and monitor the distance of signal transmission to ensure that it is within the transmission capacity of the fiber; power status is used to monitor the power supply of the device; hardware health status is used to monitor the key hardware components of the network device, which may be lasers, receivers, amplifiers, etc.; temperature monitoring function is used to monitor the temperature of certain sensitive devices, such as video acquisition equipment, internal temperature and ambient temperature of fiber optic equipment; system logs are used to collect and analyze logs generated by network equipment during operation, store and record possible physical layer problems or errors; monitoring the status of backup links is one of the important redundancy strategies for network equipment and its system, which aims to improve the reliability and fault tolerance of the network, ensure that when the main link fails, the network traffic can be quickly switched to the backup path to reduce service interruption time, and provide load balancing when the main link approaches its capacity limit, which is used in scenarios with instantaneous large traffic. A person skilled in the art, relying on his / her common technical knowledge about physical layer monitoring information, can add the above or more information to an enhanced ICMP message (EICMP message) to enrich the content of the response message and realize more functions.
[0074] Exemplarily, the type field of the EICMP message is 240, and the data structure of the EICMP message includes: an ICMP header, a fault code, and a fault check code.
[0075] For the method steps disclosed in the above embodiments, the method steps are described as a series of action combinations for the purpose of simple description, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0076] Any process or method description described in a flowchart or other manner may be understood as representing a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations, in which the order shown or discussed may not be followed, including executing and implementing the functions in a substantially simultaneous manner or in a reverse order according to the functions involved, or executing computer instructions and implementing the corresponding functions according to program structures such as loops and branches, which can be naturally understood by those skilled in the art when implementing the embodiments of the present invention.
[0077] like Figure 2 The network fault location system based on enhanced ICMP includes:
[0078] The host network fault detection module is used to monitor the host network in real time. If a host network fault is detected, the host sends an ICMP ping command to the network fault node for fault diagnosis.
[0079] An EICMP message generation module, in which a network device at a network fault node receives an ICMP ping command, detects a current fault state, and generates an EICMP message according to the current fault state;
[0080] The EICMP message parsing module includes network performance monitoring information and physical layer monitoring information of the network device in the EICMP message, returns the EICMP message to the requesting host that sends the ICMP ping command, parses the EICMP message, and performs corresponding fault analysis.
[0081] The implementation methods of the system described above are merely illustrative, for example, the various functional modules, units or subsystems in the system may or may not be physically separated, or may or may not be physical units, that is, they may be located in the same place, or they may be distributed to multiple different systems and their subsystems or modules. Those skilled in the art may select some or all of the functional modules, units or subsystems according to actual needs to achieve the purpose of the embodiments of the present invention, and those of ordinary skill in the art may understand and implement the above-mentioned situations without creative work.
[0082] The enhanced ICMP network fault location method is further described in detail below through the implementation method of the present invention in a specific application scenario:
[0083] In one embodiment, the enhanced ICMP network fault location method includes the following steps:
[0084] Step 1: When a host network failure occurs, the host sends an ICMP ping request to diagnose the fault and find out the cause of the network failure. The destination address is the IP address where the network failure occurs. The ICMP ping is forwarded to the gateway through the second layer and reaches the faulty device through routing. If each device in the middle has a fault and the data cannot be forwarded, it responds to the ICMP ping request and retransmits the data three times before it is considered that the data cannot be forwarded. The retransmission time is determined according to the calculation result of the RTT algorithm.
[0085] The RTT algorithm formula is: RTT = receiving time - sending time
[0086] On the basis of the above formula, in order to prevent the impact of network jitter on data transmission, a weighting coefficient is added. The improved RTT algorithm formula is:
[0087] New RTT = α * old RTT + (1-α) * current RTT;
[0088] Here, α is the smoothing factor, and the value of α is usually between 0.8 and 0.9.
[0089] Step 2: The device receives the ICMP ping request and checks the VLAN (virtual local area network), source IP, destination IP, port status, etc. of the ICMP data. If the data and status are normal, forward it by looking up the Layer 2 forwarding table or routing forwarding table. If the data is abnormal, generate an EICMP message. EICMP is extended based on the ICMP message. The extended type field is 240, and the fault code represents the fault type.
[0090]
[0091] Fault code examples:
[0092] 1 Packet VLAN error 2 Forwarding port link down 3 Routing Error 4 PON authorization failed 5 ONU is not authorized 6 PON LOS 7 Optical power is too low other reserve
[0093] Fault check code: The EICMP check algorithm is as follows:
[0094]
[0095] Where n is the length of the check data.
[0096] Step 3: Get the domain flag of the device, which is not limited to port status, port VLAN, device geographic location information, device IP information, and generate detailed domain related information based on the fault code. The domain related information includes domain flag, domain length, domain information and domain information check code. Multiple domain information can exist at the same time. The data structure example of domain related information is as follows:
[0097]
[0098] Example of domain identification:
[0099] 1 IP information 2 Geographic location information 3 Port Status 4 Port vlan 5 Routing information 6 PON status information other reserve
[0100] Field length: refers to the length of the field information;
[0101] Domain information: Domain information uses the JSON format. The following example shows:
[0102]
[0103]
[0104] Domain information verification code: The algorithm is as follows:
[0105]
[0106] Where n is the length of the check data.
[0107] Step 4: The EICMP message is returned to the host that sent the ICMP ping request. The host parses the cause of the fault based on the EICMP and displays the error code and domain information on the faulty host.
[0108] like Figure 3 As shown, the present invention provides a network fault location method and system based on enhanced ICMP, and also provides corresponding electronic equipment and storage medium:
[0109] An electronic device comprises: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of a network fault location method based on enhanced ICMP.
[0110] A computer-readable storage medium stores a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of a network fault locating method based on enhanced ICMP.
[0111] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 3As shown, the device 800 includes a processor 801, a memory 802, a communication interface 803 and a communication bus 804. The processor 801, the memory 802 and the communication interface 803 communicate via the communication bus 804, and may also communicate via other means such as wireless transmission. The memory 802 is used to store instructions, and the processor 801 is used to execute the instructions stored in the memory 802. The memory 802 stores program code 8021, and the processor 801 may call the program code 8021 stored in the memory 802 to execute the steps of the network fault location method based on enhanced ICMP.
[0112] It should be understood that in the embodiment of the present application, the processor 801 may be a CPU, and the processor 801 may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0113] The memory 802 may include a read-only memory ROM and a random access memory RAM, and provide instructions and data to the processor 801. The memory 802 may also include a non-volatile random access memory. The memory 802 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (doubledate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM), and direct rambus RAM (DR RAM).
[0114] The communication bus 804 may include, in addition to the data bus, a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as the communication bus 804 in the figure.
[0115] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid state drive (SSD).
[0116] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0117] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, any one of the embodiments claimed in the claims can be used in any combination in the embodiments of the present invention.
[0118] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0119] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0120] All features disclosed in this specification, or steps in all methods or processes disclosed, except mutually exclusive features and / or steps, can be combined in any way. Any feature disclosed in this specification, unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features. Throughout the specification, the same reference numerals indicate the same elements.
[0121] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition they can be divided into multiple submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including corresponding claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner can be combined in any combination. Unless otherwise explicitly stated, each feature disclosed in this specification (including corresponding claims, abstracts and drawings) can be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A network fault location method based on enhanced ICMP, applied to PON network monitoring, characterized in that: include: Monitor the host network in real time. If a host network failure is detected, the host will send an ICMP ping command to the network fault node for fault diagnosis. The network device at the network fault node receives the ICMP ping command, detects the current fault status, and generates an EICMP message according to the current fault status; The EICMP message includes network performance monitoring information and physical layer monitoring information of the network device, and the EICMP message is returned to the requesting host that sends the ICMP ping command, and the EICMP message is parsed to perform corresponding fault analysis; The network device at the network fault node receives the ICMP ping instruction and detects the current fault state, further comprising: The destination address of the ICMP ping instruction is the IP address of the network node where the network failure occurs. The host sends the ICMP ping instruction to the gateway, and forwards it to the network device at the network node failure location through the router; The network device at the faulty network node receives the ICMP ping instruction, detects the data specified in the ICMP ping instruction according to the request of the ICMP ping instruction, and determines whether the network device at the faulty network node has an abnormality; If the network device that detects the current network node failure has an abnormal situation, a corresponding data message is generated according to the data and status corresponding to the abnormal situation for storage and forwarding; The network device at the network fault node receives the ICMP ping instruction, detects the current fault state, and generates an EICMP message according to the current fault state, further comprising: The network device at the network fault node receives the ICMP ping command and then performs a self-check to obtain its own device status information; The network device at the network fault node packages the device status information and basic information for responding to the ICMP ping instruction into an EICMP message, and returns the EICMP message to the host that sent the ICMP ping instruction; The device status information includes VLAN, source IP, destination IP and port status, and the basic information of the ICMP ping command includes ICMP Echo Reply information; The EICMP message further includes returning an ICMP ping error message response, wherein the ICMP ping error message response is specifically a "time exceeded" message or a "destination unreachable" message; The network performance monitoring information is specifically the optical power information of the network device, and the physical layer monitoring information is specifically the PON LOS information of the network device; The EICMP message also includes domain information, and the domain information further includes: domain identifier, domain length, domain information and domain information check code; The type field of the EICMP message is 240, and the data structure of the EICMP message includes: an ICMP header, a fault code, and a fault check code.
2. The network fault location method based on enhanced ICMP according to claim 1, characterized in that: If a host network failure is detected, the host sends an ICMP ping command to the network failure node for fault diagnosis, specifically: If it is detected that the ICMP ping command cannot be forwarded at the destination address, the ICMP ping command is resent; If the ICMP ping command is resent three or more times, it is determined that the network device at the destination address is faulty and returns a corresponding ICMP ping error message response; In the process of resending the ICMP ping command, the timeout period is determined by using an RTT algorithm with a weighted coefficient, and the RTT algorithm satisfies the following formula: New RTT = α Old RTT + (1-α) Current RTT; Where α is the smoothing factor.
3. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method described in any one of claims 1 to 2.
4. A computer-readable storage medium, characterized in that: It stores a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of the method described in any one of claims 1 to 2.
Citation Information
Patent Citations
Method, device and system for acquiring retransmission timeout value
CN112087349A
CDN network quality detection method and system, server and storage medium
CN113872824A