Network loopback detection method, device, electronic device and storage medium

The management module monitors switch data information and watchdog signals, detects and locates network loopbacks, solves the problem of insufficient self-management functions of layer 2 switch chips, realizes rapid detection and processing of network loopbacks, and improves system reliability and Maintenance efficiency.

CN115766416BActive Publication Date: 2024-10-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202211594878.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2024-10-22
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

The self-management function of the Layer 2 switch chip is weak and cannot automatically detect and recover network loopback problems, causing the management network to fail for a long time.

Method used

Communicates with the switch through the management module, monitors data information and watchdog signals, detects network loopbacks, changes port enablement status, locates loopback locations, and handles them through logging and displaying events.

Benefits of technology

It achieves timely detection and processing of network loopbacks, reduces the impact of loopbacks on the network, avoids long-term failure of the management network, and improves system reliability and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766416B_ABST
    Figure CN115766416B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a network loopback detection method, device, electronic device and storage medium. The method is applied to a management module, and the management module is connected to a switch. The method includes: querying data information on the switch and monitoring the watchdog feeding signal on the switch. When the data information is abnormal and the watchdog feeding signal is normal, it is determined that a network loopback is detected. The data information abnormality is that the external MAC address in the MAC address table drifts, the number of data packets is greater than a preset threshold, and the computing resource usage rate is abnormal. In the embodiment of the present invention, the switch operation is supervised by the management module, and the network loopback problem can be detected timely and effectively according to the data information of the switch, so that after the network loopback is found, the network loopback can be promptly resolved by performing corresponding processing to reduce the impact caused by the network loopback.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a network loopback detection method, a network loopback detection device, an electronic device and a computer-readable storage medium. Background Art

[0002] Network loopback failures will cause data packets to be forwarded repeatedly in the network transmission channel, eventually forming a broadcast storm. The actual problem caused by network loopback is the broadcast storm. Ports in the same network segment will all have problems due to the existence of the broadcast storm. The broadcast storm will occupy a large amount of network bandwidth, resulting in a decline in the quality of normal operation services, and even complete paralysis and freezing.

[0003] In mid-to-high-end storage systems, embedded switch chips (switches) are often used for network interconnection of the entire machine management system. The switch chips used in the management system are generally similar to layer 2 switch chips. Due to cost and scale issues, such chips have weak self-management functions. If a network loopback problem occurs within the system, it cannot automatically detect and restore basic network communication functions, which ultimately causes the entire machine management network to fail for a long time. Summary of the invention

[0004] The embodiment of the present invention provides a network loopback detection method, device, electronic device and storage medium to solve the problem that the self-management function of the second-layer switch chip is weak. If a network loopback problem occurs inside the system, it cannot automatically detect and restore the basic network communication function, which ultimately leads to the long-term failure of the entire machine management network.

[0005] The embodiment of the present invention discloses a network loopback detection method, which is applied to a management module, wherein the management module is communicatively connected with a switch, and the method includes:

[0006] Query the data information on the switch and monitor the watchdog feeding signal on the switch; wherein the data information includes a MAC address table, a port data packet quantity, and a computing resource utilization rate;

[0007] When the data information is abnormal and the dog feeding signal is normal, it is determined that a network loopback is detected; the data information abnormality is that the external MAC address in the MAC address table drifts, the number of data packets is greater than a preset threshold, and the computing resource usage rate is abnormal;

[0008] The enabling state of each inner port on the switch is changed in sequence, and the location where the network loop occurs is determined according to the state change of the data information.

[0009] Optionally, sequentially changing the enabled state of each internal port on the switch and determining the location where the network loopback occurs according to the state change of the data information includes:

[0010] disabling each internal port on the switch in turn, and determining whether the data information abnormality stops;

[0011] When the data information stops abnormally, determining the currently disabled internal port as the target internal port with network loopback;

[0012] When the data information anomaly does not stop when the internal ports on the switch are disabled in sequence, it is determined that a network loop exists in the external network.

[0013] Optionally, sequentially changing the enabled state of each internal port on the switch and determining the location where the network loopback occurs according to the state change of the data information includes:

[0014] Disabling all inbound ports on the switch;

