CN114567572B - Network loop monitoring method, system, equipment and storage medium - Google Patents

Network loop monitoring method, system, equipment and storage medium Download PDF

Info

Publication number
CN114567572B
CN114567572B CN202210466422.2A CN202210466422A CN114567572B CN 114567572 B CN114567572 B CN 114567572B CN 202210466422 A CN202210466422 A CN 202210466422A CN 114567572 B CN114567572 B CN 114567572B
Authority
CN
China
Prior art keywords
network
loop
frame message
message
switching equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210466422.2A
Other languages
Chinese (zh)
Other versions
CN114567572A (en
Inventor
陈凯
史佳晨
阮召崧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Jinzhen Microelectronics Technology Co ltd
Original Assignee
Nanjing Jinzhen Microelectronics Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Jinzhen Microelectronics Technology Co ltd filed Critical Nanjing Jinzhen Microelectronics Technology Co ltd
Priority to CN202210466422.2A priority Critical patent/CN114567572B/en
Publication of CN114567572A publication Critical patent/CN114567572A/en
Application granted granted Critical
Publication of CN114567572B publication Critical patent/CN114567572B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • H04L12/437Ring fault isolation or reconfiguration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the invention provides a network loop monitoring method, a system, equipment and a storage medium, wherein a CPU channel interface end receives and inserts loop frame messages, the loop frame messages are broadcasted to a network from each signal sending port by using the forwarding and broadcasting functions of switching equipment, and when loops occur in the network, the loop frame messages finally return to the switching equipment serving as the sending equipment. Therefore, each signal receiving end of the switching equipment receives the message broadcasted in the network in real time, simultaneously detects the received message, judges whether the message is sent by the equipment, and gives an alarm to the generated loop, thereby the switching equipment can take some measures for blocking the loop. The embodiment of the invention realizes the loop detection of the multiple ports of the switch, can quickly realize the loop detection and positioning in the network and avoids the network storm caused by the network loop.

Description

Network loop monitoring method, system, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a network loop monitoring method, a system, equipment and a storage medium.
Background
The present switching network environment consists of a large number of switching devices, and these switching devices often need to send messages out from other ports in a broadcast manner when receiving message frames with undefined destination, so as to obtain the destination device address. However, due to the complexity of networking of network devices, the transmission of messages on a network link inevitably generates loops, and the influence often caused when the loops of broadcast messages occur is huge, and the broadcast messages are broadcast without limit on the network, so that a large amount of network bandwidth is occupied, and finally network paralysis is caused; it is important to detect loops and prevent them from occurring on the network.
The Spanning Tree Protocol (STP) is a technology defined in the ieee802.1d standard for providing redundancy and loop switching, and is mainly to establish a root node on a network, and obtain a tree-like loop-free network topology structure continuously by calculation with the root node as a reference. In addition, when a link in the network fails, the method can detect the reestablishment of the tree-shaped logical topology, and data frames between nodes can be transmitted by a new path, so that the link protection effect is achieved. However, as the network scale is continuously enlarged, the network structure becomes abnormally complex, the time for converging and establishing a loop-free network topology structure through the STP algorithm is multiplied, and the ring position cannot be accurately positioned.
The single-port loop detection technology is also used in the application of the ethernet network loop detection, but the technology is only limited to the loop detection of a single port, although the technology is expanded by some people, the expansion is also limited to the loop detection of two ports, the technology becomes unreliable for multi-port switch equipment, and the network loop can be completely detected based on the multi-port of the switch equipment, so that the influence caused by the network storm can be reduced as much as possible.
Disclosure of Invention
Therefore, embodiments of the present invention provide a method, a system, a device, and a storage medium for monitoring a network loop, so as to solve the technical problems of slow speed and low accuracy in network loop detection and positioning performed on a large network scale and a complex network structure in the prior art.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
according to a first aspect of an embodiment of the present invention, an embodiment of the present application provides a network loop monitoring method, including:
receiving the inserted loop frame message at the interface end of the CPU channel;
broadcasting the loop frame message to a network through each signal sending port of the switching equipment;
utilizing each signal receiving end of the switching equipment to receive the message broadcasted in the network in real time;
detecting whether a network loop exists in a received message at each signal receiving end of the switching equipment;
and responding based on the detection result.
Further, the method further comprises:
setting all destination MAC addresses as F, and forming a destination address field on the loop frame message;
and broadcasting the loop frame message to a network in a broadcast frame message at each signal sending port of the switching equipment.
Further, the method further comprises:
setting a type field and a reserved field in the loop frame message;
in the process of detecting whether a network loop exists in the received message, identifying whether the received message is a loop frame message or not by utilizing the type field and/or the reserved field;
if the received message is not a loop frame message, processing the next received message;
and if the received message is a loop frame message, detecting whether a network loop exists in the received loop frame message.
Further, the method further comprises:
configuring a source MAC address into an independent 48-bit equipment MAC address only belonging to the exchange equipment in a mode of a group of hardware random numbers, and forming a source address field on the loop frame message;
in the process of detecting whether a network loop exists in the received loop frame message, comparing a source MAC address of the received loop frame message with a source MAC address of the switching equipment by using the source MAC address of the received loop frame message, and judging whether the source MAC address and the source MAC address are consistent;
if the source MAC address of the received loop frame message is consistent with the source MAC address of the switching equipment, a network loop exists;
if the source MAC address of the received loop frame message is inconsistent with the source MAC address of the switching equipment, no network loop exists.
Further, responding based on the detection result comprises:
when a network loop exists, a loop alarm is generated.
Further, the method further comprises:
setting a payload field in the loop frame message;
after the loop frame message is broadcasted to a network, recording the first address of each passing switching device by using the payload field and forming a passing device address sequence;
when detecting that a network loop exists, obtaining the number of the network loop passing through the switching equipment by using the recorded equipment address sequence;
the resulting network loops are classified based on the number of network loops passing through the switching device.
Further, the method further comprises:
setting a TTL field in the loop frame message;
judging whether the number of the network loops passing through the switching equipment exceeds a preset threshold value or not in response based on the detection result;
if the number of the network loops passing through the switching equipment does not exceed the preset threshold value, obtaining a second address of the network loops passing through the switching equipment by using the recorded equipment address sequence, and closing the switching equipment corresponding to the second address to block the network loops;
and if the number of the network loops passing through the switching equipment exceeds a preset threshold value, setting the maximum value of TTL in the TTL field to be less than the preset threshold value so as to block the network loops.
According to a second aspect of an embodiment of the present invention, an embodiment of the present application provides a network loop monitoring system, including:
the first receiving module is used for receiving the inserted loop frame message at the interface end of the CPU channel;
the broadcast module is used for broadcasting the loop frame message to the network through each signal sending port of the switching equipment;
the second receiving module is used for utilizing each signal receiving end of the switching equipment to receive the message broadcasted in the network in real time;
a detection module, configured to detect whether a network loop exists in a received packet at each signal receiving end of the switching device;
and the response module is used for responding based on the detection result.
Further, the loop frame message includes a destination address field, and all destination MAC addresses in the destination address field are set to F; and the broadcasting module broadcasts the loop frame message to a network in a broadcasting frame message at each signal sending port of the switching equipment.
Further, the loop frame message sets a type field and a reserved field; the detection module is further configured to perform the following steps:
in the process of detecting whether a network loop exists in the received message, identifying whether the received message is a loop frame message or not by using the type field and/or the reserved field;
if the received message is not a loop frame message, processing the next received message;
and if the received message is a loop frame message, detecting whether a network loop exists in the received loop frame message.
Further, the loop frame message includes a source address field, and a source MAC address on the source address field is configured to be an independent MAC address of a 48-bit device only belonging to the switching device in a manner of a group of hardware random numbers; the detection module is further configured to perform the following steps:
in the process of detecting whether a network loop exists in the received loop frame message, comparing the source MAC address of the received loop frame message with the source MAC address of the switching equipment to judge whether the source MAC address and the source MAC address are consistent;
if the source MAC address of the received loop frame message is consistent with the source MAC address of the switching equipment, a network loop exists;
if the source MAC address of the received loop frame message is inconsistent with the source MAC address of the switching equipment, no network loop exists.
Further, the response module is used for generating a loop alarm when a network loop exists.
Furthermore, the loop frame message also comprises a payload field; after the loop frame message is broadcasted to a network, recording the first address of each passing switching device by using the payload field and forming a passing device address sequence; the detection module is further configured to perform the following steps:
when detecting that a network loop exists, obtaining the number of the network loop passing through the switching equipment by using the recorded equipment address sequence;
the resulting network loops are classified based on the number of network loops passing through the switching device.
Further, the loop frame message further comprises a TTL field; the response module is further configured to perform the steps of:
judging whether the number of the network loops passing through the switching equipment exceeds a preset threshold value or not in response based on the detection result;
if the number of the network loops passing through the switching equipment does not exceed the preset threshold value, obtaining a second address of the network loops passing through the switching equipment by using the recorded equipment address sequence, and closing the switching equipment corresponding to the second address to block the network loops from occurring;
and if the number of the network loops passing through the switching equipment exceeds a preset threshold value, setting the maximum value of the TTL in the TTL field to be smaller than the preset threshold value so as to block the network loops from occurring.
According to a third aspect of the embodiments of the present invention, there is provided a network loop monitoring apparatus, the apparatus including: a processor and a memory;
the memory for storing one or more program instructions;
the processor is configured to execute one or more program instructions to perform the steps of a network loop monitoring method as described in any one of the above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a network loop monitoring method as described in any one of the above.
Compared with the prior art, according to the network loop monitoring method, the system, the device and the storage medium provided by the embodiment of the application, the loop frame messages are received and inserted at the interface end of the CPU channel, the loop frame messages are broadcasted to the network from each signal sending port by using the forwarding and broadcasting functions of the switching device, and when loops occur in the network, the loop frame messages can finally return to the switching device serving as the sending device. Therefore, each signal receiving end of the switching equipment receives the message broadcasted in the network in real time, simultaneously detects the received message, judges whether the message is sent by the equipment, and gives an alarm to the generated loop, thereby the switching equipment can take some measures for blocking the loop. The embodiment of the invention realizes the loop detection of the multiple ports of the switch, can quickly realize the loop detection and positioning in the network and avoids the network storm caused by the network loop.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
The structures, ratios, sizes, and the like shown in the present specification are only used for matching with the contents disclosed in the specification, so as to be understood and read by those skilled in the art, and are not used to limit the conditions that the present invention can be implemented, so that the present invention has no technical significance, and any structural modifications, changes in the ratio relationship, or adjustments of the sizes, without affecting the effects and the achievable by the present invention, should still fall within the range that the technical contents disclosed in the present invention can cover.
Fig. 1 is a schematic structural diagram of a network loop monitoring system according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a network loop monitoring method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a network loop monitoring method inside a switching device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a format of a loop frame message according to an embodiment of the present invention;
fig. 5 is a schematic diagram of network loop formation in a switching device networking according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a loop frame message format according to an embodiment of the present invention, where a payload field is used to record first addresses of each passing switch device when a network loop is formed;
fig. 7 is a schematic diagram of a loop frame message format according to another embodiment of the present invention, where the payload field is used to record the first address of each switching device that passes through when a network loop is formed.
Detailed Description
The present invention is described in terms of specific embodiments, and other advantages and benefits of the present invention will become apparent to those skilled in the art from the following disclosure. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The embodiment of the invention mainly aims to realize the rapid and accurate detection and positioning of the network loop under the networking environment with large scale and complex structure.
In order to solve the above technical problem, as shown in fig. 1 and 3, an embodiment of the present application provides a network loop monitoring system, which specifically includes: the device comprises a first receiving module 1, a broadcasting module 2, a second receiving module 3, a detecting module 4 and a responding module 5.
Further, the first receiving module 1 is configured to receive the inserted loop frame message at the interface end of the CPU channel; the broadcasting module 2 is used for broadcasting the loop frame message to the network through each signal sending port of the switching equipment 6; the second receiving module 3 is configured to receive a message broadcasted in a network in real time by using each signal receiving end of the switching device 6; the detection module 4 is used for detecting whether a network loop exists in the received message at each signal receiving end of the switching device 6; the response module 5 is used for responding based on the detection result.
Further, referring to fig. 4, the loop frame message includes a destination address field (DA field), a source address field (SA field), a type field, and a reserved field (reserved field). And all the destination MAC addresses on the destination address field are set to be F, so that the loop frame message is a broadcast frame message. The source MAC address on the source address field is configured into an independent MAC address of 48-bit equipment only belonging to the switching equipment in a mode of a group of hardware random numbers, on one hand, the probability of address conflict among the switching equipment in the network is reduced through the mode, on the other hand, at each signal receiving end of the switching equipment, whether the received loop frame message belongs to the message sent by the switching equipment can be judged through the source MAC address on the source address field, and therefore network loop detection of multiple ports of the switching equipment is achieved. The special type field and reserved field (reserved field) are defined by a user to specially identify the type of the message as a loop frame message, so that in the network loop detection, whether the received message is a loop frame message is firstly identified by using the type field and/or the reserved field, and when the received message is determined to be the loop frame message, whether a network loop exists in the received loop frame message is detected, so that the efficiency of the network loop detection is improved.
Further, referring to fig. 4, the loop frame message further includes a payload field and a TTL field, where the payload field may be used to store an address of a switching device through which the loop frame message passes, and an ID number of the device is recorded in the payload field of the loop frame message when the loop frame message passes through one switching device. When a network loop occurs, the switching device can automatically read and analyze the device ID address on the payload field to determine the number of devices through which the loop frame packet passes and the topology of the current network, so as to adjust the service from a higher-level use level when the occurrence of the network loop is detected. TTL (time to live) fields exist in the loop frame message formats, the TTL fields record the survival time of the loop frame messages in the network, the TTL value is automatically reduced by one every time when the TTL value of one device is reduced to the minimum value, the loop frame messages are discarded when the TTL value is reduced to the minimum value, and the infinite propagation of the loop frame messages in the network is reduced.
Compared with the prior art, the network loop monitoring system provided by the embodiment of the application receives the inserted loop frame messages at the interface end of the CPU channel, broadcasts the loop frame messages from each signal sending port to the network by using the forwarding and broadcasting functions of the switching equipment, and when loops occur in the network, the loop frame messages can finally return to the switching equipment serving as the sending equipment. Therefore, each signal receiving end of the switching equipment receives the message broadcasted in the network in real time, simultaneously detects the received message, judges whether the message is sent by the equipment, and gives an alarm to the generated loop, thereby the switching equipment can take some measures for blocking the loop. The embodiment of the invention realizes the loop detection of the multiple ports of the switch, can quickly realize the loop detection and positioning in the network and avoids the network storm caused by the network loop.
Corresponding to the network loop monitoring system, the embodiment of the invention also discloses a network loop monitoring method. A network loop monitoring method disclosed in the embodiments of the present invention is described in detail below with reference to the above-described network loop monitoring system.
In an embodiment of the present invention, as shown in fig. 2, specific steps of a network loop monitoring method provided in an embodiment of the present invention are described in detail below.
Step S11: receiving the inserted loop frame message at the interface end of the CPU channel through a first receiving module 1; step S12: the broadcasting module 2 broadcasts the loop frame message to the network through each signal sending port of the switching equipment; step S13: the second receiving module 3 receives the message broadcasted in the network in real time by using each signal receiving end of the switching equipment; step S14: detecting whether a network loop exists in a received message at each signal receiving end of the switching equipment through a detection module 4; step S15: responding by the response module 5 based on the detection result.
Compared with the prior art, the network loop monitoring system provided by the embodiment of the application receives the inserted loop frame messages at the interface end of the CPU channel, broadcasts the loop frame messages from each signal sending port to the network by using the forwarding and broadcasting functions of the switching equipment, and when loops occur in the network, the loop frame messages can finally return to the switching equipment serving as the sending equipment. Therefore, each signal receiving end of the switching equipment receives the message broadcasted in the network in real time, simultaneously detects the received message, judges whether the message is sent by the switching equipment, and gives an alarm to the generation of the loop, thereby the switching equipment can take some measures for blocking the occurrence of the loop. The embodiment of the invention realizes the loop detection of the multiple ports of the switch, can quickly realize the loop detection and positioning in the network and avoids the network storm caused by the network loop.
Referring to fig. 3, in a switching network environment composed of a plurality of switching devices 6, a loop frame packet is sent from a receiving end of a CPU channel into a switching core 7 (switchcore) of a switching device, and by using the forwarding and broadcasting functions thereof, each device can set a timing to send the loop frame packet into the network through all signal sending ports of the switching device 6. The signal transmission ports shown in FIG. 3 are Port1 tx, port2 tx \8230, portn tx, and the signal reception ports shown in FIG. 3 are Port1 rx, port2 rx \8230, portn rx. The loop frame message is a loop instruction message, and the loop instruction is a loop instruction in the assembly language. This is done according to the value in register CX, and each time the LOOP is run, the value in CX is decremented by one, and if not 0, the contents of the following label are run. When a loop occurs in the network, the loop frame messages will finally return to the sending equipment, and the sending equipment will detect and judge whether the received loop frame messages belong to the messages sent by the equipment based on the key fields of the loop frame messages, and generate a loop alarm through a buzzer or an led lamp, so that the switching equipment can take some measures for blocking the loop.
Further, referring to fig. 4, in the embodiment of the present invention, all destination MAC addresses are set to F, and a destination address field is formed on the loop frame message; at each signal transmission port of the switching device 6, the loop frame message is broadcast to the network in a broadcast frame message by the broadcast module 2.
The specific procedure of step 14 will be described below. Referring to fig. 4, in the embodiment of the present invention, a type field and a reserved field (reserved field) are set in a loop frame packet; in the process of detecting whether a network loop exists in the received message, the detection module 4 identifies whether the received message is a loop frame message by using a type field and/or a reserved field (reserved field); if the received message is not a loop frame message, processing the next received message; and if the received message is a loop frame message, detecting whether a network loop exists in the received loop frame message.
As described above, in the network loop detection, in addition to the matching of the DA field, an additional type field and a reserved field (reserved field) are provided, and the special type field and the reserved field are customized by a user to specifically identify that the type of the message is a loop frame message, so that in the network loop detection, firstly, whether the received message is a loop frame message is identified by using the type field and/or the reserved field, and when it is determined that the received message is a loop frame message, whether a network loop exists in the received loop frame message is detected, so that the loop frame message detection of the switching device is enhanced, and the efficiency of the network loop detection is improved.
In addition, referring to fig. 4, in the embodiment of the present invention, a source MAC address is configured as an independent MAC address of a 48-bit device that only belongs to the switching device in a manner of a group of hardware random numbers, and a source address field is formed on a loop frame message; in the process of detecting whether a network loop exists in the received loop frame message, the detection module 4 compares the source MAC address of the received loop frame message with the source MAC address of the switching equipment to judge whether the source MAC address and the source MAC address are consistent; if the source MAC address of the received loop frame message is consistent with the source MAC address of the switching equipment, a network loop exists; if the source MAC address of the received loop frame message is inconsistent with the source MAC address of the switching equipment, no network loop exists.
In the embodiment of the invention, the source address field is utilized, and each device is configured into a device address as unique as possible through a random number, so that on one hand, the probability of address conflict among switching devices in a network is reduced, and on the other hand, at each signal receiving end of the switching device, whether the received loop frame message is sent by the switching device can be judged by utilizing the source MAC address on the source address field, thereby realizing the network loop detection of multiple ports of the switching device and avoiding the false identification and detection of the loop in a switching network.
Specifically, referring to fig. 5, the step 15 specifically includes: when a network loop is present, a loop alarm is generated by the response module 5.
Preferably, referring to fig. 4, in the embodiment of the present invention, a payload field may be further set in the loop frame packet; after the loop frame message is broadcasted to the network, a payload field is utilized to record the first address of each passing exchange device and form a passing device address sequence; when detecting that a network loop exists, the detection module 4 obtains the number of the network loop passing through the switching equipment by using the recorded equipment address sequence; the resulting network loops are classified based on the number of network loops passing through the switching device.
Referring to fig. 5, taking four switching devices in the network as an example, which are respectively a first switching device a, a second switching device B, a third switching device C and a fourth switching device D, two paths for generating network loops are shown in the figure, which are respectively a → B → D → a and a → B → C → D → a, by using the above-mentioned technique used in the embodiment of the present invention, two types of passing device address sequences can be found from the first switching device a which finds the network loop, as shown in fig. 6 and 7, the positions in the topology where different devices on the current network are located can be obtained by these information, thereby helping the user to see the topology of the network device more clearly and make a corresponding solution policy.
The payload field may be used to store an address of a switching device through which the loop frame message passes, and the device ID number of the loop frame message may be recorded in the payload field of the loop frame message every time the loop frame message passes through one switching device. When a network loop occurs, the switching device can automatically read and analyze the device ID address on the payload field to determine the number of devices through which the loop frame packet passes and the topology of the current network, so that the service is adjusted from a higher-level use level when the occurrence of the network loop is detected.
Preferably, referring to fig. 4, in the embodiment of the present invention, a TTL field may also be set in the loop frame packet; in response based on the detection result, the response module 5 determines whether the number of the network loops passing through the switching device exceeds a preset threshold; if the number of the network loops passing through the switching equipment does not exceed the preset threshold value, obtaining a second address of the network loops passing through the switching equipment by using the recorded equipment address sequence, and closing the switching equipment corresponding to the second address to block the network loops; and if the number of the network loops passing through the switching equipment exceeds a preset threshold value, setting the maximum value of the TTL in the TTL field to be smaller than the preset threshold value so as to block the network loops from occurring.
The loop frame message format has a TTL (time to live) field, the TTL field records the survival time of the loop frame message in the network, the TTL value is automatically reduced by one every time when the TTL value of one device is reduced to the minimum value, the loop frame message is discarded when the TTL value is reduced to the minimum value, and the infinite propagation of the loop frame message in the network is reduced. In the embodiment of the invention, different pertinence responses to network loops generated under different conditions are realized through the setting of the TTL field and the TTL maximum value thereof.
In addition, an embodiment of the present invention further provides a network loop monitoring device, where the device includes: a processor and a memory; the memory for storing one or more program instructions; the processor is configured to execute one or more program instructions to perform the steps of a network loop monitoring method as described in any one of the above.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the network loop monitoring method described in any one of the above are implemented.
In an embodiment of the present invention, the processor may be an integrated circuit chip having signal processing capability. The Processor may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The various methods, steps, and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The processor reads the information in the storage medium and completes the steps of the method in combination with the hardware.
The storage medium may be a memory, for example, which may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory.
The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory.
The volatile Memory may be a Random Access Memory (RAM) which serves as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), SLDRAM (SLDRAM), and Direct Rambus RAM (DRRAM).
The storage media described in connection with the embodiments of the invention are intended to comprise, without being limited to, these and any other suitable types of memory.
Those skilled in the art will appreciate that the functionality described in the present invention may be implemented in a combination of hardware and software in one or more of the examples described above. When software is applied, the corresponding functionality may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Although the invention has been described in detail above with reference to a general description and specific examples, it will be apparent to one skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.

