Method for rapidly inhibiting broadcast storm on switch
By detecting mac address drift and combining STP protocol, the switch status is automatically adjusted, the problem of broadcast storm in the switch network is solved, and the broadcast storm is quickly suppressed, improving network stability and performance.
Patent Information
- Application Number
- CN202411428491.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-03
AI Technical Summary
When existing switch networks face broadcast storms, traditional STP protocols and traffic limiting methods cannot fundamentally solve the problem, resulting in threats to network performance and stability.
By obtaining the mac address and port correspondence table of broadcast packets, combining STP protocol to calculate the ringless state, detect the mac address drift, automatically adjust the VLAN configuration and STP settings, lock the stable state, suppress the broadcast storm, and update the network stability after the storm disappears state.
Fast converge network ring-free topology, suppress broadcast storms, improve network stability and performance, and avoid endless forwarding loops.
Smart Images

Figure CN119254723A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of switch network technology, and in particular to a method for quickly suppressing broadcast storms on a switch. Background Art
[0002] The switch network is the cornerstone of computer network architecture. It connects multiple computers and network devices to achieve fast forwarding and exchange of data packets. Based on the MAC address learning mechanism, the switch intelligently determines the data packet transmission path, effectively improving network efficiency and security. From the access layer to the aggregation layer to the core layer, the switch plays a key role in all layers of the network, providing ports with different speeds and functions to meet diverse network needs. With the development of technology, switches not only support wired connections, but also expand to the wireless field to manage wireless access points and adapt to increasingly complex network environments. At the same time, switches also have network monitoring and management functions to help network administrators optimize network performance and ensure network security. In emerging fields such as data centers, cloud computing, and the Internet of Things, switches play an irreplaceable role, promoting the continuous advancement and application of information technology.
[0003] In the current switch network communication technology, the three-layer switch network is particularly exposed to the potential risk of broadcast storms. In the early stages of the collaboration between the two-layer and three-layer switches, the network was flooded with a large number of broadcast messages. According to the standard network protocol specifications, these broadcast messages are designed to be replicated and forwarded on all ports except the receiving port to ensure the wide dissemination of information. However, this mechanism may cause serious problems in an environment with network loops: once broadcast messages enter the loop, they will fall into an endless forwarding cycle, quickly consuming network resources, forming the so-called "broadcast storm", which poses a serious threat to network performance and stability.
[0004] There are two main methods for dealing with broadcast storms. First, use STP (Spanning Tree Protocol) to build a loop-free network topology to prevent broadcast storms by blocking potential loop paths. However, this method is not perfect. Its limitation is that STP only focuses on protocol-level messages and lacks the ability to perceive actual business traffic. This may lead to convergence delays or short loops when the network topology changes (such as frequent port online and offline).
[0005] Secondly, when a broadcast storm has occurred, a common emergency measure is to limit and regulate network traffic, for example, setting the forwarding rate of broadcast messages on a single port to no more than 80% of its total bandwidth. Although this method can mitigate the impact of the storm to a certain extent, it does not touch the root cause of the storm and therefore cannot fundamentally solve the problem.
[0006] Therefore, a method for quickly suppressing broadcast storm on a switch is proposed. Summary of the invention
[0007] In view of this, the present invention provides a method for quickly suppressing a broadcast storm on a switch to solve or alleviate one of the technical problems existing in the prior art and at least provide a beneficial option.
[0008] The technical solution of the embodiment of the present invention is implemented as follows: A method for quickly suppressing a broadcast storm on a switch comprises the following steps:
[0009] Step 1: Get the MAC address and port correspondence table of the broadcast message;
[0010] Step 2: After the loop-free state of the switch network is calculated to be stable based on the STP protocol, the port status and forwarding role of all current switches are obtained, and the current stable state of the switch network is recorded;
[0011] Step 3: Obtain the actual MAC address and port of the broadcast message, compare the actual MAC address and port according to the MAC address and port correspondence table, confirm whether there is a port broadcast storm according to the MAC address drift, and output the comparison result to the current network;
[0012] Step 4: Based on the comparison result of the existence of the port broadcast storm, the control switch is automatically locked to the recorded stable state;
[0013] Step 5: Obtain the actual MAC address and port of the broadcast message, compare the actual MAC address and port according to the MAC address and port correspondence table, and confirm whether the port broadcast storm disappears according to the MAC address drift;
[0014] Step 6: Based on the comparison result that the port broadcast storm disappears, release the STP protocol to perform normal network negotiation, the switch network reaches a new stable state, and the network stability state of the switch is updated.
[0015] Further preferably: in step 2, the specific steps of calculating the stability of the loop-free state of the switch network based on the STP protocol include:
[0016] Deploy the STP protocol in the switch network and configure the STP parameters of the switch;
[0017] The STP protocol propagates STP information in the network and calculates the spanning tree based on the STP information until all switches agree on a loop-free spanning tree topology;
[0018] After STP convergence is complete, the switch network is calculated to be in a loop-free and stable state.
[0019] Further preferred: in step three, if the actual MAC address and port are consistent with the records in the MAC address and port correspondence table, the comparison result is normal; if the actual MAC address and port are inconsistent with the records in the MAC address and port correspondence table, the comparison result is displayed as abnormal; based on the abnormal comparison result, the MAC address drift is determined; based on the result of the MAC address drift, it is determined that a port broadcast storm exists.
[0020] Further preferably: in step three, if the comparison result is normal, repeat step three until the comparison result is abnormal, and the switch network has MAC address drift and port broadcast storm, and enter step four to suppress the broadcast storm.
[0021] Further preferably: in step 4, the switch adjusts its own state to the recorded stable state by adjusting the VLAN configuration, STP setting, and port state.
[0022] Further preferably: in step 4, after the switch is adjusted to a stable state, the switch network is restored to a loop-free link to suppress the broadcast storm.
[0023] Further preferably: in step five, the actual MAC address and port are compared according to the MAC address and port correspondence table, and if the comparison result is consistent, it is confirmed that the broadcast storm disappears.
[0024] Further preferably: in step six, the updated switch network stability state is used as a criterion for restoring the network stability state in the next broadcast storm suppression process.
[0025] To solve the above technical problem, another technical solution adopted by the present application is: an electronic device, the electronic device comprising: at least one processor, and a memory communicatively connected to the at least one processor;
[0026] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for quickly suppressing a broadcast storm on a switch as described in any one of claims 1-8.
[0027] To solve the above technical problems, another technical solution adopted by the present application is: a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute a method for quickly suppressing a broadcast storm on a switch as described in any one of claims 1-8.
[0028] The embodiment of the present invention has the following advantages due to the adoption of the above technical solution:
[0029] The present invention detects the MAC address drift status and the flow information of the port broadcast message, and synchronizes these business information statuses to the STP spanning tree protocol. The STP combines the business information to decide the network topology, thereby quickly converging the network loop-free topology and suppressing the broadcast storm.
[0030] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 is a flow chart of the present invention;
[0033] Figure 2 This is a diagram of a switch network structure according to Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0034] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.
[0035] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0036] Example 1
[0037] like Figure 1 As shown, an embodiment of the present invention provides a method for quickly suppressing a broadcast storm on a switch, comprising the following steps:
[0038] Step 1: Get the MAC address and port correspondence table of the broadcast message;
[0039] Step 2: After the loop-free state of the switch network is calculated to be stable based on the STP protocol, the port status and forwarding role of all current switches are obtained, and the current stable state of the switch network is recorded. The specific steps for calculating the loop-free state of the switch network based on the STP protocol include:
[0040] Deploy the STP protocol in the switch network and configure the STP parameters of the switch;
[0041] The STP protocol propagates STP information in the network and calculates the spanning tree based on the STP information until all switches agree on a loop-free spanning tree topology;
[0042] After STP convergence is complete, the switch network is calculated to be in a loop-free and stable state;
[0043] Step 3, obtain the actual mac address and port of the broadcast message, compare the actual mac address and port according to the mac address and port correspondence table, confirm whether there is a port broadcast storm according to the mac address drift, and output the comparison result to the current network. In the switch network, the port learned by the same mac address in a short period of time has changed, that is, mac address drift. By analogy with the state of the mac address table, it can be found whether address drift has occurred. The traffic information of the port is obtained by reading the statistical count of the port. If the actual mac address and port are consistent with the records in the mac address and port correspondence table, the comparison result is normal. If the actual mac address and port are inconsistent with the records in the mac address and port correspondence table, the comparison result is abnormal. Based on the abnormal comparison result, the mac address drift is determined. Based on the result of the mac address drift, it is determined that there is a port broadcast storm. If the comparison result is normal, repeat step 3 until the comparison result is abnormal, and the switch network has mac address drift and port broadcast storm, and go to step 4 to suppress the broadcast storm;
[0044] Step 4: Based on the comparison result of the existence of port broadcast storm, the switch is controlled to automatically lock to the recorded stable state. The switch adjusts its own state to the recorded stable state by adjusting the VLAN configuration, STP settings, and port status. After the switch is adjusted to the stable state, the switch network is restored to a loop-free link to suppress the broadcast storm.
[0045] Step 5: Obtain the actual MAC address and port of the broadcast message, compare the actual MAC address and port according to the MAC address and port correspondence table, confirm whether the port broadcast storm disappears according to the MAC address drift, and compare the actual MAC address and port according to the MAC address and port correspondence table. If the comparison results are consistent, confirm that the broadcast storm disappears;
[0046] Step 6: Based on the comparison result that the port broadcast storm disappears, the STP protocol is released to perform normal network negotiation, the switch network reaches a new stable state, and the network stability state of the switch is updated. The updated switch network stability state is used as the standard for restoring the network stability state in the next broadcast storm suppression process.
[0047] Example 2
[0048] like Figure 2As shown, an embodiment of the present invention provides a method for quickly suppressing a broadcast storm on a switch, comprising the following steps:
[0049] Step 1: Enable MAC address drift and port broadcast message collection on each switch;
[0050] Step 2: When the STP loop-free state is stable, record the current state and forwarding role of all ports, for example, in this embodiment, record on LSW1;
[0051] In the S1 state, GE0 / 0 / 2 is a forwarding port, GE0 / 0 / 1 is a forwarding port, LSW3 port GE0 / 0 / 1 is a forwarding port, and GE0 / 0 / 2 is a blocking port;
[0052] The switch is in S1, S2, and S3, which is a stable state, that is, there is no loop link;
[0053] Step 3: When a switch detects MAC drift and port broadcast storm, all switches synchronize control messages to notify the current network of a broadcast storm.
[0054] Step 4: When a broadcast storm is detected and notified, all switches automatically lock into the stable state of S1, S2, and S3, restore the loop-free link, and remain silent until the network is stable;
[0055] Step 5: After detecting that the broadcast message disappears, gradually release the STP protocol, conduct network negotiation normally, and reach the new stable state S11, S21, S31;
[0056] Step 6: Update the stable state to S11, S21, and S31.
[0057] Example 3
[0058] An embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for quickly suppressing a broadcast storm on a switch as described above is implemented.
[0059] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in a memory and executed by a processor to implement the present invention. One or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in a computer device.
[0060] The processor can be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, field programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete preset hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0061] The memory may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. The memory may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. equipped on the computer device. Furthermore, the memory may also include both an internal storage unit of a computer device and an external storage device.
[0062] Example 4
[0063] An embodiment of the present invention further provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method for quickly suppressing a broadcast storm on a switch as described above is implemented.
[0064] The computer program may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above method embodiments may be implemented. The computer program includes computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium, etc.
[0065] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0066] The steps in the method of the embodiment of the present invention can be adjusted in order, combined or deleted according to actual needs.
[0067] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic preset hardware, or in a combination of computer software and electronic preset hardware. Whether these functions are performed in preset 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.
[0068] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various 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.
[0069] 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 various 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 method for quickly suppressing a broadcast storm on a switch, characterized in that: The following steps are involved: Step 1: Get the MAC address and port correspondence table of the broadcast message; Step 2: After the loop-free state of the switch network is calculated to be stable based on the STP protocol, the port status and forwarding role of all current switches are obtained, and the current stable state of the switch network is recorded; Step 3: Get the actual MAC address and port of the broadcast message, compare the actual MAC address and port according to the MAC address and port correspondence table, confirm whether there is a port broadcast storm according to the MAC address drift, and output the comparison result to the current network; Step 4: Based on the comparison result of the existence of the port broadcast storm, the control switch is automatically locked to the recorded stable state; Step 5: Obtain the actual MAC address and port of the broadcast message, compare the actual MAC address and port according to the MAC address and port correspondence table, and confirm whether the port broadcast storm disappears according to the MAC address drift; Step 6: Based on the comparison result that the port broadcast storm disappears, release the STP protocol to perform normal network negotiation, the switch network reaches a new stable state, and the network stability state of the switch is updated.
2. The method for quickly suppressing a broadcast storm on a switch according to claim 1, characterized in that: In step 2, the specific steps of calculating the stable loop-free state of the switch network based on the STP protocol include: Deploy the STP protocol in the switch network and configure the STP parameters of the switch; The STP protocol propagates STP information in the network and calculates the spanning tree based on the STP information until all switches agree on a loop-free spanning tree topology; After STP convergence is complete, the switch network is calculated to be in a loop-free and stable state.
3. The method for quickly suppressing a broadcast storm on a switch according to claim 1, characterized in that: In step three, if the actual MAC address and port are consistent with the records in the MAC address and port correspondence table, the comparison result is normal. If the actual MAC address and port are inconsistent with the records in the MAC address and port correspondence table, the comparison result is displayed as abnormal. Based on the abnormal comparison result, the MAC address drift is determined. Based on the result of the MAC address drift, it is determined that a port broadcast storm exists.
4. The method for quickly suppressing a broadcast storm on a switch according to claim 3, characterized in that: In step three, if the comparison result is normal, repeat step three until the comparison result is abnormal, and the switch network has MAC address drift and port broadcast storm, and go to step four to suppress the broadcast storm.
5. The method for quickly suppressing a broadcast storm on a switch according to claim 1, characterized in that: In step 4, the switch adjusts its own state to the recorded stable state by adjusting the VLAN configuration, STP settings, and port status.
6. The method for quickly suppressing a broadcast storm on a switch according to claim 1, characterized in that: In step 4, after the switch is adjusted to a stable state, the switch network is restored to a loop-free link, suppressing the broadcast storm.
7. The method for quickly suppressing a broadcast storm on a switch according to claim 1, characterized in that: In step 5, the actual MAC address and port are compared with the MAC address and port correspondence table. If the comparison results are consistent, it is confirmed that the broadcast storm has disappeared.
8. The method for quickly suppressing a broadcast storm on a switch according to claim 1, characterized in that: In step six, the updated switch network stability state is used as a criterion for restoring the network stability state in the next broadcast storm suppression process.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor, and a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for quickly suppressing a broadcast storm on a switch as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for quickly suppressing a broadcast storm on a switch as described in any one of claims 1-8.
Citation Information
Cited By
Virtual machine MAC address learning method and device, equipment, medium and product
CN120614324A