[0015] Enable each of the internal ports on the switch in sequence, and determine whether the data information is abnormal;

[0016] When the data information is abnormal, determining the currently enabled internal port as the target internal port with network loopback;

[0017] When the internal ports on the switch are enabled in sequence, the data information is abnormal, and it is determined that a network loop exists in the external network.

[0018] Optionally, after determining the target internal port where a network loopback exists according to the abnormal / normal state change of the data information, the method further includes:

[0019] The target internal port is disabled, and other internal ports are used to communicate with the external network.

[0020] Optionally, after querying the data information on the switch and monitoring the feeding signal of the watchdog on the switch, the method further includes:

[0021] When the data information is normal and the dog feeding signal is abnormal, the switch is reset.

[0022] Optionally, when the data information is abnormal and the dog feeding signal is normal, after determining that a network loopback is detected, the method further includes:

[0023] Record network loopback events through logging;

[0024] After determining the target internal port with a network loopback according to the abnormal / normal state change of the data information, or determining that the external network has a network loopback, the method further includes:

[0025] The log records the target internal port event of network loopback, or records the network loopback event of the external network.

[0026] Optionally, after recording the network loopback event in a log, the method further includes:

[0027] Displaying the network loopback event;

[0028] After recording the target internal port event of network loopback through the log, or recording the network loopback event of the external network, the method further includes:

[0029] The target internal port event with network loopback or the external network network loopback event is displayed.

[0030] The embodiment of the present invention further discloses a network loopback detection device, which is applied to a management module, wherein the management module is communicatively connected with a switch, and comprises:

[0031] An information query module, used to query the data information on the switch and monitor the watchdog feeding signal on the switch; wherein the data information includes a MAC address table, a port data packet quantity, and a computing resource utilization rate;

[0032] A network loopback detection module, used to determine that a network loopback is detected when the data information is abnormal and the dog feeding signal is normal; the data information abnormality is that the external MAC address in the MAC address table drifts, the number of data packets is greater than a preset threshold, and the computing resource usage rate is abnormal;

[0033] The network loopback determination module is used to sequentially change the enabled state of each internal port on the switch and determine the location where the network loopback occurs according to the state change of the data information.

[0034] Optionally, the network loopback determination module includes:

[0035] A first port disabling submodule is used to disable each internal port on the switch in turn and determine whether the data information abnormality stops;

[0036] A first port determination submodule, configured to determine the currently disabled internal port as a target internal port with a network loopback when the data information stops abnormally;

[0037] The first external network determination submodule is used to determine that a network loop exists in the external network when the data information anomaly does not stop when the internal ports on the switch are disabled in sequence.

[0038] Optionally, the network loopback determination module includes:

[0039] A second port disabling submodule, used to disable all inbound ports on the switch;

[0040] A port enabling submodule, used to enable each of the internal ports on the switch in turn, and determine whether the data information is abnormal;

[0041] A second port determination submodule is used to determine the currently enabled internal port as a target internal port with a network loopback when the data information is abnormal;

[0042] The second external network determination submodule is used to determine that a network loop exists in the external network when the data information is abnormal when the internal ports on the switch are enabled in sequence.

[0043] Optionally, it also includes:

[0044] The port disabling module is used to disable the target internal port and use other internal ports to communicate with the external network.

[0045] Optionally, it also includes:

[0046] The switch reset module is used to reset the switch when the data information is normal and the dog feeding signal is abnormal.

[0047] Optionally, it also includes:

[0048] A first event recording module, used for recording network loopback events through logs;

[0049] Optionally, it also includes:

[0050] The second event recording module is used to record the target internal port event of network loopback through the log, or record the network loopback event of the external network.

[0051] Optionally, it also includes:

[0052] A first event display module, used for displaying the network loopback event;

[0053] Optionally, it also includes:

[0054] The second event display module is used to display the target internal port event with network loopback or the external network event with network loopback.

[0055] The embodiment of the present invention further discloses an electronic device, comprising 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;

[0056] The memory is used to store computer programs;

