After MAC flapping-based loop detection is deployed on a virtual private LAN service (VPLS) network, a device can detect a loop based on the frequency of MAC address entry flapping. The device then blocks an AC-side interface or a PW based on the configured blocking policy to eliminate the loop (AC is short for attachment circuit, and PW for pseudo wire).