Claims (8)

1. A method for monitoring a network loop, the method comprising:
receiving the inserted loop frame message at the interface end of the CPU channel;
broadcasting the loop frame message to a network through each signal sending port of the switching equipment;
utilizing each signal receiving end of the switching equipment to receive the message broadcasted in the network in real time;
detecting whether a network loop exists in a received message at each signal receiving end of the switching equipment;
responding based on the detection result;
the method further comprises the following steps:
setting a payload field in the loop frame message;
after the loop frame message is broadcasted to a network, recording the first address of each passing switching device by using the payload field and forming a passing device address sequence;
when detecting that a network loop exists, obtaining the number of the network loop passing through the switching equipment by using the recorded equipment address sequence;
classifying the generated network loops based on the number of network loops passing through the switching device;
the method further comprises the following steps:
setting a TTL field in the loop frame message;
judging whether the number of the network loops passing through the switching equipment exceeds a preset threshold value or not in response based on the detection result;
if the number of the network loops passing through the switching equipment does not exceed the preset threshold value, obtaining a second address of the network loops passing through the switching equipment by using the recorded equipment address sequence, and closing the switching equipment corresponding to the second address to block the network loops;
and if the number of the network loops passing through the switching equipment exceeds a preset threshold value, setting the maximum value of TTL in the TTL field to be less than the preset threshold value so as to block the network loops.
2. The method of claim 1, wherein the method further comprises:
setting all destination MAC addresses as F, and forming a destination address field on the loop frame message;
and broadcasting the loop frame message to a network in a broadcast frame message at each signal sending port of the switching equipment.
3. A method of network loop monitoring as claimed in claim 2, wherein said method further comprises:
setting a type field and a reserved field in the loop frame message;
in the process of detecting whether a network loop exists in the received message, identifying whether the received message is a loop frame message or not by utilizing the type field and/or the reserved field;
if the received message is not a loop frame message, processing the next received message;
and if the received message is a loop frame message, detecting whether a network loop exists in the received loop frame message.
4. A method for network loop monitoring as claimed in claim 3, wherein said method further comprises:
configuring a source MAC address into an independent 48-bit equipment MAC address only belonging to the exchange equipment in a mode of a group of hardware random numbers, and forming a source address field on the loop frame message;
in the process of detecting whether a network loop exists in the received loop frame message, comparing the source MAC address of the received loop frame message with the source MAC address of the switching equipment to judge whether the source MAC address and the source MAC address are consistent;
if the source MAC address of the received loop frame message is consistent with the source MAC address of the switching equipment, a network loop exists;
if the source MAC address of the received loop frame message is inconsistent with the source MAC address of the switching equipment, no network loop exists.
5. The method of claim 4, wherein responding based on the detection comprises:
when a network loop exists, a loop alarm is generated.
6. A network loop monitoring system, the system comprising:
the first receiving module is used for receiving the inserted loop frame message at the interface end of the CPU channel;
the broadcast module is used for broadcasting the loop frame message to the network through each signal sending port of the switching equipment;
a second receiving module, configured to receive, in real time, a message broadcasted in a network by using each signal receiving end of the switching device;
a detection module, configured to detect, at each signal receiving end of the switching device, whether a network loop exists in a received packet;
a response module for responding based on the detection result,
setting a payload field in the loop frame message;
after the loop frame message is broadcasted to a network, recording the first address of each passing switching device by using the payload field and forming a passing device address sequence;
when detecting that a network loop exists, obtaining the number of the network loop passing through the switching equipment by using the recorded equipment address sequence;
classifying the generated network loops based on the number of network loops passing through the switching device;
setting a TTL field in the loop frame message;
judging whether the number of the network loops passing through the switching equipment exceeds a preset threshold value or not in response based on the detection result;
if the number of the network loops passing through the switching equipment does not exceed the preset threshold value, obtaining a second address of the network loops passing through the switching equipment by using the recorded equipment address sequence, and closing the switching equipment corresponding to the second address to block the network loops;
and if the number of the network loops passing through the switching equipment exceeds a preset threshold value, setting the maximum value of TTL in the TTL field to be less than the preset threshold value so as to block the network loops.
7. A network loop monitoring device, the device comprising: a processor and a memory;
the memory for storing one or more program instructions;
the processor, configured to execute one or more program instructions to perform the steps of a method of network loop monitoring as claimed in any one of claims 1 to 5.
8. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of a method of network loop monitoring according to any one of claims 1 to 5.
CN202210466422.2A 2022-04-29 2022-04-29 Network loop monitoring method, system, equipment and storage medium Active CN114567572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210466422.2A CN114567572B (en) 2022-04-29 2022-04-29 Network loop monitoring method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210466422.2A CN114567572B (en) 2022-04-29 2022-04-29 Network loop monitoring method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114567572A CN114567572A (en) 2022-05-31
CN114567572B true CN114567572B (en) 2023-01-31