[0057] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0058] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0059] The embodiments of the present invention include the following advantages: the operation of the switch embedded in the system is supervised by the management module, and the network loopback problem can be detected timely and effectively according to the data information of the switch, so that after the network loopback is found, the network loopback can be promptly resolved by performing corresponding processing, thereby reducing the impact caused by the network loopback, avoiding the long-term failure of the management network caused by the switch abnormality, and improving the reliability of the entire system.

[0060] Moreover, after initially detecting the existence of a network loopback problem, the enabling status of each internal port on the switch can be changed in turn, and then the location of the network loopback can be determined based on the status changes of the data information, so as to quickly and accurately locate the location of the network loopback problem and improve the maintenance efficiency of the staff. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 is a flowchart of a network loopback detection method provided in an embodiment of the present invention;

[0062] Figure 2 is a structural block diagram of a network loopback detection system provided in an embodiment of the present invention;

[0063] Figure 3 It is a structural block diagram of a network loopback detection device provided in an embodiment of the present invention;

[0064] Figure 4 is a block diagram of an electronic device provided in an embodiment of the present invention;

[0065] Figure 5 It is a block diagram of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0066] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0067] Reference Figure 1 , shows a flowchart of the steps of a network loopback detection method provided in an embodiment of the present invention, the network loopback detection method is applied to a management module, the management module is communicatively connected with a switch, and the method steps specifically include:

[0068] Step 101: query the data information on the switch and monitor the watchdog feeding signal on the switch.

[0069] The data information includes a MAC address table, a port data packet quantity, and a computing resource utilization rate.

[0070] Switches are usually embedded in mid-to-high-end storage systems, management systems, etc., and are used for system network interconnection. The internal port on the switch refers to the port used by system applications, and the external port refers to the port used by the external network to access the system application.

[0071] The management module is an embedded management chip such as a BMC (Baseboard Management Controller) chip or an ARM (Advanced RISC MAChines, ARM processor) chip, which is used to monitor the operation of the switch embedded in the system.

[0072] MAC (Media Access Control) address table. The key technology for switches to send data packets directly to the destination node, rather than broadcasting to all nodes like a hub, is that switches can identify the MAC addresses of the network cards of nodes connected to the network and put them in a place called a MAC address table. This MAC address table is stored in the switch's cache and remembers these addresses. In this way, when data needs to be sent to the destination address, the switch can find the node location of this MAC address in the MAC address table and send it directly to the node at this location.

[0073] The management module can communicate with the switch through a low-speed management bus such as MDC / MDIO. The computing resource utilization refers to the CPU utilization.

[0074] Specifically, the management module can communicate with the switch through low-speed management buses such as MDC / MDIO, and can query information in the switch such as MAC table, number of data packets on each port, CPU usage, etc. in real time. In addition, the management module also monitors the feeding signal of the watchdog on the switch.

[0075] Step 102: When the data information is abnormal and the dog feeding signal is normal, it is determined that a network loopback is detected.

[0076] Among them, the data information anomaly is that the external MAC address in the MAC address table drifts, the number of data packets is greater than a preset threshold, and the computing resource usage rate is abnormal.

[0077] MAC address drift refers to the phenomenon that in the same VLAN (Virtual Local Area Network), a MAC address has two outbound interfaces, and the later learned outbound interface covers the original outbound interface. This is the official definition. In layman's terms, MAC address drift refers to the change of the outbound interface of the MAC address table entry.

[0078] The management module stores the default value and theoretical limit value corresponding to the data information. The default value is collected from the information of the typical configuration when the whole machine is aged and shipped out of the factory. The theoretical limit value comes from the manufacturer's configuration information under the limit performance of the current management network topology. The theoretical limit value can also be modified through the serial port module. The preset threshold is the theoretical limit value corresponding to the number of data packets.

[0079] Abnormal computing resource usage refers to an abnormal surge in computer usage.

[0080] Specifically, when the external MAC address in the real-time MAC table collected by the management module drifts, the data packet on the switch's external port exceeds the preset threshold, the CPU usage rate soars abnormally, and the watchdog's feeding signal is normal, a network loopback problem is initially detected.

[0081] In the above embodiment, after determining that there is a network loopback problem, the subsequent location of the network loopback problem is further located, which can avoid the impact of the network caused by the location of the network loopback position and save the computing resources of the processor.

