Ethernet Switch Loop Position Detection via MAC Address Interval Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for detecting Ethernet loops are inefficient in determining the exact position of the loop, leading to prolonged detection times and increased impact on regular traffic.
Innovation Solution
The method calculates the interval between MAC address learning and packet transmission/reception times to determine if a loop exists by setting a judgment threshold for host migration, allowing for rapid identification of loop positions and minimizing traffic disruption.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If conventional loop detection methods are used, then loop detection can be performed, but the detection time is prolonged and the exact position of the loop cannot be determined
Solution Approach 1:
The patent introduces a loop detection packet as an intermediary carrier that transports detection information throughout the network. This packet contains source device identification, receiving port identification, and sending port identification, enabling precise loop position determination without requiring complex hand-shake protocols between devices. The intermediary packet approach resolves the contradiction by providing both rapid detection and accurate positioning.
Solution Approach 2:
The patent implements a feedback mechanism where the loop detection packet circulates through the network and returns to the source device with information about the loop position. When a receiving device detects the packet on a different port than the sending port, it feeds back this loop information to the source device, enabling the source device to accurately identify the loop location and calculate detection time, thus resolving both the speed and precision requirements.
2Reliability
If STP protocol is deployed to prevent loops, then loop risk is reduced, but detection and response time are prolonged
Solution Approach 1:
The patent performs preliminary loop detection by actively sending loop detection packets into the network before loops can cause significant damage. This preliminary action allows the system to detect loops early and respond quickly, rather than waiting for STP's slower convergence process. The detection packet approach provides faster preliminary detection while maintaining the reliability benefits of STP for loop prevention.
3Productivity
If MAC address move monitoring is used to detect loops, then loop detection can be performed, but the method cannot accurately determine loop position
Solution Approach 1:
The patent segments the loop detection function into distinct components: the loop detection packet contains separate fields for source device identification, receiving port identification, and sending port identification. This segmentation allows each component to be tracked independently, enabling precise determination of where the loop exists in the network. The segmented information in the detection packet resolves the contradiction by providing both fast detection and accurate positioning.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
A method and an Ethernet switch device for detecting the existence and position of loop in an Ethernet network, which relate to the communication field, are provided in embodiments of the present invention, to solve the problem that the loop existence and position cannot be timely determined. The method includes: the Ethernet switch device learns a Media Access Control (MAC) address; in a MAC table, a first MAC address corresponds to a first port before the leaning of MAC address, and the first MAC address corresponds to a second port after the learning of MAC address (S301); if the second port and the first port do not belong to the same sub-network, an interval between a time of learning on the second port and a time of transmitting a last packet or receiving a last packet from the first port is calculated (S302); and if the interval is smaller than a predetermined judgment threshold of host migration, it is determined that a loop exists in a sub-network connected to the second port (S303). The embodiments of the present invention are applied to detection and locating of the loop position.