The l2-topology detect enable command enables Layer 2 topology detection.
The undo l2-topology detect enable command disables Layer 2 topology detection.
By default, Layer 2 topology detection is disabled.
Usage Scenario
In a VRRP group, when a master device is faulty, user services are switched to the backup device. After the master device recovers, user services are switched back to the master device. However, the Address Resolution Protocol (ARP) entries on the master device are not updated. As a result, user services are interrupted temporarily.
To resolve this problem, run the l2-topology detect enable command to enable Layer 2 topology detection. After the function is enabled, the aging time of all ARP entries corresponding to the VLAN to which a Layer 2 interface belongs is set to 0 when the status of the Layer 2 interface changes from Down to Up. Then, the device re-sends ARP probe packets to update all ARP entries.Precautions
After Layer 2 topology detection is enabled, if Layer 2 interface flapping occurs, the device will broadcast ARP probe packets frequently, consuming a large number of system resources. This affects user services. Therefore, running the arp detect-mode unicast command is recommended to allow the device to send ARP probe packets in unicast mode.