[0082] Step 103: sequentially changing the enabled state of each internal port on the switch, and determining the location where the network loop occurs according to the state change of the data information.

[0083] The internal port on the switch refers to the port used by the system application, and the external port refers to the port used by the external network to access the system application.

[0084] Specifically, after the initial detection of the vehicle network loopback problem, the network loopback problem may occur on a certain internal port on the switch, or may occur in the external network, so it is necessary to further detect the network loopback problem to further determine the location where the network loopback problem occurs. The specific management module changes the enabled state of each internal port on the switch in turn, and determines the location where the network loopback occurs based on the state change of the data information (such as changing the abnormal state to the normal state, or maintaining the abnormal state consistently, etc.).

[0085] For example, when disabling an internal port on the switch, the data information is still abnormal, so re-enable this internal port and disable the next internal port. When the data information stops abnormally, it can be determined that the currently disabled internal port has a network loopback problem, and the internal port is determined as the target internal port. If the data information is always abnormal after all the internal ports on the switch are disabled, it means that there is no network loopback problem on the internal port, and it can be determined that there is a network loopback problem on the external network.

[0086] In the embodiment of the present invention, the operation of the switch embedded in the system is supervised by the management module, and the network loopback problem can be detected timely and effectively according to the data information of the switch, so that after the network loopback is found, the network loopback can be promptly resolved by performing corresponding processing, thereby reducing the impact caused by the network loopback, avoiding the long-term failure of the management network caused by the switch abnormality, and improving the reliability of the entire system.

[0087] In addition, after initially detecting the existence of a network loopback problem, the enabled status of each internal port on the switch is changed in turn, and the location of the network loopback is determined based on the status changes of the data information. This can quickly and accurately locate the location of the network loopback problem and improve the maintenance efficiency of the staff.

[0088] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.

[0089] After initially detecting that there is a network loop problem on the switch, you can further determine the location of the network loop problem in a variety of ways so that the staff can perform maintenance. The details are as follows:

[0090] In an optional embodiment of the present invention, the enabling state of each internal port on the switch is changed in sequence, and the location where the network loop occurs is determined according to the state change of the data information, including: disabling each internal port on the switch in sequence, and judging whether the data information abnormality stops; when the data information abnormality stops, determining the currently disabled internal port as the target internal port where the network loop exists; when the data information abnormality does not stop when each of the internal ports on the switch is disabled in sequence, determining that a network loop exists in the external network.

[0091] Specifically, each internal port on the switch is disabled in turn, one internal port on the switch is disabled each time, and it is determined whether the data information abnormality stops and changes to a normal state.

[0092] When the data information stops abnormally, it is determined that the currently disabled internal port has a network loopback problem, and the currently disabled internal port is determined as the target internal port.

[0093] If the data information still remains abnormal, it means that the currently disabled internal port does not have a network loop problem. Re-enable the currently disabled internal port and disable the next internal port for judgment.

[0094] When the internal ports on the switch are disabled one by one, the data information abnormalities do not stop, indicating that there are no network loopback problems on all the internal ports, so it can be determined that there are network loopback problems in the external network.

[0095] In the above embodiment, after the network loopback problem is initially detected, each internal port on the switch is disabled / enabled in turn, and the target internal port with the network loopback is determined based on the abnormal / normal state changes of the data information, or it is determined that the network loopback exists in the external network. The location where the network loopback problem occurs can be quickly and accurately located, thereby improving the maintenance efficiency of the staff.

[0096] In another optional embodiment of the present invention, the enabling state of each internal port on the switch is changed in sequence, and the location where the network loop occurs is determined according to the state change of the data information, including: disabling all internal ports on the switch; enabling each of the internal ports on the switch in sequence, and determining whether the data information is abnormal; when the data information is abnormal, determining the currently enabled internal port as the target internal port where the network loop exists; when each of the internal ports on the switch is enabled in sequence, the data information is all abnormal, and it is determined that a network loop exists in the external network.

[0097] Specifically, after initially detecting that there is a network loop problem on the switch, first disable all internal ports on the switch, then enable each internal port on the switch in turn, only enabling one internal port at a time, and determine whether the queried data information is abnormal.