Family

ID=81721525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210466422.2A Active CN114567572B (en) 2022-04-29 2022-04-29 Network loop monitoring method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114567572B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115333974B (en) * 2022-08-10 2023-08-11 杭州云合智网技术有限公司 Loop detection method and device based on VSI in DRNI network
CN116866457A (en) * 2023-09-04 2023-10-10 常州楠菲微电子有限公司 Loop detection message processing method and device for two-layer network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707538A (en) * 2009-11-25 2010-05-12 烽火通信科技股份有限公司 Method for detecting and automatically recovering Ethernet loopback
CN102281157A (en) * 2011-08-12 2011-12-14 江苏亿通高科技股份有限公司 Loop circuit detecting and processing method of MOCA (Model-based Constructibility Analysis) system
CN103378998A (en) * 2012-04-27 2013-10-30 中兴通讯股份有限公司 Method and device for Ethernet port loopback detection
CN106973012A (en) * 2017-05-22 2017-07-21 商洛学院 A kind of computer network loop detecting method
CN110601919A (en) * 2019-09-12 2019-12-20 烽火通信科技股份有限公司 Loopback detection method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102236A (en) * 2007-08-27 2008-01-09 杭州华三通信技术有限公司 Method and device for detecting loop
CN108156014B (en) * 2016-12-06 2021-08-13 华为技术有限公司 Loop fault processing method and switch
CN112134775B (en) * 2020-09-25 2022-08-09 苏州浪潮智能科技有限公司 Switch loop detection method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707538A (en) * 2009-11-25 2010-05-12 烽火通信科技股份有限公司 Method for detecting and automatically recovering Ethernet loopback
CN102281157A (en) * 2011-08-12 2011-12-14 江苏亿通高科技股份有限公司 Loop circuit detecting and processing method of MOCA (Model-based Constructibility Analysis) system
CN103378998A (en) * 2012-04-27 2013-10-30 中兴通讯股份有限公司 Method and device for Ethernet port loopback detection
CN106973012A (en) * 2017-05-22 2017-07-21 商洛学院 A kind of computer network loop detecting method
CN110601919A (en) * 2019-09-12 2019-12-20 烽火通信科技股份有限公司 Loopback detection method and system

