A technique for detecting a loop between network devices such as customer
and carrier edge devices involves counting the number of media access
control (MAC) address moves that occur at a device and comparing the
number of MAC address moves to a pre-established MAC move threshold. The
technique includes artificially accelerating the MAC move count related
to a MAC address when the MAC address is moving between a set of ports at
which the MAC address was previously found. The MAC move count is
artificially accelerated because movement of a MAC address between a set
of ports at which the MAC address was previously found is a strong
indication of loop. The MAC move count is artificially accelerated by
weighting the MAC move count once it has been determined that a MAC is
moving between a set of ports at which the MAC address was previously
found.