For example, I will use the D-Link DES-3200 switch, on other models the setting for LoopBack Detection is essentially the same.
Activation of the LoopBack Detection (LBD) function on the switch:
enable loopdetect
Enabling LoopBack Detection on ports 1 through 16:
config loopdetect ports 1-16 state enable
Setting recover_timer (time in seconds for which the port will be disabled if a loop is detected), interval (interval between sending loop detection packets), mode (port-based — port is blocked or vlan-based — vlan traffic is blocked in which a loop is detected):
config loopdetect recover_timer 300 interval 10 mode port-based
Let us configure that it is written to the log that a loop was detected and the traps were not sent:
config loopdetect log state enable config loopdetect trap none
In the web interface, you can configure this feature in the “L2 Features” – “Loopback Detection Settings”.