[0098] When the data information is abnormal, it is determined that the currently enabled internal port has a network loopback problem, and the currently enabled internal port is determined as the target internal port.

[0099] If the data information is normal, it indicates that the currently enabled internal port does not have a network loopback problem. Re-disable the currently enabled internal port and enable the next internal port for judgment.

[0100] When the internal ports on the switch are enabled in turn, the data information is abnormal, indicating that there is no network loopback problem on all the internal ports, so it can be determined that there is a network loopback problem in the external network.

[0101] In the above embodiment, after the network loopback problem is initially detected, each internal port on the switch is disabled / enabled in turn, and the target internal port with the network loopback is determined based on the abnormal / normal state changes of the data information, or it is determined that the network loopback exists in the external network. The location where the network loopback problem occurs can be quickly and accurately located, thereby improving the maintenance efficiency of the staff.

[0102] In addition, by enabling each internal port on the switch in turn to determine the location where the network loopback problem occurs, when two or more internal ports have network loopback problems, the internal port with the network loopback can still be determined.

[0103] It should be noted that after disabling / enabling an internal port, the internal port will be enabled / disabled at a preset interval to reserve time for data information to be updated, and then the next internal port will be disabled / enabled.

[0104] In another optional embodiment of the present invention, after determining the target internal port with a network loopback according to the abnormal / normal state change of the data information, it also includes: disabling the target internal port and using other internal ports to communicate with the external network.

[0105] Specifically, after determining the target internal port with a network loopback based on the abnormal / normal status changes of the data information, in order to prevent the network loopback problem from continuing to affect the network, the target internal port is disabled, waiting for subsequent staff to perform corresponding processing and resolve the network loopback in time.

[0106] In another optional embodiment of the present invention, after querying the data information on the switch and monitoring the watchdog feeding signal on the switch, it also includes: when the data information is normal and the watchdog feeding signal is abnormal, resetting the switch.

[0107] Specifically, if the management module determines that the watchdog's feeding signal is abnormal, such as not receiving the feeding signal within a preset time, and the data information is normal (no network loopback or other abnormalities), the switch is directly reset and corrected to restore normal communication.

[0108] In another optional embodiment of the present invention, after determining that a network loopback is detected when the data information is abnormal and the dog feeding signal is normal, the method further includes: recording a network loopback event through a log; after determining that a target internal port with a network loopback exists according to the abnormal / normal state change of the data information, or determining that a network loopback exists in the external network, the method further includes: recording a target internal port event with a network loopback through the log, or recording a network loopback event in the external network.

[0109] Specifically, after determining that a network loopback is detected, or determining the target internal port where a network loopback exists, or determining that a network loopback exists in an external network, the network loopback detection event, the target internal port event where a network loopback exists, and the network loopback event in the external network can be recorded through a log so that the staff can quickly analyze and find out the cause of the network loopback based on the events recorded in the log, and then perform corresponding processing to resolve the network loopback in time.

[0110] In another optional embodiment of the present invention, after recording the network loopback event through the log, it also includes: displaying the network loopback event; after recording the target internal port event with network loopback through the log, or recording the network loopback event of the external network, it also includes: displaying the target internal port event with network loopback, or the network loopback event of the external network.

[0111] Specifically, the management module can communicate with the corresponding management terminal through a serial port module or other network communication modules. After the log records detect a network loopback event, a target internal port event with a network loopback, or a network loopback event in the external network, the recorded event is sent to the management terminal and displayed so that the staff can quickly analyze and find out the cause of the network loopback based on the displayed event, and then perform corresponding processing to resolve the network loopback in time.

[0112] In order to better understand the above embodiment, an embodiment will be used for exemplary description below.

[0113] Reference Figure 2 , showing a structural block diagram of a network loopback detection system provided in an embodiment of the present invention, management module: This module is located on the motherboard, and is mainly used for embedded management chips such as BMC / ARM. This module can communicate with the switch through a low-speed management bus such as MDC / MDIO. Switch: This switch is located on the motherboard, connected to the NIC through a high-speed Serdes, and controlled by the management module. NIC module: Connected to the switch through a high-speed Serdes, and finally continue network communication with the outside world through the PHY (Physical Layer) module. Serial port module: The serial port module can be used to exchange information and configure parameters between the outside world and the management module.