Also Published As

Publication number Publication date
CN114567572A (en) 2022-05-31

Similar Documents

Publication Publication Date Title
CN114567572B (en) Network loop monitoring method, system, equipment and storage medium
KR100733020B1 (en) Customer MAC Frame Forwarding Method, Edge Bridge, And Storage Medium Registering Program
EP2100406B1 (en) Method and apparatus for implementing multicast routing
CN111585845B (en) Method, device and equipment for detecting network card node performance and readable medium
US6331985B1 (en) Telecommunication network with variable address learning, switching and routing
US6154462A (en) Circuits and methods for a ring network
EP1408656B1 (en) Method and device for transparent LAN services
US6757279B1 (en) Method for synchronizing databases in stacked network units
US7701936B2 (en) Obtaining path information related to a bridged network
US8830841B1 (en) Operations, administration, and maintenance (OAM) processing engine
CN111614580B (en) Data forwarding method, device and equipment
US8599692B2 (en) System, apparatus and method for removing unwanted information from captured data packets
US20060045091A1 (en) Transmission device
CN108696431B (en) Local area network port configuration method and device, switching chip and route switching equipment
CN112953857B (en) Method for testing internal channel between boards and distributed network equipment
US7525974B2 (en) Method and apparatus for capability based addressing in a communications network
CN112187646B (en) Message table item processing method and device
US10397095B2 (en) Detecting and mitigating loops
CN113162855B (en) Multicast message detection method, network equipment and system
JP2929266B2 (en) High-speed processing method for received frames
Cisco show channel group through show gmrp timer
Cisco show cgmp statistics through show ip route
Cisco show channel group through show gmrp timer
CN112543142B (en) Method and device for realizing RSTP ring network protocol based on FPGA
CN112769650A (en) Multi-VLAN loop detection method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant