摘要 |
<p>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.</p> |