[0114] NIC1 is interconnected with the switch through two Serdes. The switch divides the two networks into VLAN1 / 2 in the form of ports. The outside world can access the two ports of NIC1 at the same time. NIC2 is interconnected with the switch through one Serdes. The switch divides this network into VLAN3. The management module can communicate with the switch through low-speed management buses such as MDC / MDIO, and can obtain information such as mac table, number of data packets on each port, CPU usage, etc. in real time. The management module also stores the default value and theoretical limit value of such information. The default value is collected from the information under the typical configuration when the whole machine is aged and shipped out of the factory. The theoretical limit value comes from the manufacturer's configuration information under the limit performance of the current management network topology. The theoretical limit value can be modified through the serial port module. In addition, the management module also monitors the watchdog signal of the switch.

[0115] When the management module collects real-time mac table data from NIC1 related external mac address drifts, the switch external port data packets exceed the theoretical limit, the CPU usage rate soars abnormally at the same time, and the watchdog is normal, it is preliminarily judged that there is a network loopback, and the management module records the log (log) and prints the judgment information through the serial port module. The SW management module disables / enables each internal port in the switch in turn and judges in real time whether the abnormal situation has stopped. If it has not stopped, it uploads the judgment information of the existence of external network loopback; if the abnormal situation stops, it continues to disable the switch problem port (target internal port), uploads operation information and prompts that the problem port has a loopback. At this time, the outside world can only communicate through one VLAN network of NIC1. If the SW management module determines that the switch watchdog is abnormal and there are no other abnormal judgments such as network loopback, it resets the switch to restore normal communication.

[0116] In the above embodiment, the operation of the switch embedded in the system is supervised by the management module. After the management module confirms that the switch is abnormal and cannot be automatically restored, the switch can be detected and corrected to avoid management network failure caused by the switch abnormality, thereby improving the reliability of the entire system.

[0117] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware 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, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware 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.

[0118] Reference Figure 3 , shows a structural block diagram of a network loopback detection device provided in an embodiment of the present invention, the network loopback detection device 300 is applied to a management module, the management module is connected to the switch in communication, and includes:

[0119] The information query module 301 is used to query the data information on the switch and monitor the watchdog feeding signal on the switch; wherein the data information includes a MAC address table, a port data packet quantity, and a computing resource utilization rate;

[0120] A network loopback detection module 302 is used to determine that a network loopback is detected when the data information is abnormal and the dog feeding signal is normal; the data information abnormality is that the external MAC address in the MAC address table drifts, the number of data packets is greater than a preset threshold, and the computing resource usage rate is abnormal;

[0121] The network loopback determination module 303 is used to sequentially change the enabled state of each internal port on the switch, and determine the location where the network loopback occurs according to the state change of the data information.

[0122] In an optional embodiment of the present invention, the network loopback determination module includes:

[0123] A first port disabling submodule is used to disable each internal port on the switch in turn and determine whether the data information abnormality stops;

[0124] A first port determination submodule, configured to determine the currently disabled internal port as a target internal port with a network loopback when the data information stops abnormally;

[0125] The first external network determination submodule is used to determine that a network loop exists in the external network when the data information anomaly does not stop when the internal ports on the switch are disabled in sequence.

[0126] In an optional embodiment of the present invention, the network loopback determination module includes:

[0127] A second port disabling submodule, used to disable all inbound ports on the switch;

[0128] A port enabling submodule, used to enable each of the internal ports on the switch in turn, and determine whether the data information is abnormal;

[0129] A second port determination submodule is used to determine the currently enabled internal port as a target internal port with a network loopback when the data information is abnormal;

[0130] The second external network determination submodule is used to determine that a network loop exists in the external network when the data information is abnormal when the internal ports on the switch are enabled in sequence.

[0131] In an optional embodiment of the present invention, it also includes:

[0132] The port disabling module is used to disable the target internal port and use other internal ports to communicate with the external network.

[0133] In an optional embodiment of the present invention, it also includes:

[0134] The switch reset module is used to reset the switch when the data information is normal and the dog feeding signal is abnormal.

[0135] In an optional embodiment of the present invention, it also includes:

[0136] A first event recording module, used for recording network loopback events through logs;

[0137] In an optional embodiment of the present invention, it also includes:

[0138] The second event recording module is used to record the target internal port event of network loopback through the log, or record the network loopback event of the external network.

[0139] In an optional embodiment of the present invention, it also includes:

[0140] A first event display module, used for displaying the network loopback event;

[0141] In an optional embodiment of the present invention, it also includes:

[0142] The second event display module is used to display the target internal port event with network loopback or the external network event with network loopback.

[0143] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0144] In the above embodiment, the network loopback detection device can monitor the operation of the switch embedded in the system through the management module, and can detect the network loopback problem in a timely and effective manner according to the data information of the switch, so that after the network loopback is found, the network loopback can be promptly resolved by performing corresponding processing, thereby reducing the impact caused by the network loopback, avoiding the long-term failure of the management network caused by the switch abnormality, and improving the reliability of the entire system.

[0145] Moreover, after initially detecting the existence of a network loopback problem, each internal port on the switch is disabled / enabled in turn, and the target internal port with the network loopback is determined based on the abnormal / normal status changes of the data information, or the existence of a network loopback in the external network is determined. This can quickly and accurately locate the location of the network loopback problem, thereby improving the maintenance efficiency of the staff.

[0146] In addition, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned data acquisition method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0147] Figure 4 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0148] The electronic device 400 includes but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, a processor 410, and a power supply 411. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.

[0149] It should be understood that in the embodiment of the present invention, the radio frequency unit 401 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 410 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 401 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 401 can also communicate with the network and other devices through a wireless communication system.

[0150] The electronic device provides users with wireless broadband Internet access through the network module 402, such as helping users to send and receive emails, browse web pages, and access streaming media.

[0151] The audio output unit 403 can convert the audio data received by the RF unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output it as sound. Moreover, the audio output unit 403 can also provide audio output related to a specific function performed by the electronic device 400 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, etc.

[0152] The input unit 404 is used to receive audio or video signals. The input unit 404 may include a graphics processor (GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 406. The image frame processed by the graphics processor 4041 can be stored in the memory 409 (or other storage medium) or sent via the radio frequency unit 401 or the network module 402. The microphone 4042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 401 in the case of a telephone call mode.

[0153] The electronic device 400 also includes at least one sensor 404, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 4061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 4061 and / or the backlight when the electronic device 400 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 405 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0154] The display unit 406 is used to display information input by the user or information provided to the user. The display unit 406 may include a display panel 4061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0155] The user input unit 407 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. The touch panel 4071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 4071 or near the touch panel 4071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 4071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 410, receives the command sent by the processor 410 and executes it. In addition, the touch panel 4071 can be implemented using various types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 4071, the user input unit 407 may also include other input devices 4072. Specifically, other input devices 4072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.

[0156] Furthermore, the touch panel 4071 may be overlaid on the display panel 4061. When the touch panel 4071 detects a touch operation on or near it, it is transmitted to the processor 410 to determine the type of the touch event. Then, the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Figure 4 In the figure, the touch panel 4071 and the display panel 4061 are two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 4071 and the display panel 4061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.

[0157] The interface unit 408 is an interface for connecting an external device to the electronic device 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 407 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 400 or may be used to transmit data between the electronic device 400 and an external device.

[0158] The memory 409 can be used to store software programs and various data. The memory 409 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 409 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0159] The processor 410 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 409, and calling data stored in the memory 409, so as to monitor the electronic device as a whole. The processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 410.

[0160] The electronic device 400 may also include a power supply 411 (such as a battery) for supplying power to each component. Preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.

[0161] In addition, the electronic device 400 includes some functional modules not shown, which will not be described in detail here.

[0162] The embodiment of the present invention also provides a computer readable storage medium, such as Figure 5As shown, the computer readable storage medium stores a computer program 501, and when the computer program 501 is executed by the processor, each process of the above data acquisition method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0163] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0164] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0165] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0166] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0167] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0168] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0169] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0170] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0171] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0172] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A network loopback detection method, It is characterized in that Applied to a management module, the management module is communicatively connected with a switch, the method comprising: Query the data information on the switch and monitor the watchdog feeding signal on the switch; wherein the data information includes a MAC address table, a port data packet quantity, and a computing resource utilization rate; When the data information is abnormal and the dog feeding signal is normal, it is determined that a network loopback is detected; the data information abnormality is that the external MAC address in the MAC address table drifts, the number of data packets is greater than a preset threshold, and the computing resource usage rate is abnormal; sequentially changing the enabled state of each internal port on the switch, and determining the location where the network loop occurs according to the state change of the data information; The step of sequentially changing the enabled state of each internal port on the switch and determining the location where the network loop occurs according to the state change of the data information includes: disabling each internal port on the switch in turn, and determining whether the data information abnormality stops; When the data information stops abnormally, determining the currently disabled internal port as the target internal port with network loopback; When the data information anomaly does not stop when the internal ports on the switch are disabled in sequence, it is determined that a network loop exists in the external network.

2. The method according to claim 1, It is characterized in that The step of sequentially changing the enabled state of each internal port on the switch and determining the location where the network loop occurs according to the state change of the data information includes: Disabling all inbound ports on the switch; Enable each of the internal ports on the switch in sequence, and determine whether the data information is abnormal; When the data information is abnormal, determining the currently enabled internal port as the target internal port with network loopback; When the internal ports on the switch are enabled in sequence, the data information is abnormal, and it is determined that a network loop exists in the external network.

3. The method according to claim 1, It is characterized in that After determining the target internal port with a network loopback according to the abnormal / normal state change of the data information, the method further includes: The target internal port is disabled, and other internal ports are used to communicate with the external network.

4. The method according to claim 1, It is characterized in that After querying the data information on the switch and monitoring the feeding signal of the watchdog on the switch, the method further includes: When the data information is normal and the dog feeding signal is abnormal, the switch is reset.

5. The method according to claim 1, It is characterized in that When the data information is abnormal and the dog feeding signal is normal, after determining that a network loopback is detected, the method further includes: Record network loopback events through logging; After determining the target internal port with a network loopback according to the abnormal / normal state change of the data information, or determining that the external network has a network loopback, the method further includes: The log records the target internal port event of network loopback, or records the network loopback event of the external network.

6. The method according to claim 5, It is characterized in that After recording the network loopback event through logging, it also includes: Displaying the network loopback event; After recording the target internal port event of network loopback through the log, or recording the network loopback event of the external network, the method further includes: The target internal port event with network loopback or the external network network loopback event is displayed.

7. A network loopback detection device, It is characterized in that Applied to a management module, the management module is connected to the switch in communication, and includes: An information query module, used to query the data information on the switch and monitor the watchdog feeding signal on the switch; wherein the data information includes a MAC address table, a port data packet quantity, and a computing resource utilization rate; A network loopback detection module, used to determine that a network loopback is detected when the data information is abnormal and the dog feeding signal is normal; the data information abnormality is that the external MAC address in the MAC address table drifts, the number of data packets is greater than a preset threshold, and the computing resource usage rate is abnormal; A network loopback determination module, used to sequentially change the enabled state of each internal port on the switch, and determine the location where the network loopback occurs according to the state change of the data information; The network loopback determination module includes: A first port disabling submodule is used to disable each internal port on the switch in turn and determine whether the data information abnormality stops; A first port determination submodule, configured to determine the currently disabled internal port as a target internal port with a network loopback when the data information stops abnormally; The first external network determination submodule is used to determine that a network loop exists in the external network when the data information anomaly does not stop when the internal ports on the switch are disabled in sequence.

8. An electronic device, It is 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 through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 6 when executing the program stored in the memory.

9. A computer-readable storage medium, It is characterized in that Instructions are stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for detecting communication loopback fault in communication network

    CN108696398A

  • Network loop processing method and system and related equipment

    CN111901234A

  • Network loop problem rapid positioning method and system

    CN112260922A

  • Loop inspection circuit applicable to EOC system

    CN203722657U

  • Systems and methods for hardware-implemented anomaly detection in VLAN network using loopback port

    US20190253208A1